Cleanup
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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)){
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user