diff --git a/src/core/main/custom/toolbar.ts b/src/core/main/custom/toolbar.ts index e23bce5..0834f55 100644 --- a/src/core/main/custom/toolbar.ts +++ b/src/core/main/custom/toolbar.ts @@ -78,6 +78,12 @@ interface Misc { display: Component ): void; + /** + * 为一类杂项工具设置激活信息 + * @param id 杂项工具的id + * @param activable 是否可激活 + * @param actived 获取当前是否激活的函数 + */ bindActivable(id: string, activable: boolean, actived?: ActivedFn): void; /** @@ -383,7 +389,7 @@ Mota.require('var', 'hook').on('reset', () => { Mota.require('var', 'hook').once('reset', () => { const mainStorage = GameStorage.for(GameStorage.fromGame('main')); mainStorage.read(); - if (mainStorage.getValue('played', false)) { + if (!mainStorage.getValue('played', false)) { mainStorage.setValue('played', true); const defaultsTool = CustomToolbar.list.find(v => v.id === '@defaults') ?? diff --git a/src/core/main/init/toolbar.tsx b/src/core/main/init/toolbar.tsx index f6efa2f..a87eee2 100644 --- a/src/core/main/init/toolbar.tsx +++ b/src/core/main/init/toolbar.tsx @@ -958,14 +958,6 @@ Mota.require('var', 'hook').once('reset', () => { }, h(LayoutOutlined) ); - // CustomToolbar.misc.register( - // 'drag', - // '地图拖动', - // () => { - // // todo - // }, - // h('span', '拖动地图') - // ); CustomToolbar.misc.bindActivable('minimap', true, () => minimapTool); });