mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-19 12:49:25 +08:00
fix: 首次进游戏没有工具栏
This commit is contained in:
parent
63a21c8afa
commit
3bbb502fd7
@ -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') ??
|
||||
|
@ -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);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user