Table of Contents

Class ConstructBuildingCommand

Namespace
StarterKit.Commands
Assembly
StarterKit.dll

StarterKit command: Construct a building in a province. Used by both player (via console) and AI (programmatically). Uses type-safe ProvinceId wrapper for compile-time safety.

[Command("build", Aliases = new string[] { "construct" }, Description = "Construct a building in a province", Examples = new string[] { "build market 5", "construct farm 10" })]
public class ConstructBuildingCommand : SimpleCommand, ICommand
Inheritance
object
ConstructBuildingCommand
Implements
Inherited Members

Properties

BuildingTypeId

[Arg(0, "buildingType")]
public string BuildingTypeId { get; set; }

Property Value

string

CountryId

Country executing the command. If 0, uses player's country. Set by AI when executing for AI countries. Optional for console use (defaults to 0 = player).

[Arg(2, "countryId", Optional = true)]
public ushort CountryId { get; set; }

Property Value

ushort

ProvinceId

[Arg(1, "provinceId")]
public ProvinceId ProvinceId { get; set; }

Property Value

ProvinceId

Methods

Execute(GameState)

Override to implement execution logic.

public override void Execute(GameState gameState)

Parameters

gameState GameState

Validate(GameState)

Override to implement validation logic.

public override bool Validate(GameState gameState)

Parameters

gameState GameState

Returns

bool