fix: 录像按键

This commit is contained in:
AncTe committed 2024-11-20 22:20:03 +08:00
1 parent ebcc0bcfe5
commit 83ba5b0e65
3 files changed
+5 -8

No files matched your search

+1 -1
View File
@@ -228,9 +228,9 @@ export class Hotkey extends EventEmitter<HotkeyEvent> {
// 检查全局启用情况
if (!this.enabled) return false;
const when = this.conditionMap.get(this.scope)!;
if (!when()) return false;
if (type === 'down') this.checkPress(key);
else this.checkPressEnd(key);
if (!when()) return false;
const toEmit = this.keyMap.get(key);
if (!toEmit) return false;
+4 -1
View File
@@ -443,7 +443,10 @@ gameKey.use(mainScope);
// ----- Realization
gameKey
.when(() => !core.status.lockControl && !core.isMoving())
.when(
() =>
!core.status.lockControl && !core.isMoving() && !core.isReplaying()
)
.realize('book', () => {
core.openBook(true);
})