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(!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);
|
op(DrawOperation.opOverlay, this.overlay.id);
|
||||||
super.setOverlay(overlay);
|
super.setOverlay(overlay);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -748,7 +748,11 @@ public class MapEditorDialog extends Dialog implements Disposable{
|
|||||||
//ctrl keys (undo, redo, save)
|
//ctrl keys (undo, redo, save)
|
||||||
if(Core.input.ctrl()){
|
if(Core.input.ctrl()){
|
||||||
if(Core.input.keyTap(KeyCode.z)){
|
if(Core.input.keyTap(KeyCode.z)){
|
||||||
editor.undo();
|
if(Core.input.shift()){
|
||||||
|
editor.redo();
|
||||||
|
}else{
|
||||||
|
editor.undo();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Core.input.keyTap(KeyCode.y)){
|
if(Core.input.keyTap(KeyCode.y)){
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ public class Tile implements Position, QuadTreeObject, Displayable{
|
|||||||
pathfinder.updateTile(this);
|
pathfinder.updateTile(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!world.isGenerating() && prev != type){
|
if(!world.isGenerating()){
|
||||||
Events.fire(floorChange.set(this, prev, type));
|
Events.fire(floorChange.set(this, prev, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -404,6 +404,8 @@ public class Tile implements Position, QuadTreeObject, Displayable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setOverlay(Block block){
|
public void setOverlay(Block block){
|
||||||
|
if(this.overlay == block) return;
|
||||||
|
|
||||||
this.overlay = (Floor)block;
|
this.overlay = (Floor)block;
|
||||||
|
|
||||||
recache();
|
recache();
|
||||||
|
|||||||
Reference in New Issue
Block a user