mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-26 23:57:39 +07:00
Some errors fixed
This commit is contained in:
@ -30,6 +30,11 @@ public class DrawOperation{
|
|||||||
class TileOpStruct{
|
class TileOpStruct{
|
||||||
short x;
|
short x;
|
||||||
short y;
|
short y;
|
||||||
|
/**
|
||||||
|
* 0: floor
|
||||||
|
* 1: block
|
||||||
|
* 2: rotation
|
||||||
|
*/
|
||||||
byte type;
|
byte type;
|
||||||
byte from;
|
byte from;
|
||||||
byte to;
|
byte to;
|
||||||
|
@ -235,6 +235,12 @@ public class MapEditor{
|
|||||||
renderer.resize(width, height);
|
renderer.resize(width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void changeFloor(int x, int y, Block to){
|
||||||
|
Block from = tiles[x][y].floor();
|
||||||
|
tiles[x][y].setFloor((Floor)to);
|
||||||
|
addTileOp(TileOp.get((short)x, (short)y, (byte)0, from.id, to.id));
|
||||||
|
}
|
||||||
|
|
||||||
public void undo(){
|
public void undo(){
|
||||||
if(stack.canUndo()){
|
if(stack.canUndo()){
|
||||||
stack.undo(this);
|
stack.undo(this);
|
||||||
|
Reference in New Issue
Block a user