瀏覽代碼

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

tags/v0.12.0
Shaun 1 年之前
父節點
當前提交
971fc10e9c
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. +7
    -2
      src/client/ui/factory.js

+ 7
- 2
src/client/ui/factory.js 查看文件

@@ -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));
},


Loading…
取消
儲存