Ejemplo n.º 1
0
 protected void OutputForPowerShuntAttributes(PowerShuntAttributes powerShunt)
 {
     Print($"powerLevelChargeTime: {powerShunt.PowerLevelChargeTimeSeconds}");
     Print($"powerLevelDrainTime: {powerShunt.PowerLevelDrainTimeSeconds}");
     Print($"heatThreshold: {powerShunt.HeatThreshold}");
     Print($"cooldownRate: {powerShunt.CooldownRate}");
     Print($"overheatDamage: {powerShunt.OverheatDamage}");
     Print($"nearOverheatWarningMargin: {powerShunt.NearOverheatWarningMargin}");
     Print($"overheatReminderPeriod: {powerShunt.OverheatReminderPeriod}");
     using (BeginScope("reservePowerPool"))
     {
         OutputForInventory(powerShunt.ReservePowerPool);
     }
     using (BeginScope("overheatingPool"))
     {
         OutputForInventory(powerShunt.OverheatingPool);
     }
     using (BeginScope("heatSystem"))
     {
         OutputForInventory(powerShunt.HeatSystem);
     }
     using (BeginScope("powerSystems"))
     {
         for (var i = 0; i < powerShunt.PowerSystems.Length; ++i)
         {
             PowerSystemAttributes powerSystem = powerShunt.PowerSystems[i];
             using (BeginScope(i.ToString()))
             {
                 Print($"type: {powerSystem.PowerSystemType}");
                 Print($"startingPowerLevelIndex: {powerSystem.StartingPowerLevelIndex}");
                 Print($"startingMaxPowerLevelIndex: {powerSystem.StartingMaxPowerLevelIndex}");
                 using (BeginScope("powerLevels"))
                 {
                     for (var j = 0; j < powerSystem.PowerLevels.Length; ++j)
                     {
                         PowerLevelAttributes powerLevel = powerSystem.PowerLevels[j];
                         using (BeginScope(j.ToString()))
                         {
                             Print($"powerUnitsRequired: {powerLevel.PowerUnitsRequired}");
                             Print($"heatPointsProvided: {powerLevel.HeatPointsProvided}");
                             using (BeginScope("statusEffects"))
                             {
                                 if (powerLevel.StatusEffectsToApply != null)
                                 {
                                     for (var k = 0; k < powerLevel.StatusEffectsToApply.Length; ++k)
                                     {
                                         using (BeginScope(powerLevel.StatusEffectsToApply[k].Name))
                                         {
                                             OutputForStatusEffect(powerLevel.StatusEffectsToApply[k]);
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
        protected void OutputForCarrier(EntityTypeCollection entityTypeCollection, EntityTypeAttributes entityTypeAttributes, StatsSheetSettings.UnitSetting unitSetting = null)
        {
            UnitAttributes unitAttributes = entityTypeAttributes.Get <UnitAttributes>();

            if (unitAttributes == null)
            {
                return;
            }

            using (BeginScope(entityTypeAttributes.Name))
            {
                // Unit Attributes
                Print($"readableName: {unitSetting.readableName}");
                Print($"cu: {unitAttributes.Resource1Cost}");
                Print($"ru: {unitAttributes.Resource2Cost}");
                Print($"time: {unitAttributes.ProductionTime}");
                Print($"pop: {unitAttributes.PopCapCost}");
                Print($"hp: {unitAttributes.MaxHealth}");
                Print($"armor: {unitAttributes.Armour}");
                Print($"sensor: {unitAttributes.SensorRadius}");

                // Power Shunt Attributes
                PowerShuntAttributes powerShunt = entityTypeAttributes.Get <PowerShuntAttributes>();
                if (powerShunt != null)
                {
                    OutputForPowerShuntAttributes(powerShunt);
                }
            }
        }
 public PowerShuntAttributesWrapper(PowerShuntAttributes other) : base(other.Name)
 {
     PowerLevelChargeTimeSeconds = other.PowerLevelChargeTimeSeconds;
     PowerLevelDrainTimeSeconds  = other.PowerLevelDrainTimeSeconds;
     HeatThreshold             = other.HeatThreshold;
     CooldownRate              = other.CooldownRate;
     OverheatDamage            = other.OverheatDamage;
     NearOverheatWarningMargin = other.NearOverheatWarningMargin;
     OverheatReminderPeriod    = other.OverheatReminderPeriod;
     PowerSystems              = other.PowerSystems?.ToArray();
     ReservePowerPool          = other.ReservePowerPool;
     OverheatingPool           = other.OverheatingPool;
     HeatSystem = other.HeatSystem;
     View       = other.View;
 }