Only changes enough to make everything work

This commit is contained in:
2023-04-01 14:52:14 +02:00
parent bb0be8a3f0
commit b4e7b8ea44
103 changed files with 2003 additions and 2010 deletions

View File

@@ -68,28 +68,28 @@ public class TerritoryAccessAdapter implements JsonDeserializer<TerritoryAccess>
hostFactionId = element.getAsString();
element = obj.get(HOST_FACTION_ALLOWED);
if (element != null) {
hostFactionAllowed = element.getAsBoolean();
}
if (element != null) {
hostFactionAllowed = element.getAsBoolean();
}
element = obj.get(GRANTED_IDS);
if (element != null) {
grantedIds = context.deserialize(element, SET_OF_STRING_TYPE);
}
if (element != null) {
grantedIds = context.deserialize(element, SET_OF_STRING_TYPE);
}
element = obj.get(CHUNK_NAME);
if (element != null) {
chunkName = element.getAsString();
}
if (element != null) {
chunkName = element.getAsString();
}
return TerritoryAccess.valueOf(hostFactionId, hostFactionAllowed, grantedIds, chunkName);
}
@Override
public JsonElement serialize(TerritoryAccess src, Type typeOfSrc, JsonSerializationContext context) {
if (src == null) {
return null;
}
if (src == null) {
return null;
}
// isDefault <=> simple hostFactionId string
if (src.isDefault()) {