提升对其他客户端的支持

This commit is contained in:
539943419 committed 2024-07-14 00:36:42 +08:00
1 parent 26ee7a2611
commit 42f0ac7cf4
3 files changed
+18 -5

No files matched your search

+4 -3
View File
@@ -1,7 +1,8 @@
import miaoTool from "./miaoTool.js"; import miaoTool from "./miaoTool.js";
export default function content (config, pack) { export default (lib, game, ui, get, ai, _status) => (config, pack) => {
lib.miaoTool = miaoTool lib.miaoTool = miaoTool(lib, game, ui, get, ai, _status)
console.log(666,miaoTool(lib, game, ui, get, ai, _status))
/*---------------------------------------------------------------以下为杂项---------------------------------------------------------------*/ /*---------------------------------------------------------------以下为杂项---------------------------------------------------------------*/
get.is.xuemai = function (skill) { get.is.xuemai = function (skill) {
var info = lib.skill[skill]; var info = lib.skill[skill];
@@ -506,7 +507,7 @@ export default function content (config, pack) {
}; };
game.changeGlobalStatus = function () { 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) { if (!game.hasGlobalStatusButton) {
game.hasGlobalStatusButton = true; game.hasGlobalStatusButton = true;
ui.globalStatusButton = ui.create.system("喵喵", null, true); ui.globalStatusButton = ui.create.system("喵喵", null, true);
+3 -1
View File
@@ -1,8 +1,10 @@
import content from "./content.js"; import content from "./content.js";
import _miaoTool from "./miaoTool.js";
game.import("extension", function (lib, game, ui, get, ai, _status) { game.import("extension", function (lib, game, ui, get, ai, _status) {
const miaoTool = _miaoTool(lib, game, ui, get, ai, _status)
return { return {
name: "喵喵喵喵", name: "喵喵喵喵",
content, content:content(lib, game, ui, get, ai, _status),
precontent: function () {}, precontent: function () {},
help: {}, help: {},
config: {}, config: {},
+11 -1
View File
@@ -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) {
},
};
};