This commit is contained in:
Anuken
2025-07-13 19:28:25 -04:00
parent 7cc000ed46
commit 3a33c53e8f
3 changed files with 9 additions and 3 deletions

View File

@@ -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);
}

View File

@@ -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)){

View File

@@ -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();