diff --git a/content.js b/content.js index 8d96833..de57856 100644 --- a/content.js +++ b/content.js @@ -1,7 +1,8 @@ import miaoTool from "./miaoTool.js"; -export default function content (config, pack) { - lib.miaoTool = miaoTool +export default (lib, game, ui, get, ai, _status) => (config, pack) => { + lib.miaoTool = miaoTool(lib, game, ui, get, ai, _status) + console.log(666,miaoTool(lib, game, ui, get, ai, _status)) /*---------------------------------------------------------------以下为杂项---------------------------------------------------------------*/ get.is.xuemai = function (skill) { var info = lib.skill[skill]; @@ -506,7 +507,7 @@ export default function content (config, pack) { }; game.changeGlobalStatus = function () { - /*改变场上状态,example:game.changeGlobalStatus(5,3,"xiyu",ture,"phase") 表示强制转换为细雨天气5回合并锁定3回合,来源默认为event.player*/ + /*改变场上状态,example:game.changeGlobalStatus(5,3,"xiyu",true,"phase") 表示强制转换为细雨天气5回合并锁定3回合,来源默认为event.player*/ if (!game.hasGlobalStatusButton) { game.hasGlobalStatusButton = true; ui.globalStatusButton = ui.create.system("喵喵", null, true); diff --git a/extension.js b/extension.js index 839f54c..f5c0212 100644 --- a/extension.js +++ b/extension.js @@ -1,8 +1,10 @@ import content from "./content.js"; +import _miaoTool from "./miaoTool.js"; game.import("extension", function (lib, game, ui, get, ai, _status) { + const miaoTool = _miaoTool(lib, game, ui, get, ai, _status) return { name: "喵喵喵喵", - content, + content:content(lib, game, ui, get, ai, _status), precontent: function () {}, help: {}, config: {}, diff --git a/miaoTool.js b/miaoTool.js index 07402dd..1128c5b 100644 --- a/miaoTool.js +++ b/miaoTool.js @@ -1 +1,11 @@ -export default { test: "test" }; +export default (lib, game, ui, get, ai, _status) => { + return { + test: "test123", + isAsyncFunction(func) { + return func.constructor.name === 'AsyncFunction'; + }, + watch: function (obj, key, callback) { + + }, + }; +};