Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -22,6 +22,7 @@ public enum EditorTool{
|
|||||||
|
|
||||||
Tile tile = editor.tile(x, y);
|
Tile tile = editor.tile(x, y);
|
||||||
editor.drawBlock = tile.block() == Blocks.air || !tile.block().inEditor ? tile.overlay() == Blocks.air ? tile.floor() : tile.overlay() : tile.block();
|
editor.drawBlock = tile.block() == Blocks.air || !tile.block().inEditor ? tile.overlay() == Blocks.air ? tile.floor() : tile.overlay() : tile.block();
|
||||||
|
editor.drawBlock.editorPicked(tile);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
line(KeyCode.l, "replace", "orthogonal"){
|
line(KeyCode.l, "replace", "orthogonal"){
|
||||||
|
|||||||
@@ -963,6 +963,11 @@ public class Block extends UnlockableContent implements Senseable{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Called when pick blocked in the editor. */
|
||||||
|
public void editorPicked(Tile tile){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isFloor(){
|
public boolean isFloor(){
|
||||||
return this instanceof Floor;
|
return this instanceof Floor;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,11 @@ public class CharacterOverlay extends OverlayFloor{
|
|||||||
tile.overlayData = CharOverlayData.get(data, (byte)rotation);
|
tile.overlayData = CharOverlayData.get(data, (byte)rotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void editorPicked(Tile tile){
|
||||||
|
lastConfig = (int)CharOverlayData.character(tile.overlayData);
|
||||||
|
}
|
||||||
|
|
||||||
public static byte charToData(char c){
|
public static byte charToData(char c){
|
||||||
int index = chars.indexOf(Character.toUpperCase(c));
|
int index = chars.indexOf(Character.toUpperCase(c));
|
||||||
return index == -1 ? 0 : (byte)index;
|
return index == -1 ? 0 : (byte)index;
|
||||||
|
|||||||
@@ -180,6 +180,11 @@ public class ColoredFloor extends Floor{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void editorPicked(Tile tile){
|
||||||
|
lastConfig = tile.extraData;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawPlanRegion(BuildPlan plan, Eachable<BuildPlan> list){
|
public void drawPlanRegion(BuildPlan plan, Eachable<BuildPlan> list){
|
||||||
if(plan.config instanceof Integer i){
|
if(plan.config instanceof Integer i){
|
||||||
|
|||||||
@@ -64,6 +64,11 @@ public class ColoredWall extends StaticWall{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void editorPicked(Tile tile){
|
||||||
|
lastConfig = tile.extraData;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawPlanRegion(BuildPlan plan, Eachable<BuildPlan> list){
|
public void drawPlanRegion(BuildPlan plan, Eachable<BuildPlan> list){
|
||||||
if(plan.config instanceof Integer i){
|
if(plan.config instanceof Integer i){
|
||||||
|
|||||||
Reference in New Issue
Block a user