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
This commit is contained in:
scamiv
2026-02-25 04:06:57 +01:00
parent 8292f2627d
commit a067c5f7d5
+1
View File
@@ -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);
}