Beispiel #1
0
 protected void OutputForHarvesterAttributes(HarvesterAttributes harvester)
 {
     using (BeginScope("harvester"))
     {
         Print($"autoReturnToDepositOnArtifactPickup: {harvester.AutoReturnToDepositOnArtifactPickup}");
         Print($"closestResourceControllerHysteresisDistance: {harvester.ClosestResourceControllerHysteresisDistance}");
         Print($"maxDropOffRange: {harvester.MaxDropOffRange}");
         Print($"salvageDistance: {harvester.SalvageDistance}");
         if (harvester.SalvageCycles.Length > 0)
         {
             using (BeginScope("salvageCycles"))
             {
                 for (int i = 0; i < harvester.SalvageCycles.Length; ++i)
                 {
                     using (BeginScope())
                     {
                         SalvageCycle cycle = harvester.SalvageCycles[i];
                         Print($"resourceType: {cycle.ResourceType}");
                         Print($"cycleDuration: {cycle.CycleDuration}");
                         Print($"resourcesExtractedPerCycle: {cycle.ResourcesExtractedPerCycle}");
                         Print($"resourcesLoadedPerCycle: {cycle.ResourcesLoadedPerCycle}");
                     }
                 }
             }
         }
     }
 }
Beispiel #2
0
 public HarvesterAttributesWrapper(HarvesterAttributes other)
 {
     SalvageDistance = other.SalvageDistance;
     MaxDropOffRange = other.MaxDropOffRange;
     ClosestResourceControllerHysteresisDistance = other.ClosestResourceControllerHysteresisDistance;
     AutoReturnToDepositOnArtifactPickup         = other.AutoReturnToDepositOnArtifactPickup;
     SalvageCycles = other.SalvageCycles?.ToArray();
 }
Beispiel #3
0
        protected void OutputForGeneral(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}");
                Print($"contact: {unitAttributes.ContactRadius}");
                Print($"xp: {unitAttributes.ExperienceValue}");
                Print($"priorityAsTarget: {unitAttributes.PriorityAsTarget}");

                // Movement Attributes
                UnitMovementAttributes movement = entityTypeAttributes.Get <UnitMovementAttributes>();
                if (movement != null)
                {
                    OutputForMovementAttributes(movement);
                }

                // Harvester Attributes
                HarvesterAttributes harvester = entityTypeAttributes.Get <HarvesterAttributes>();
                if (harvester != null)
                {
                    OutputForHarvesterAttributes(harvester);
                }

                // Weapons
                if (unitAttributes.WeaponLoadout.Length > 0 && (unitSetting.weapons == null || unitSetting.weapons.Length > 0))
                {
                    OutputForWeapons(entityTypeCollection, entityTypeAttributes, unitSetting.weapons);
                }
            }
        }