Sector generation fix
This commit is contained in:
@@ -102,7 +102,7 @@ public class Sectors{
|
|||||||
if(checkExpansion) {
|
if(checkExpansion) {
|
||||||
for (int x = sector.x; x < sector.x + sector.width; x++) {
|
for (int x = sector.x; x < sector.x + sector.width; x++) {
|
||||||
for (int y = sector.y; y < sector.y + sector.height; y++) {
|
for (int y = sector.y; y < sector.y + sector.height; y++) {
|
||||||
if (grid.get(x, y) != null && (grid.get(x, y).hasSave() /*|| !canMerge(sector, grid.get(x, y))*/)) {
|
if (grid.get(x, y) != null && grid.get(x,y) != sector && grid.get(x, y).hasSave() /*|| !canMerge(sector, grid.get(x, y))*/) {
|
||||||
//if a completed sector is hit, expansion failed
|
//if a completed sector is hit, expansion failed
|
||||||
//put back the values of the sector
|
//put back the values of the sector
|
||||||
if (expandX < 0) sector.x -= expandX;
|
if (expandX < 0) sector.x -= expandX;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class TutorialSector{
|
|||||||
|
|
||||||
new WaveMission(2).setMessage("$tutorial.waves"),
|
new WaveMission(2).setMessage("$tutorial.waves"),
|
||||||
|
|
||||||
new ActionMission(() -> {
|
new ActionMission(() ->
|
||||||
Timers.runTask(30f, () -> {
|
Timers.runTask(30f, () -> {
|
||||||
Runnable r = () -> {
|
Runnable r = () -> {
|
||||||
Array<Item> ores = Array.with(Items.copper, Items.coal, Items.lead);
|
Array<Item> ores = Array.with(Items.copper, Items.coal, Items.lead);
|
||||||
@@ -63,8 +63,7 @@ public class TutorialSector{
|
|||||||
}else{
|
}else{
|
||||||
threads.run(r);
|
threads.run(r);
|
||||||
}
|
}
|
||||||
});
|
})),
|
||||||
}),
|
|
||||||
|
|
||||||
new ItemMission(Items.lead, 150).setMessage("$tutorial.lead"),
|
new ItemMission(Items.lead, 150).setMessage("$tutorial.lead"),
|
||||||
new ItemMission(Items.copper, 250).setMessage("$tutorial.morecopper"),
|
new ItemMission(Items.copper, 250).setMessage("$tutorial.morecopper"),
|
||||||
@@ -131,6 +130,7 @@ public class TutorialSector{
|
|||||||
},
|
},
|
||||||
new BattleMission(){
|
new BattleMission(){
|
||||||
public void generate(Generation gen){} //no
|
public void generate(Generation gen){} //no
|
||||||
|
public void onBegin(){} //also no
|
||||||
}.setMessage("$tutorial.battle")
|
}.setMessage("$tutorial.battle")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user