Logic sensor (#10795)
* Add `selectedBlock` logic sensor * Add `buildX`/`buildY`/`building` logic sensors * Change `building` from boolean to the building * `breaking` * Make `breaking`/`building` more consistent * Allow blocks/content to be null * Change `selectedBlock` from air to null * Change `selectedBlock` from air to null * Make `selectedBlock` SyncLocal * Add `selectedRotation`
This commit is contained in:
@@ -229,7 +229,7 @@ public class EntityIO{
|
||||
s(type.equals("boolean") ? "bool" : type.charAt(0) + "", field);
|
||||
}else if(instanceOf(type, "mindustry.ctype.Content") && !type.equals("mindustry.ai.UnitStance") && !type.equals("mindustry.ai.UnitCommand")){
|
||||
if(write){
|
||||
s("s", field + ".id");
|
||||
s("s", field + " == null ? -1 : " + field + ".id");
|
||||
}else{
|
||||
st(field + "mindustry.Vars.content.getByID(mindustry.ctype.ContentType.$L, read.s())", BaseProcessor.simpleName(type).toLowerCase().replace("type", ""));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user