mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-17 01:15:52 +01:00
Refactor handbook generation to not use naked textmap getter
This commit is contained in:
@@ -378,19 +378,23 @@ public final class Language {
|
||||
private static Int2ObjectMap<TextStrings> textMapStrings;
|
||||
private static final Path TEXTMAP_CACHE_PATH = Path.of(Utils.toFilePath("cache/TextMapCache.bin"));
|
||||
|
||||
@Deprecated(forRemoval = true)
|
||||
public static Int2ObjectMap<TextStrings> getTextMapStrings() {
|
||||
if (textMapStrings == null)
|
||||
loadTextMaps();
|
||||
return textMapStrings;
|
||||
}
|
||||
|
||||
public static TextStrings getTextMapKey(long hash) {
|
||||
int key = (int) hash;
|
||||
public static TextStrings getTextMapKey(int key) {
|
||||
if ((textMapStrings == null) || (!scannedTextmaps && !textMapStrings.containsKey(key)))
|
||||
loadTextMaps();
|
||||
return textMapStrings.get(key);
|
||||
}
|
||||
|
||||
public static TextStrings getTextMapKey(long hash) {
|
||||
return getTextMapKey((int) hash);
|
||||
}
|
||||
|
||||
public static void loadTextMaps() {
|
||||
// Check system timestamps on cache and resources
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user