diff --git a/core/src/mindustry/editor/EditorTile.java b/core/src/mindustry/editor/EditorTile.java index 4a744772a6..ddf666b1a9 100644 --- a/core/src/mindustry/editor/EditorTile.java +++ b/core/src/mindustry/editor/EditorTile.java @@ -93,7 +93,7 @@ public class EditorTile extends Tile{ } if(!floor.hasSurface() && overlay.asFloor().needsSurface && (overlay instanceof OreBlock || !floor.supportsOverlay)) return; - if(overlay() == overlay) return; + if(this.overlay == overlay) return; op(DrawOperation.opOverlay, this.overlay.id); super.setOverlay(overlay); } diff --git a/core/src/mindustry/editor/MapEditorDialog.java b/core/src/mindustry/editor/MapEditorDialog.java index 3bab193111..2ab5c0759f 100644 --- a/core/src/mindustry/editor/MapEditorDialog.java +++ b/core/src/mindustry/editor/MapEditorDialog.java @@ -748,7 +748,11 @@ public class MapEditorDialog extends Dialog implements Disposable{ //ctrl keys (undo, redo, save) if(Core.input.ctrl()){ if(Core.input.keyTap(KeyCode.z)){ - editor.undo(); + if(Core.input.shift()){ + editor.redo(); + }else{ + editor.undo(); + } } if(Core.input.keyTap(KeyCode.y)){ diff --git a/core/src/mindustry/world/Tile.java b/core/src/mindustry/world/Tile.java index cab73a3586..b4bd9d3a97 100644 --- a/core/src/mindustry/world/Tile.java +++ b/core/src/mindustry/world/Tile.java @@ -308,7 +308,7 @@ public class Tile implements Position, QuadTreeObject, Displayable{ pathfinder.updateTile(this); } - if(!world.isGenerating() && prev != type){ + if(!world.isGenerating()){ Events.fire(floorChange.set(this, prev, type)); } @@ -404,6 +404,8 @@ public class Tile implements Position, QuadTreeObject, Displayable{ } public void setOverlay(Block block){ + if(this.overlay == block) return; + this.overlay = (Floor)block; recache();