Skip to content

Commit

Permalink
Fix unexplored map crash with units
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheikah45 committed Apr 28, 2021
1 parent 6665a8c commit 4c2cbc5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ protected void setupCivilianPipeline() {
if (!map.isUnexplored()) {
baseMask.randomize(.005f).setSize(mapSize + 1);
baseMask.multiply(passableLand.copy().subtract(unbuildable).deflate(24)).fillCenter(32, false).fillEdge(32, false);
} else {
baseMask.setSize(mapSize + 1);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ protected void setupCivilianPipeline() {
if (!map.isUnexplored()) {
civReclaimMask.randomize(.005f).setSize(mapSize + 1);
civReclaimMask.multiply(passableLand.copy().subtract(unbuildable).deflate(24)).fillCenter(32, false).fillEdge(64, false);
} else {
civReclaimMask.setSize(mapSize + 1);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ public void TestEqualityBiomeSpecified() throws Exception {

@Test
public void TestUnexploredNoUnits() throws Exception {
for (int i = 0; i < 5; ++i) {
for (int i = 0; i < 10; ++i) {
Pipeline.reset();
instance = new MapGenerator();
instance.interpretArguments(new String[]{"--unexplored", "--map-size", "256"});
Expand Down

0 comments on commit 4c2cbc5

Please sign in to comment.