mirror of
https://gitgud.io/BondageProjects/Bondage-College.git
synced 2025-04-25 17:59:34 +00:00
ENH: Let TextPrefetchFile
return the relevant text cache
This commit is contained in:
parent
42a2e6002d
commit
60b921bbf7
1 changed files with 6 additions and 2 deletions
|
@ -69,11 +69,15 @@ function TextPrefetch(Module, TextGroup) {
|
|||
/**
|
||||
* Trigger the caching of a specific file into the text cache
|
||||
* @param {string} file
|
||||
* @returns {TextCache}
|
||||
*/
|
||||
function TextPrefetchFile(file) {
|
||||
if (!TextAllScreenCache.has(file)) {
|
||||
TextAllScreenCache.set(file, new TextCache(file));
|
||||
let cache = TextAllScreenCache.get(file);
|
||||
if (!cache) {
|
||||
cache = new TextCache(file);
|
||||
TextAllScreenCache.set(file, cache);
|
||||
}
|
||||
return cache;
|
||||
}
|
||||
|
||||
const InterfaceStringsPath = "Screens/Interface.csv";
|
||||
|
|
Loading…
Add table
Reference in a new issue