Bläddra i källkod

modding #1974: Added the ability for mods to override default UIs

tags/v0.12.0
Shaun 1 år sedan
förälder
incheckning
971fc10e9c
1 ändrade filer med 7 tillägg och 2 borttagningar
  1. +7
    -2
      src/client/ui/factory.js

+ 7
- 2
src/client/ui/factory.js Visa fil

@@ -90,8 +90,13 @@ define([
let path = null;
if (options && options.path)
path = options.path + `\\${type}.js`;
else
path = this.root + 'ui/templates/' + type + '/' + type;
else {
const entryInClientConfig = globals.clientConfig.uiList.find(u => u.type === type);
if (entryInClientConfig)
path = entryInClientConfig.path;
else
path = this.root + 'ui/templates/' + type + '/' + type;
}
require([path], this.onGetTemplate.bind(this, options, type));
},


Laddar…
Avbryt
Spara