public ProductionQueue(Actor self, Actor playerActor, ProductionQueueInfo info) { this.self = self; this.Info = info; playerResources = playerActor.Trait <PlayerResources>(); PlayerPower = playerActor.Trait <PowerManager>(); Race = self.Owner.Country; Produceable = InitTech(playerActor); }
public ProductionQueue(ActorInitializer init, Actor playerActor, ProductionQueueInfo info) { self = init.self; Info = info; playerResources = playerActor.Trait <PlayerResources>(); playerPower = playerActor.Trait <PowerManager>(); developerMode = playerActor.Trait <DeveloperMode>(); Race = init.Contains <RaceInit>() ? init.Get <RaceInit, string>() : self.Owner.Country.Race; Enabled = !info.Race.Any() || info.Race.Contains(Race); CacheProduceables(playerActor); }