Merge fixes

This commit is contained in:
Anuken
2026-09-09 17:55:43 -04:00
parent 867dd29ba8
commit d0048f32de
3 changed files with 11 additions and 22 deletions
+9 -20
View File
@@ -780,26 +780,6 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
return Core.bundle == null ? className : Core.bundle.get("marker." + className.toLowerCase() + ".name", className);
}
@Override
public void write(Json json){
json.writeFields(this);
}
private void updateField(JsonValue value){
if(value != null && value.type() != JsonValue.ValueType.longValue){
value.set(value.asBoolean() ? 1 : -1, null);
}
}
@Override
public void read(Json json, JsonValue jsonData){
updateField(jsonData.get("world"));
updateField(jsonData.get("minimap"));
updateField(jsonData.get("light"));
json.readFields(this, jsonData);
if(jsonData.has("textureName")) setTexture(jsonData.getString("textureName"));
}
public static String fetchText(String text){
if(text == null) return "";
@@ -831,8 +811,17 @@ public class MapObjectives implements Iterable<MapObjective>, Eachable<MapObject
json.writeFields(writer, this);
}
private void updateField(Jval value, String name){
Jval sub = value.get(name);
if(sub != null && sub.isBoolean()) value.put(name, sub.asBool() ? 1 : -1);
}
@Override
public void read(Json json, Jval jsonData){
updateField(jsonData, "world");
updateField(jsonData, "minimap");
updateField(jsonData, "light");
json.readFields(this, jsonData);
if(jsonData.has("textureName")) setTexture(jsonData.getString("textureName"));
}
+1 -1
View File
@@ -691,7 +691,7 @@ public class LExecutor{
//note that remote units/buildings can be sensed as well
if(target instanceof Senseable se){
if(sense instanceof LAccess la){
if(exec.privileged || !la.isPrivileged()){
if(exec.privileged || !la.privileged){
Object objOut = se.senseObject(la);
if(objOut == Senseable.noSensed){
+1 -1
View File
@@ -26,4 +26,4 @@ org.gradle.caching=true
org.gradle.internal.http.socketTimeout=100000
org.gradle.internal.http.connectionTimeout=100000
android.enableR8.fullMode=false
archash=dbb516c662
archash=b43a5b04ce