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 f336c667f3
commit ba7bc6e2c8
+1
View File
@@ -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);
}