From ba7bc6e2c8f387d1f79a1dbe9a1f4bba76b6fbac 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 8dbb56835..91cf123ed 100644 --- a/src/core/game/GameImpl.ts +++ b/src/core/game/GameImpl.ts @@ -893,6 +893,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); }