mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-01 18:50:27 +03:00
Merge fixes
This commit is contained in:
@@ -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"));
|
||||
}
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user