mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-18 00:09:26 +00:00
Refactor UnitSpecific info => AllUnitParams type union (#701)
## Description: By using a type union we get better type safety, enforcing each unit type have the appropriate params when initializing ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors ## Please put your Discord username so you can be contacted if a bug or regression is found: evan --------- Co-authored-by: evan <openfrontio@gmail.com>
This commit is contained in:
@@ -38,7 +38,7 @@ export class CityExecution implements Execution {
|
||||
this.active = false;
|
||||
return;
|
||||
}
|
||||
this.city = this.player.buildUnit(UnitType.City, 0, spawnTile);
|
||||
this.city = this.player.buildUnit(UnitType.City, spawnTile, {});
|
||||
}
|
||||
if (!this.city.isActive()) {
|
||||
this.active = false;
|
||||
|
||||
Reference in New Issue
Block a user