mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-02 09:15:05 +08:00
fix: 自动寻路时无法触发楼层传送
This commit is contained in:
1 parent
b881cc1d2e
commit
c6e0573496
11 files changed
+178
-132
No files matched your search
@@ -193,13 +193,14 @@ export function init() {
|
||||
|
||||
control.prototype.moveHero = async function (
|
||||
direction?: Dir,
|
||||
callback?: () => void
|
||||
callback?: () => void,
|
||||
noRoute: boolean = false
|
||||
) {
|
||||
if (heroMover.moving) return;
|
||||
heroMover.clearMoveQueue();
|
||||
heroMover.oneStep(direction ?? 'forward');
|
||||
const lock = core.status.lockControl;
|
||||
const controller = heroMover.startMove(false, true, lock);
|
||||
const controller = heroMover.startMove(false, noRoute, lock);
|
||||
controller?.onEnd.then(() => {
|
||||
callback?.();
|
||||
});
|
||||
@@ -251,6 +252,9 @@ export function init() {
|
||||
this._setAutomaticRoute_drawRoute(moveStep);
|
||||
this._setAutomaticRoute_setAutoSteps(moveStep);
|
||||
|
||||
// ???
|
||||
core.setAutoHeroMove();
|
||||
|
||||
// 执行移动
|
||||
const steps: MoveStep[] = moveStep.map(v => {
|
||||
return { type: 'dir', value: v.direction };
|
||||
|
||||
@@ -184,7 +184,7 @@ export function init() {
|
||||
return _executeCallback();
|
||||
// @ts-ignore
|
||||
core.status.automaticRoute.moveDirectly = false;
|
||||
this.doSystemEvent(trigger, block, core.doAction);
|
||||
this.doSystemEvent(trigger, block);
|
||||
}
|
||||
return _executeCallback();
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user