public DebugFiringOffsets(Actor self) { armaments = Lazy.New(() => self.TraitsImplementing<Armament>()); var localPlayer = self.World.LocalPlayer; devMode = localPlayer != null ? localPlayer.PlayerActor.Trait<DeveloperMode>() : null; }
public BaseProvider(Actor self, BaseProviderInfo info) { Info = info; this.self = self; devMode = self.Owner.PlayerActor.Trait<DeveloperMode>(); progress = total = info.InitialDelay; }
public CombatDebugOverlay(Actor self) { healthInfo = self.Info.TraitInfoOrDefault<HealthInfo>(); coords = Exts.Lazy(self.Trait<BodyOrientation>); var localPlayer = self.World.LocalPlayer; devMode = localPlayer != null ? localPlayer.PlayerActor.Trait<DeveloperMode>() : null; }
public CombatDebugOverlay(Actor self) { armaments = Lazy.New(() => self.TraitsImplementing<Armament>()); health = Lazy.New(() => self.TraitOrDefault<Health>()); var localPlayer = self.World.LocalPlayer; devMode = localPlayer != null ? localPlayer.PlayerActor.Trait<DeveloperMode>() : null; }
public CombatDebugOverlay(Actor self) { attack = Exts.Lazy(() => self.TraitOrDefault<AttackBase>()); coords = Exts.Lazy(() => self.Trait<IBodyOrientation>()); health = Exts.Lazy(() => self.TraitOrDefault<Health>()); var localPlayer = self.World.LocalPlayer; devMode = localPlayer != null ? localPlayer.PlayerActor.Trait<DeveloperMode>() : null; }
public CombatDebugOverlay(Actor self) { healthInfo = self.Info.TraitInfoOrDefault<HealthInfo>(); blockInfo = self.Info.TraitInfoOrDefault<BlocksProjectilesInfo>(); attack = Exts.Lazy(() => self.TraitOrDefault<AttackBase>()); coords = Exts.Lazy(() => self.Trait<BodyOrientation>()); var localPlayer = self.World.LocalPlayer; devMode = localPlayer != null ? localPlayer.PlayerActor.Trait<DeveloperMode>() : null; }
public RenderDebugState(Actor self, RenderDebugStateInfo info) { var buildingInfo = self.Info.TraitInfoOrDefault<BuildingInfo>(); var yOffset = buildingInfo == null ? 1 : buildingInfo.Dimensions.Y; offset = new WVec(0, 512 * yOffset, 0); this.self = self; color = GetColor(); font = Game.Renderer.Fonts[info.Font]; var localPlayer = self.World.LocalPlayer; devMode = localPlayer != null ? localPlayer.PlayerActor.Trait<DeveloperMode>() : null; ai = self.Owner.PlayerActor.TraitsImplementing<HackyAI>().FirstOrDefault(x => x.IsEnabled); }
public void OnOwnerChanged(Actor self, Player oldOwner, Player newOwner) { ClearQueue(); playerPower = newOwner.PlayerActor.Trait<PowerManager>(); playerResources = newOwner.PlayerActor.Trait<PlayerResources>(); developerMode = newOwner.PlayerActor.Trait<DeveloperMode>(); if (!Info.Sticky) { Race = self.Owner.Country.Race; Enabled = !Info.Race.Any() || Info.Race.Contains(Race); } // Regenerate the produceables and tech tree state oldOwner.PlayerActor.Trait<TechTree>().Remove(this); CacheProduceables(newOwner.PlayerActor); newOwner.PlayerActor.Trait<TechTree>().Update(); }
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); }
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>(); Faction = init.Contains<FactionInit>() ? init.Get<FactionInit, string>() : self.Owner.Faction.InternalName; Enabled = !info.Factions.Any() || info.Factions.Contains(Faction); CacheProducibles(playerActor); allProducibles = producible.Where(a => a.Value.Buildable || a.Value.Visible).Select(a => a.Key); buildableProducibles = producible.Where(a => a.Value.Buildable).Select(a => a.Key); }
public void OnOwnerChanged(Actor self, Player oldOwner, Player newOwner) { powerManager = newOwner.PlayerActor.Trait<PowerManager>(); developerMode = newOwner.PlayerActor.Trait<DeveloperMode>(); }
public PowerTooltip(Actor self) { this.self = self; powerManager = self.Owner.PlayerActor.Trait<PowerManager>(); developerMode = self.Owner.PlayerActor.Trait<DeveloperMode>(); }