Weitere Anpassungen bezüglich der Voxel und des Zoning Systems

This commit is contained in:
2026-08-12 23:01:09 +02:00
parent ae3caacebf
commit 400a736804
88 changed files with 2826 additions and 686 deletions

View File

@@ -68,4 +68,23 @@ public class TextResolver {
}
}
}
/** Wie resolveId(), gibt aber bei fehlendem Key den Key selbst zurück statt [key]. */
public String resolveOrId(String id) {
if (id == null || id.isBlank()) return "";
try {
return bundle.getString(id);
} catch (MissingResourceException e) {
try {
return fallback.getString(id);
} catch (MissingResourceException ex) {
return id;
}
}
}
public String resolve(TextReference ref, String fallbackText) {
if (ref == null || ref.id() == null || ref.id().isBlank()) return fallbackText;
return resolveOrId(ref.id()).equals(ref.id()) ? fallbackText : resolveOrId(ref.id());
}
}

View File

@@ -93,4 +93,7 @@ dialog.silas.wer_seid_ihr.textnpc
erzmoss.description
erzmoss.name
hero.name
location.neu_1786533928723
location.neu_1786546178407
location.test
silas.name