mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-20 06:20:50 +00:00
add missile silo
This commit is contained in:
@@ -15,6 +15,8 @@ export class BuildValidator {
|
||||
return this.canBuildPort(player, tile)
|
||||
case BuildItems.Destroyer:
|
||||
return this.canBuildDestroyer(player, tile)
|
||||
case BuildItems.MissileSilo:
|
||||
return tile.owner() == player
|
||||
default:
|
||||
throw Error(`item ${item.type} not supported`)
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ export enum UnitType {
|
||||
Port = "Port",
|
||||
Nuke = "Nuke",
|
||||
TradeShip = "Trade Ship",
|
||||
MissileSilo = "Missile Silo",
|
||||
}
|
||||
|
||||
export class BuildItem {
|
||||
@@ -41,7 +42,8 @@ export const BuildItems = {
|
||||
// Nuke: new BuildItem(UnitType.Nuke, 1_000_000),
|
||||
Nuke: new BuildItem(UnitType.Nuke, 10),
|
||||
Destroyer: new BuildItem(UnitType.Destroyer, 10),
|
||||
Port: new BuildItem(UnitType.Port, 0)
|
||||
Port: new BuildItem(UnitType.Port, 0),
|
||||
MissileSilo: new BuildItem(UnitType.MissileSilo, 10),
|
||||
} as const;
|
||||
|
||||
export class Nation {
|
||||
|
||||
Reference in New Issue
Block a user