Config pick (#11073)
* Pick Configs * Fix character overlay picking * More descriptive method name
This commit is contained in:
@@ -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(){
|
||||
return this instanceof Floor;
|
||||
}
|
||||
|
||||
@@ -80,6 +80,11 @@ public class CharacterOverlay extends OverlayFloor{
|
||||
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){
|
||||
int index = chars.indexOf(Character.toUpperCase(c));
|
||||
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
|
||||
public void drawPlanRegion(BuildPlan plan, Eachable<BuildPlan> list){
|
||||
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
|
||||
public void drawPlanRegion(BuildPlan plan, Eachable<BuildPlan> list){
|
||||
if(plan.config instanceof Integer i){
|
||||
|
||||
Reference in New Issue
Block a user