fix(02-04): guard nullable static event sources

- Preserve dynamic event collection while narrowing static tile access
- Record the moverImpl type diagnostic as resolved
This commit is contained in:
AncTe committed 2026-09-10 09:38:02 +08:00
1 parent a2aedb3969
commit 93453db417
3 files changed
+20 -7

No files matched your search

@@ -202,13 +202,15 @@ export class DefaultHeroMoveTopImpl implements IHeroMoveTopImpl {
}
}
if (loc) {
for (const [priority, id] of loc.static.tileEvent().get()) {
tileSources.push({
priority,
id,
type: BlockEventType.TileEvent,
tile: loc.static
});
if (loc.static) {
for (const [priority, id] of loc.static.tileEvent().get()) {
tileSources.push({
priority,
id,
type: BlockEventType.TileEvent,
tile: loc.static
});
}
}
for (const tile of loc.dynamics) {
for (const [priority, id] of tile.tileEvent().get()) {
@@ -202,6 +202,10 @@ export class HeroPathfinding implements IHeroPathfinding {
this.system.useMover(mover);
}
useMovable(movable: IObjectMovable | null): void {
this.system.useMovable(movable);
}
useFallbackPolicy(policy: PathFallbackPolicy | null): void {
this.system.useFallbackPolicy(policy);
}