diff --git a/core/src/mindustry/editor/SectorGenerateDialog.java b/core/src/mindustry/editor/SectorGenerateDialog.java index f51b55f443..4d0b8bcb37 100644 --- a/core/src/mindustry/editor/SectorGenerateDialog.java +++ b/core/src/mindustry/editor/SectorGenerateDialog.java @@ -93,6 +93,7 @@ public class SectorGenerateDialog extends BaseDialog{ var preset = sectorobj.preset; sectorobj.preset = null; + logic.reset(); //TODO: is this a good idea? all rules and map state are cleared, but it fixes inconsistent gen world.loadSector(sectorobj, seed, false); sectorobj.preset = preset; diff --git a/core/src/mindustry/maps/generators/BaseGenerator.java b/core/src/mindustry/maps/generators/BaseGenerator.java index 013a4575e4..27623957be 100644 --- a/core/src/mindustry/maps/generators/BaseGenerator.java +++ b/core/src/mindustry/maps/generators/BaseGenerator.java @@ -209,10 +209,12 @@ public class BaseGenerator{ int cx = x - (int)rotator.x; int cy = y - (int)rotator.y; - for(Stile tile : result.tiles){ - int realX = tile.x + cx, realY = tile.y + cy; - if(!insanity && isTaken(tile.block, realX, realY)){ - return false; + if(!insanity){ + for(Stile tile : result.tiles){ + int realX = tile.x + cx, realY = tile.y + cy; + if(isTaken(tile.block, realX, realY)){ + return false; + } } }