From 8711ee09d2afee407111b21a958c52ea99b5c882 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 29 Jan 2025 14:49:58 -0800 Subject: [PATCH] Turns out YPP does need getLocalePrefix(). :) --- .../java/com/threerings/resource/ResourceManager.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/src/main/java/com/threerings/resource/ResourceManager.java b/core/src/main/java/com/threerings/resource/ResourceManager.java index cfa4fc0a..6e6d1220 100644 --- a/core/src/main/java/com/threerings/resource/ResourceManager.java +++ b/core/src/main/java/com/threerings/resource/ResourceManager.java @@ -257,14 +257,22 @@ public class ResourceManager */ public void setLocalePrefix (final String prefix) { + _localePrefix = prefix; setLocaleHandler( new LocaleHandler() { + public String getPrefix() { + return prefix; + } public String getLocalePath (String path) { return PathUtil.appendPath(prefix, path); } }); } + public String getLocalePrefix () { + return _localePrefix; + } + /** * Configure a custom LocaleHandler. */ @@ -1097,6 +1105,9 @@ public class ResourceManager /** Converts a path to a locale-specific path. */ protected LocaleHandler _localeHandler; + /** Set when we have a simple prefix-based locale handler (needed for YPP). */ + protected String _localePrefix; + /** Maps resource paths to observed file resources. */ protected HashMap _observed = Maps.newHashMap();