public void RefreshMinLevelBindings() { Attack.RefreshPropertyBinding(nameof(Attack.MinValue)); CriticalDamage.RefreshPropertyBinding(nameof(CriticalDamage.MinValue)); CriticalChance.RefreshPropertyBinding(nameof(CriticalChance.MinValue)); AttackSpeed.RefreshPropertyBinding(nameof(AttackSpeed.MinValue)); Health.RefreshPropertyBinding(nameof(Health.MinValue)); Shields.RefreshPropertyBinding(nameof(Shields.MinValue)); DefensiveEssence.RefreshPropertyBinding(nameof(DefensiveEssence.MinValue)); DamageReduction.RefreshPropertyBinding(nameof(DamageReduction.MinValue)); Mining.RefreshPropertyBinding(nameof(Mining.MinValue)); Kills.RefreshPropertyBinding(nameof(Kills.MinValue)); Veterancy.RefreshPropertyBinding(nameof(Veterancy.MinValue)); Acceleration.RefreshPropertyBinding(nameof(Acceleration.MinValue)); }
public StatusBar(Actor actor, AdvancedSelectionDecorationsInfo info) { this.actor = actor; this.info = info; var isAlly = actor.Owner.IsAlliedWith(actor.World.LocalPlayer); health = actor.TraitOrDefault <Health>(); saboteurs = isAlly ? actor.TraitOrDefault <SaboteurConquerable>() : null; saboteursInfo = actor.Info.TraitInfoOrDefault <SaboteurConquerableInfo>(); oil = actor.TraitOrDefault <IHaveOil>(); researchable = isAlly ? actor.TraitOrDefault <Researchable>() : null; researchableInfo = actor.Info.TraitInfoOrDefault <ResearchableInfo>(); techLevel = actor.World.WorldActor.Trait <TechLevel>(); veteran = actor.TraitOrDefault <Veterancy>(); veteranInfo = actor.Info.TraitInfoOrDefault <VeterancyInfo>(); }
/// <summary> /// Gets INI code for map aircraft object. /// </summary> /// <returns>INI code for map object.</returns> public override string GetINICode() { List <string> values = new List <string> { Owner, ID, Health.ToString(), X.ToString(), Y.ToString(), Facing.ToString(), Mission.ToString().Replace("_", " "), Tag, Veterancy.ToString(), Group.ToString(), AutocreateNoRecruitable ? "1" : "0", AutocreateYesRecruitable ? "1" : "0" }; return(string.Join(",", values)); }