From a067c5f7d5e91b6b0477feb663e4770b9171711e Mon Sep 17 00:00:00 2001 From: scamiv <6170744+scamiv@users.noreply.github.com> Date: Wed, 25 Feb 2026 04:06:57 +0100 Subject: [PATCH] fix: remove unit from plan-driven IDs on removal Ensure that when a unit is removed from the game, its ID is also deleted from the plan-driven unit IDs set --- src/core/game/GameImpl.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/game/GameImpl.ts b/src/core/game/GameImpl.ts index 654567892..4b0506ee9 100644 --- a/src/core/game/GameImpl.ts +++ b/src/core/game/GameImpl.ts @@ -923,6 +923,7 @@ export class GameImpl implements Game { } removeUnit(u: Unit) { this.unitGrid.removeUnit(u); + this.planDrivenUnitIds.delete(u.id()); if (u.hasTrainStation()) { this._railNetwork.removeStation(u); }