示例#1
0
        private List <ThingStuffPairWithQuality> GeneratePossibleDefs(ThingSetMakerParams parms, out float totalMarketValue)
        {
            IEnumerable <ThingDef> enumerable = AllowedThingDefs(parms);

            if (!enumerable.Any())
            {
                totalMarketValue = 0f;
                return(new List <ThingStuffPairWithQuality>());
            }
            TechLevel?       techLevel             = parms.techLevel;
            TechLevel        techLevel2            = techLevel.HasValue ? techLevel.Value : TechLevel.Undefined;
            IntRange?        countRange            = parms.countRange;
            IntRange         intRange              = (!countRange.HasValue) ? new IntRange(1, 2147483647) : countRange.Value;
            FloatRange?      totalMarketValueRange = parms.totalMarketValueRange;
            FloatRange       floatRange            = (!totalMarketValueRange.HasValue) ? FloatRange.Zero : totalMarketValueRange.Value;
            float?           maxTotalMass          = parms.maxTotalMass;
            float            num = (!maxTotalMass.HasValue) ? 3.40282347E+38f : maxTotalMass.Value;
            QualityGenerator?qualityGenerator  = parms.qualityGenerator;
            QualityGenerator qualityGenerator2 = qualityGenerator.HasValue ? qualityGenerator.Value : QualityGenerator.BaseGen;

            totalMarketValue = floatRange.RandomInRange;
            IntRange countRange2               = intRange;
            float    totalValue                = totalMarketValue;
            IEnumerable <ThingDef> allowed     = enumerable;
            TechLevel        techLevel3        = techLevel2;
            QualityGenerator qualityGenerator3 = qualityGenerator2;
            Func <ThingStuffPairWithQuality, float> getMinValue = GetMinValue;
            Func <ThingStuffPairWithQuality, float> getMaxValue = GetMaxValue;
            float maxMass = num;

            return(ThingSetMakerByTotalStatUtility.GenerateDefsWithPossibleTotalValue(countRange2, totalValue, allowed, techLevel3, qualityGenerator3, getMinValue, getMaxValue, null, 100, maxMass));
        }
示例#2
0
 public RocketTakeoff(RocketTakeoff reference, VehiclePawn vehicle) : base(reference, vehicle)
 {
     rocketTiltRate = reference.rocketTiltRate;
     thrusterSize   = reference.thrusterSize;
     dustSize       = reference.dustSize;
     burnRadius     = reference.burnRadius;
 }
        private List <ThingStuffPairWithQuality> GeneratePossibleDefs(ThingSetMakerParams parms, out float totalMarketValue)
        {
            IEnumerable <ThingDef> enumerable = this.AllowedThingDefs(parms);

            if (!enumerable.Any <ThingDef>())
            {
                totalMarketValue = 0f;
                return(new List <ThingStuffPairWithQuality>());
            }
            TechLevel?       techLevel             = parms.techLevel;
            TechLevel        techLevel2            = (techLevel == null) ? TechLevel.Undefined : techLevel.Value;
            IntRange?        countRange            = parms.countRange;
            IntRange         intRange              = (countRange == null) ? new IntRange(1, int.MaxValue) : countRange.Value;
            FloatRange?      totalMarketValueRange = parms.totalMarketValueRange;
            FloatRange       floatRange            = (totalMarketValueRange == null) ? FloatRange.Zero : totalMarketValueRange.Value;
            float?           maxTotalMass          = parms.maxTotalMass;
            float            num = (maxTotalMass == null) ? float.MaxValue : maxTotalMass.Value;
            QualityGenerator?qualityGenerator  = parms.qualityGenerator;
            QualityGenerator qualityGenerator2 = (qualityGenerator == null) ? QualityGenerator.BaseGen : qualityGenerator.Value;

            totalMarketValue = floatRange.RandomInRange;
            IntRange countRange2               = intRange;
            float    totalValue                = totalMarketValue;
            IEnumerable <ThingDef> allowed     = enumerable;
            TechLevel        techLevel3        = techLevel2;
            QualityGenerator qualityGenerator3 = qualityGenerator2;
            Func <ThingStuffPairWithQuality, float> getMinValue = new Func <ThingStuffPairWithQuality, float>(this.GetMinValue);
            Func <ThingStuffPairWithQuality, float> getMaxValue = new Func <ThingStuffPairWithQuality, float>(this.GetMaxValue);
            float maxMass = num;

            return(ThingSetMakerByTotalStatUtility.GenerateDefsWithPossibleTotalValue(countRange2, totalValue, allowed, techLevel3, qualityGenerator3, getMinValue, getMaxValue, null, 100, maxMass));
        }
        public void SerializeThenDeserialize_WithValidArguments_RoundTrips(FloatRange expectedResult)
        {
            FloatRange?actualResult = SerializeThenDeserialize(FloatRangeFormatter.Instance, expectedResult);

            Assert.NotNull(actualResult);
            Assert.Equal(expectedResult, actualResult);
            Assert.Equal(expectedResult.OriginalReleasePrefix, actualResult !.OriginalReleasePrefix);
        }
        protected override VersionRange?DeserializeCore(ref MessagePackReader reader, MessagePackSerializerOptions options)
        {
            FloatRange?  floatRange     = null;
            bool?        isMaxInclusive = null;
            bool?        isMinInclusive = null;
            NuGetVersion?maxVersion     = null;
            NuGetVersion?minVersion     = null;
            string?      originalString = null;

            int propertyCount = reader.ReadMapHeader();

            for (var propertyIndex = 0; propertyIndex < propertyCount; ++propertyIndex)
            {
                switch (reader.ReadString())
                {
                case FloatRangePropertyName:
                    floatRange = FloatRangeFormatter.Instance.Deserialize(ref reader, options);
                    break;

                case IsMaxInclusivePropertyName:
                    isMaxInclusive = reader.ReadBoolean();
                    break;

                case IsMinInclusivePropertyName:
                    isMinInclusive = reader.ReadBoolean();
                    break;

                case MaxVersionPropertyName:
                    maxVersion = NuGetVersionFormatter.Instance.Deserialize(ref reader, options);
                    break;

                case MinVersionPropertyName:
                    minVersion = NuGetVersionFormatter.Instance.Deserialize(ref reader, options);
                    break;

                case OriginalStringPropertyName:
                    originalString = reader.ReadString();
                    break;

                default:
                    reader.Skip();
                    break;
                }
            }

            Assumes.True(isMinInclusive.HasValue);
            Assumes.True(isMaxInclusive.HasValue);

            return(new VersionRange(
                       minVersion,
                       isMinInclusive.Value,
                       maxVersion,
                       isMaxInclusive.Value,
                       floatRange,
                       originalString));
        }
示例#6
0
        public override void DrawStatLister(VehicleDef def, Listing_Settings lister, SaveableField field, float value)
        {
            FloatRange?range = settingListerRange;

            if (range is null)
            {
                range = new FloatRange(-value, value);
            }
            lister.FloatBox(def, field, "VehicleCargoCapacity".Translate(), "VehicleCargoCapacityTooltip".Translate(), string.Empty, value + range.Value.min, value + range.Value.max);
        }
示例#7
0
        public override void DrawStatLister(VehicleDef def, Listing_Settings lister, SaveableField field, float value)
        {
            FloatRange?range = settingListerRange;

            if (range is null)
            {
                range = new FloatRange(-value, value);
            }
            lister.SliderLabeled(def, field, "VehicleMaxArmor".Translate(), "VehicleMaxArmorTooltip".Translate(), string.Empty, string.Empty, value + range.Value.min, value + range.Value.max, 1);
        }
示例#8
0
        protected override bool CanGenerateSub(ThingSetMakerParams parms)
        {
            if (!AllowedThingDefs(parms).Any())
            {
                return(false);
            }
            IntRange?countRange = parms.countRange;

            if (countRange.HasValue)
            {
                IntRange value = parms.countRange.Value;
                if (value.max <= 0)
                {
                    return(false);
                }
            }
            FloatRange?totalNutritionRange = parms.totalNutritionRange;

            if (totalNutritionRange.HasValue)
            {
                FloatRange value2 = parms.totalNutritionRange.Value;
                if (!(value2.max <= 0f))
                {
                    float?maxTotalMass = parms.maxTotalMass;
                    if (maxTotalMass.HasValue && parms.maxTotalMass != 3.40282347E+38f)
                    {
                        IEnumerable <ThingDef> candidates = AllowedThingDefs(parms);
                        TechLevel?techLevel      = parms.techLevel;
                        TechLevel stuffTechLevel = techLevel.HasValue ? techLevel.Value : TechLevel.Undefined;
                        float     value3         = parms.maxTotalMass.Value;
                        IntRange? countRange2    = parms.countRange;
                        int       count;
                        if (countRange2.HasValue)
                        {
                            IntRange value4 = parms.countRange.Value;
                            count = value4.min;
                        }
                        else
                        {
                            count = 1;
                        }
                        if (!ThingSetMakerUtility.PossibleToWeighNoMoreThan(candidates, stuffTechLevel, value3, count))
                        {
                            return(false);
                        }
                    }
                    if (!GeneratePossibleDefs(parms, out float _, nextSeed).Any())
                    {
                        return(false);
                    }
                    return(true);
                }
            }
            return(false);
        }
示例#9
0
        protected override void Generate(ThingSetMakerParams parms, List <Thing> outThings)
        {
            int   num  = 0;
            float num2 = 0f;
            float num3 = 0f;
            float num4 = 0f;

            this.optionsInRandomOrder.Clear();
            this.optionsInRandomOrder.AddRange(this.options);
            this.optionsInRandomOrder.Shuffle <ThingSetMaker_Sum.Option>();
            for (int i = 0; i < this.optionsInRandomOrder.Count; i++)
            {
                ThingSetMakerParams parms2     = parms;
                IntRange?           countRange = parms2.countRange;
                if (countRange.HasValue)
                {
                    parms2.countRange = new IntRange?(new IntRange(parms2.countRange.Value.min, parms2.countRange.Value.max - num));
                }
                FloatRange?totalMarketValueRange = parms2.totalMarketValueRange;
                if (totalMarketValueRange.HasValue)
                {
                    parms2.totalMarketValueRange = new FloatRange?(new FloatRange(parms2.totalMarketValueRange.Value.min, parms2.totalMarketValueRange.Value.max - num2));
                }
                FloatRange?totalNutritionRange = parms2.totalNutritionRange;
                if (totalNutritionRange.HasValue)
                {
                    parms2.totalNutritionRange = new FloatRange?(new FloatRange(parms2.totalNutritionRange.Value.min, parms2.totalNutritionRange.Value.max - num3));
                }
                float?maxTotalMass = parms2.maxTotalMass;
                if (maxTotalMass.HasValue)
                {
                    float?maxTotalMass2 = parms2.maxTotalMass;
                    parms2.maxTotalMass = ((!maxTotalMass2.HasValue) ? null : new float?(maxTotalMass2.GetValueOrDefault() - num4));
                }
                if (Rand.Chance(this.optionsInRandomOrder[i].chance) && this.optionsInRandomOrder[i].thingSetMaker.CanGenerate(parms2))
                {
                    List <Thing> list = this.optionsInRandomOrder[i].thingSetMaker.Generate(parms2);
                    num += list.Count;
                    for (int j = 0; j < list.Count; j++)
                    {
                        num2 += list[j].MarketValue * (float)list[j].stackCount;
                        if (list[j].def.IsIngestible)
                        {
                            num3 += list[j].GetStatValue(StatDefOf.Nutrition, true) * (float)list[j].stackCount;
                        }
                        if (!(list[j] is Pawn))
                        {
                            num4 += list[j].GetStatValue(StatDefOf.Mass, true) * (float)list[j].stackCount;
                        }
                    }
                    outThings.AddRange(list);
                }
            }
        }
示例#10
0
        protected override bool Condition(ThingSetMakerParams parms)
        {
            FloatRange?totalMarketValueRange = parms.totalMarketValueRange;
            int        result;

            if (totalMarketValueRange.HasValue)
            {
                FloatRange value = parms.totalMarketValueRange.Value;
                result = ((value.max >= minMaxTotalMarketValue) ? 1 : 0);
            }
            else
            {
                result = 0;
            }
            return((byte)result != 0);
        }
        protected override bool CanGenerateSub(ThingSetMakerParams parms)
        {
            bool result;

            if (!this.AllowedThingDefs(parms).Any <ThingDef>())
            {
                result = false;
            }
            else
            {
                IntRange?countRange = parms.countRange;
                if (countRange != null && parms.countRange.Value.max <= 0)
                {
                    result = false;
                }
                else
                {
                    FloatRange?totalMarketValueRange = parms.totalMarketValueRange;
                    if (totalMarketValueRange == null || parms.totalMarketValueRange.Value.max <= 0f)
                    {
                        result = false;
                    }
                    else
                    {
                        float?maxTotalMass = parms.maxTotalMass;
                        if (maxTotalMass != null && parms.maxTotalMass != 3.40282347E+38f)
                        {
                            IEnumerable <ThingDef> candidates = this.AllowedThingDefs(parms);
                            TechLevel?techLevel      = parms.techLevel;
                            TechLevel stuffTechLevel = (techLevel == null) ? TechLevel.Undefined : techLevel.Value;
                            float     value          = parms.maxTotalMass.Value;
                            IntRange? countRange2    = parms.countRange;
                            if (!ThingSetMakerUtility.PossibleToWeighNoMoreThan(candidates, stuffTechLevel, value, (countRange2 == null) ? 1 : parms.countRange.Value.min))
                            {
                                return(false);
                            }
                        }
                        float num;
                        result = this.GeneratePossibleDefs(parms, out num, this.nextSeed).Any <ThingStuffPairWithQuality>();
                    }
                }
            }
            return(result);
        }
示例#12
0
        protected override IEnumerable <ThingDef> AllGeneratableThingsDebugSub(ThingSetMakerParams parms)
        {
            TechLevel?techLevel2 = parms.techLevel;
            TechLevel techLevel  = techLevel2.HasValue ? techLevel2.Value : TechLevel.Undefined;

            foreach (ThingDef item in AllowedThingDefs(parms))
            {
                float?maxTotalMass = parms.maxTotalMass;
                if (maxTotalMass.HasValue && parms.maxTotalMass != 3.40282347E+38f)
                {
                    float?maxTotalMass2 = parms.maxTotalMass;
                    if (maxTotalMass2.HasValue && ThingSetMakerUtility.GetMinMass(item, techLevel) > maxTotalMass2.GetValueOrDefault())
                    {
                        continue;
                    }
                }
                FloatRange?totalNutritionRange = parms.totalNutritionRange;
                if (totalNutritionRange.HasValue)
                {
                    FloatRange value = parms.totalNutritionRange.Value;
                    if (value.max != 3.40282347E+38f && item.IsNutritionGivingIngestible)
                    {
                        float      cachedNutrition = item.ingestible.CachedNutrition;
                        FloatRange value2          = parms.totalNutritionRange.Value;
                        if (cachedNutrition > value2.max)
                        {
                            continue;
                        }
                    }
                }
                yield return(item);

                /*Error: Unable to find new state assignment for yield return*/;
            }
            yield break;
IL_01ee:
            /*Error near IL_01ef: Unexpected return in MoveNext()*/;
        }
		private List<ThingStuffPairWithQuality> GeneratePossibleDefs(ThingSetMakerParams parms, out float totalNutrition)
		{
			IEnumerable<ThingDef> enumerable = this.AllowedThingDefs(parms);
			List<ThingStuffPairWithQuality> result;
			if (!enumerable.Any<ThingDef>())
			{
				totalNutrition = 0f;
				result = new List<ThingStuffPairWithQuality>();
			}
			else
			{
				IntRange? countRange = parms.countRange;
				IntRange intRange = (countRange == null) ? new IntRange(1, int.MaxValue) : countRange.Value;
				FloatRange? totalNutritionRange = parms.totalNutritionRange;
				FloatRange floatRange = (totalNutritionRange == null) ? FloatRange.Zero : totalNutritionRange.Value;
				TechLevel? techLevel = parms.techLevel;
				TechLevel techLevel2 = (techLevel == null) ? TechLevel.Undefined : techLevel.Value;
				float? maxTotalMass = parms.maxTotalMass;
				float num = (maxTotalMass == null) ? float.MaxValue : maxTotalMass.Value;
				QualityGenerator? qualityGenerator = parms.qualityGenerator;
				QualityGenerator qualityGenerator2 = (qualityGenerator == null) ? QualityGenerator.BaseGen : qualityGenerator.Value;
				totalNutrition = floatRange.RandomInRange;
				int numMeats = enumerable.Count((ThingDef x) => x.IsMeat);
				int numLeathers = enumerable.Count((ThingDef x) => x.IsLeather);
				Func<ThingDef, float> func = (ThingDef x) => ThingSetMakerUtility.AdjustedBigCategoriesSelectionWeight(x, numMeats, numLeathers);
				IntRange countRange2 = intRange;
				float totalValue = totalNutrition;
				IEnumerable<ThingDef> allowed = enumerable;
				TechLevel techLevel3 = techLevel2;
				QualityGenerator qualityGenerator3 = qualityGenerator2;
				Func<ThingStuffPairWithQuality, float> getMinValue = (ThingStuffPairWithQuality x) => x.GetStatValue(StatDefOf.Nutrition);
				Func<ThingStuffPairWithQuality, float> getMaxValue = (ThingStuffPairWithQuality x) => x.GetStatValue(StatDefOf.Nutrition) * (float)x.thing.stackLimit;
				Func<ThingDef, float> weightSelector = func;
				float maxMass = num;
				result = ThingSetMakerByTotalStatUtility.GenerateDefsWithPossibleTotalValue(countRange2, totalValue, allowed, techLevel3, qualityGenerator3, getMinValue, getMaxValue, weightSelector, 100, maxMass);
			}
			return result;
		}
示例#14
0
        protected override IEnumerable <ThingDef> AllGeneratableThingsDebugSub(ThingSetMakerParams parms)
        {
            TechLevel?techLevel2 = parms.techLevel;
            TechLevel techLevel  = (!techLevel2.HasValue) ? TechLevel.Undefined : techLevel2.Value;

            foreach (ThingDef t in this.AllowedThingDefs(parms))
            {
                float?maxTotalMass = parms.maxTotalMass;
                if (maxTotalMass.HasValue && parms.maxTotalMass != 3.40282347E+38f)
                {
                    float?maxTotalMass2 = parms.maxTotalMass;
                    if (ThingSetMakerUtility.GetMinMass(t, techLevel) > maxTotalMass2)
                    {
                        continue;
                    }
                }
                FloatRange?totalMarketValueRange = parms.totalMarketValueRange;
                if (!totalMarketValueRange.HasValue || parms.totalMarketValueRange.Value.max == 3.40282347E+38f || ThingSetMakerUtility.GetMinMarketValue(t, techLevel) <= parms.totalMarketValueRange.Value.max)
                {
                    yield return(t);
                }
            }
        }
		protected override IEnumerable<ThingDef> AllGeneratableThingsDebugSub(ThingSetMakerParams parms)
		{
			TechLevel? techLevel2 = parms.techLevel;
			TechLevel techLevel = (techLevel2 == null) ? TechLevel.Undefined : techLevel2.Value;
			foreach (ThingDef t in this.AllowedThingDefs(parms))
			{
				float? maxTotalMass = parms.maxTotalMass;
				if (maxTotalMass != null && parms.maxTotalMass != 3.40282347E+38f)
				{
					float? maxTotalMass2 = parms.maxTotalMass;
					if (ThingSetMakerUtility.GetMinMass(t, techLevel) > maxTotalMass2)
					{
						continue;
					}
				}
				FloatRange? totalNutritionRange = parms.totalNutritionRange;
				if (totalNutritionRange == null || parms.totalNutritionRange.Value.max == 3.40282347E+38f || !t.IsNutritionGivingIngestible || t.ingestible.CachedNutrition <= parms.totalNutritionRange.Value.max)
				{
					yield return t;
				}
			}
			yield break;
		}
示例#16
0
        protected override bool CanGenerateSub(ThingSetMakerParams parms)
        {
            if (!this.AllowedThingDefs(parms).Any <ThingDef>())
            {
                return(false);
            }
            IntRange?countRange = parms.countRange;

            if (countRange.HasValue && parms.countRange.Value.max <= 0)
            {
                return(false);
            }
            FloatRange?totalMarketValueRange = parms.totalMarketValueRange;

            if (!totalMarketValueRange.HasValue || parms.totalMarketValueRange.Value.max <= 0f)
            {
                return(false);
            }
            float?maxTotalMass = parms.maxTotalMass;

            if (maxTotalMass.HasValue && parms.maxTotalMass != 3.40282347E+38f)
            {
                IEnumerable <ThingDef> arg_11D_0 = this.AllowedThingDefs(parms);
                TechLevel?techLevel   = parms.techLevel;
                TechLevel arg_11D_1   = (!techLevel.HasValue) ? TechLevel.Undefined : techLevel.Value;
                float     arg_11D_2   = parms.maxTotalMass.Value;
                IntRange? countRange2 = parms.countRange;
                if (!ThingSetMakerUtility.PossibleToWeighNoMoreThan(arg_11D_0, arg_11D_1, arg_11D_2, (!countRange2.HasValue) ? 1 : parms.countRange.Value.min))
                {
                    return(false);
                }
            }
            float num;

            return(this.GeneratePossibleDefs(parms, out num, this.nextSeed).Any <ThingStuffPairWithQuality>());
        }
            public bool MoveNext()
            {
                uint num = (uint)this.$PC;

                this.$PC = -1;
                bool flag = false;

                switch (num)
                {
                case 0u:
                {
                    TechLevel?techLevel2 = parms.techLevel;
                    techLevel  = ((techLevel2 == null) ? TechLevel.Undefined : techLevel2.Value);
                    enumerator = this.AllowedThingDefs(parms).GetEnumerator();
                    num        = 4294967293u;
                    break;
                }

                case 1u:
                    break;

                default:
                    return(false);
                }
                try
                {
                    switch (num)
                    {
                    }
                    while (enumerator.MoveNext())
                    {
                        t = enumerator.Current;
                        float?maxTotalMass = parms.maxTotalMass;
                        if (maxTotalMass != null && parms.maxTotalMass != 3.40282347E+38f)
                        {
                            float?maxTotalMass2 = parms.maxTotalMass;
                            if (ThingSetMakerUtility.GetMinMass(t, techLevel) > maxTotalMass2)
                            {
                                continue;
                            }
                        }
                        FloatRange?totalMarketValueRange = parms.totalMarketValueRange;
                        if (totalMarketValueRange == null || parms.totalMarketValueRange.Value.max == 3.40282347E+38f || ThingSetMakerUtility.GetMinMarketValue(t, techLevel) <= parms.totalMarketValueRange.Value.max)
                        {
                            this.$current = t;
                            if (!this.$disposing)
                            {
                                this.$PC = 1;
                            }
                            flag = true;
                            return(true);
                        }
                    }
                }
                finally
                {
                    if (!flag)
                    {
                        if (enumerator != null)
                        {
                            enumerator.Dispose();
                        }
                    }
                }
                this.$PC = -1;
                return(false);
            }
示例#18
0
        public override string ToString()
        {
            object[] array = new object[114];
            array[0] = "rect=";
            array[1] = this.rect;
            array[2] = ", faction=";
            array[3] = ((this.faction == null) ? "null" : this.faction.ToString());
            array[4] = ", custom=";
            array[5] = ((this.custom == null) ? "null" : this.custom.Count.ToString());
            array[6] = ", ancientTempleEntranceHeight=";
            int num  = 7;
            int?num2 = this.ancientTempleEntranceHeight;

            array[num] = ((num2 == null) ? "null" : this.ancientTempleEntranceHeight.ToString());
            array[8]   = ", pawnGroupMakerParams=";
            array[9]   = ((this.pawnGroupMakerParams == null) ? "null" : this.pawnGroupMakerParams.ToString());
            array[10]  = ", pawnGroupKindDef=";
            array[11]  = ((this.pawnGroupKindDef == null) ? "null" : this.pawnGroupKindDef.ToString());
            array[12]  = ", roofDef=";
            array[13]  = ((this.roofDef == null) ? "null" : this.roofDef.ToString());
            array[14]  = ", noRoof=";
            int  num3 = 15;
            bool?flag = this.noRoof;

            array[num3] = ((flag == null) ? "null" : this.noRoof.ToString());
            array[16]   = ", addRoomCenterToRootsToUnfog=";
            int  num4  = 17;
            bool?flag2 = this.addRoomCenterToRootsToUnfog;

            array[num4] = ((flag2 == null) ? "null" : this.addRoomCenterToRootsToUnfog.ToString());
            array[18]   = ", singleThingToSpawn=";
            array[19]   = ((this.singleThingToSpawn == null) ? "null" : this.singleThingToSpawn.ToString());
            array[20]   = ", singleThingDef=";
            array[21]   = ((this.singleThingDef == null) ? "null" : this.singleThingDef.ToString());
            array[22]   = ", singleThingStuff=";
            array[23]   = ((this.singleThingStuff == null) ? "null" : this.singleThingStuff.ToString());
            array[24]   = ", singleThingStackCount=";
            int num5 = 25;
            int?num6 = this.singleThingStackCount;

            array[num5] = ((num6 == null) ? "null" : this.singleThingStackCount.ToString());
            array[26]   = ", skipSingleThingIfHasToWipeBuildingOrDoesntFit=";
            int  num7  = 27;
            bool?flag3 = this.skipSingleThingIfHasToWipeBuildingOrDoesntFit;

            array[num7] = ((flag3 == null) ? "null" : this.skipSingleThingIfHasToWipeBuildingOrDoesntFit.ToString());
            array[28]   = ", spawnBridgeIfTerrainCantSupportThing=";
            int  num8  = 29;
            bool?flag4 = this.spawnBridgeIfTerrainCantSupportThing;

            array[num8] = ((flag4 == null) ? "null" : this.spawnBridgeIfTerrainCantSupportThing.ToString());
            array[30]   = ", singlePawnToSpawn=";
            array[31]   = ((this.singlePawnToSpawn == null) ? "null" : this.singlePawnToSpawn.ToString());
            array[32]   = ", singlePawnKindDef=";
            array[33]   = ((this.singlePawnKindDef == null) ? "null" : this.singlePawnKindDef.ToString());
            array[34]   = ", disableSinglePawn=";
            int  num9  = 35;
            bool?flag5 = this.disableSinglePawn;

            array[num9] = ((flag5 == null) ? "null" : this.disableSinglePawn.ToString());
            array[36]   = ", singlePawnLord=";
            array[37]   = ((this.singlePawnLord == null) ? "null" : this.singlePawnLord.ToString());
            array[38]   = ", singlePawnSpawnCellExtraPredicate=";
            array[39]   = ((this.singlePawnSpawnCellExtraPredicate == null) ? "null" : this.singlePawnSpawnCellExtraPredicate.ToString());
            array[40]   = ", singlePawnGenerationRequest=";
            int num10 = 41;
            PawnGenerationRequest?pawnGenerationRequest = this.singlePawnGenerationRequest;

            array[num10] = ((pawnGenerationRequest == null) ? "null" : this.singlePawnGenerationRequest.ToString());
            array[42]    = ", postThingSpawn=";
            array[43]    = ((this.postThingSpawn == null) ? "null" : this.postThingSpawn.ToString());
            array[44]    = ", postThingGenerate=";
            array[45]    = ((this.postThingGenerate == null) ? "null" : this.postThingGenerate.ToString());
            array[46]    = ", mechanoidsCount=";
            int num11 = 47;
            int?num12 = this.mechanoidsCount;

            array[num11] = ((num12 == null) ? "null" : this.mechanoidsCount.ToString());
            array[48]    = ", hivesCount=";
            int num13 = 49;
            int?num14 = this.hivesCount;

            array[num13] = ((num14 == null) ? "null" : this.hivesCount.ToString());
            array[50]    = ", disableHives=";
            int  num15 = 51;
            bool?flag6 = this.disableHives;

            array[num15] = ((flag6 == null) ? "null" : this.disableHives.ToString());
            array[52]    = ", thingRot=";
            int  num16 = 53;
            Rot4?rot   = this.thingRot;

            array[num16] = ((rot == null) ? "null" : this.thingRot.ToString());
            array[54]    = ", wallStuff=";
            array[55]    = ((this.wallStuff == null) ? "null" : this.wallStuff.ToString());
            array[56]    = ", chanceToSkipWallBlock=";
            int   num17 = 57;
            float?num18 = this.chanceToSkipWallBlock;

            array[num17] = ((num18 == null) ? "null" : this.chanceToSkipWallBlock.ToString());
            array[58]    = ", floorDef=";
            array[59]    = ((this.floorDef == null) ? "null" : this.floorDef.ToString());
            array[60]    = ", chanceToSkipFloor=";
            int   num19 = 61;
            float?num20 = this.chanceToSkipFloor;

            array[num19] = ((num20 == null) ? "null" : this.chanceToSkipFloor.ToString());
            array[62]    = ", filthDef=";
            array[63]    = ((this.filthDef == null) ? "null" : this.filthDef.ToString());
            array[64]    = ", filthDensity=";
            int        num21      = 65;
            FloatRange?floatRange = this.filthDensity;

            array[num21] = ((floatRange == null) ? "null" : this.filthDensity.ToString());
            array[66]    = ", clearEdificeOnly=";
            int  num22 = 67;
            bool?flag7 = this.clearEdificeOnly;

            array[num22] = ((flag7 == null) ? "null" : this.clearEdificeOnly.ToString());
            array[68]    = ", clearFillageOnly=";
            int  num23 = 69;
            bool?flag8 = this.clearFillageOnly;

            array[num23] = ((flag8 == null) ? "null" : this.clearFillageOnly.ToString());
            array[70]    = ", clearRoof=";
            int  num24 = 71;
            bool?flag9 = this.clearRoof;

            array[num24] = ((flag9 == null) ? "null" : this.clearRoof.ToString());
            array[72]    = ", ancientCryptosleepCasketGroupID=";
            int num25 = 73;
            int?num26 = this.ancientCryptosleepCasketGroupID;

            array[num25] = ((num26 == null) ? "null" : this.ancientCryptosleepCasketGroupID.ToString());
            array[74]    = ", podContentsType=";
            int             num27           = 75;
            PodContentsType?podContentsType = this.podContentsType;

            array[num27] = ((podContentsType == null) ? "null" : this.podContentsType.ToString());
            array[76]    = ", thingSetMakerDef=";
            array[77]    = ((this.thingSetMakerDef == null) ? "null" : this.thingSetMakerDef.ToString());
            array[78]    = ", thingSetMakerParams=";
            int num28 = 79;
            ThingSetMakerParams?thingSetMakerParams = this.thingSetMakerParams;

            array[num28] = ((thingSetMakerParams == null) ? "null" : this.thingSetMakerParams.ToString());
            array[80]    = ", stockpileConcreteContents=";
            array[81]    = ((this.stockpileConcreteContents == null) ? "null" : this.stockpileConcreteContents.Count.ToString());
            array[82]    = ", stockpileMarketValue=";
            int   num29 = 83;
            float?num30 = this.stockpileMarketValue;

            array[num29] = ((num30 == null) ? "null" : this.stockpileMarketValue.ToString());
            array[84]    = ", innerStockpileSize=";
            int num31 = 85;
            int?num32 = this.innerStockpileSize;

            array[num31] = ((num32 == null) ? "null" : this.innerStockpileSize.ToString());
            array[86]    = ", edgeDefenseWidth=";
            int num33 = 87;
            int?num34 = this.edgeDefenseWidth;

            array[num33] = ((num34 == null) ? "null" : this.edgeDefenseWidth.ToString());
            array[88]    = ", edgeDefenseTurretsCount=";
            int num35 = 89;
            int?num36 = this.edgeDefenseTurretsCount;

            array[num35] = ((num36 == null) ? "null" : this.edgeDefenseTurretsCount.ToString());
            array[90]    = ", edgeDefenseMortarsCount=";
            int num37 = 91;
            int?num38 = this.edgeDefenseMortarsCount;

            array[num37] = ((num38 == null) ? "null" : this.edgeDefenseMortarsCount.ToString());
            array[92]    = ", edgeDefenseGuardsCount=";
            int num39 = 93;
            int?num40 = this.edgeDefenseGuardsCount;

            array[num39] = ((num40 == null) ? "null" : this.edgeDefenseGuardsCount.ToString());
            array[94]    = ", mortarDef=";
            array[95]    = ((this.mortarDef == null) ? "null" : this.mortarDef.ToString());
            array[96]    = ", pathwayFloorDef=";
            array[97]    = ((this.pathwayFloorDef == null) ? "null" : this.pathwayFloorDef.ToString());
            array[98]    = ", cultivatedPlantDef=";
            array[99]    = ((this.cultivatedPlantDef == null) ? "null" : this.cultivatedPlantDef.ToString());
            array[100]   = ", fillWithThingsPadding=";
            int num41 = 101;
            int?num42 = this.fillWithThingsPadding;

            array[num41] = ((num42 == null) ? "null" : this.fillWithThingsPadding.ToString());
            array[102]   = ", settlementPawnGroupPoints=";
            int   num43 = 103;
            float?num44 = this.settlementPawnGroupPoints;

            array[num43] = ((num44 == null) ? "null" : this.settlementPawnGroupPoints.ToString());
            array[104]   = ", settlementPawnGroupSeed=";
            int num45 = 105;
            int?num46 = this.settlementPawnGroupSeed;

            array[num45] = ((num46 == null) ? "null" : this.settlementPawnGroupSeed.ToString());
            array[106]   = ", streetHorizontal=";
            int  num47  = 107;
            bool?flag10 = this.streetHorizontal;

            array[num47] = ((flag10 == null) ? "null" : this.streetHorizontal.ToString());
            array[108]   = ", edgeThingAvoidOtherEdgeThings=";
            int  num48  = 109;
            bool?flag11 = this.edgeThingAvoidOtherEdgeThings;

            array[num48] = ((flag11 == null) ? "null" : this.edgeThingAvoidOtherEdgeThings.ToString());
            array[110]   = ", allowPlacementOffEdge=";
            int  num49  = 111;
            bool?flag12 = this.allowPlacementOffEdge;

            array[num49] = ((flag12 == null) ? "null" : this.allowPlacementOffEdge.ToString());
            array[112]   = ", thrustAxis=";
            int  num50 = 113;
            Rot4?rot2  = this.thrustAxis;

            array[num50] = ((rot2 == null) ? "null" : this.thrustAxis.ToString());
            return(string.Concat(array));
        }
示例#19
0
        protected override void Generate(ThingSetMakerParams parms, List <Thing> outThings)
        {
            int   num  = 0;
            float num2 = 0f;
            float num3 = 0f;
            float num4 = 0f;

            optionsInRandomOrder.Clear();
            optionsInRandomOrder.AddRange(options);
            optionsInRandomOrder.Shuffle();
            for (int i = 0; i < optionsInRandomOrder.Count; i++)
            {
                ThingSetMakerParams parms2     = parms;
                IntRange?           countRange = parms2.countRange;
                if (countRange.HasValue)
                {
                    IntRange value  = parms2.countRange.Value;
                    int      min    = value.min;
                    IntRange value2 = parms2.countRange.Value;
                    parms2.countRange = new IntRange(min, value2.max - num);
                }
                FloatRange?totalMarketValueRange = parms2.totalMarketValueRange;
                if (totalMarketValueRange.HasValue)
                {
                    FloatRange value3 = parms2.totalMarketValueRange.Value;
                    float      min2   = value3.min;
                    FloatRange value4 = parms2.totalMarketValueRange.Value;
                    parms2.totalMarketValueRange = new FloatRange(min2, value4.max - num2);
                }
                FloatRange?totalNutritionRange = parms2.totalNutritionRange;
                if (totalNutritionRange.HasValue)
                {
                    FloatRange value5 = parms2.totalNutritionRange.Value;
                    float      min3   = value5.min;
                    FloatRange value6 = parms2.totalNutritionRange.Value;
                    parms2.totalNutritionRange = new FloatRange(min3, value6.max - num3);
                }
                float?maxTotalMass = parms2.maxTotalMass;
                if (maxTotalMass.HasValue)
                {
                    parms2.maxTotalMass -= num4;
                }
                if (Rand.Chance(optionsInRandomOrder[i].chance) && optionsInRandomOrder[i].thingSetMaker.CanGenerate(parms2))
                {
                    List <Thing> list = optionsInRandomOrder[i].thingSetMaker.Generate(parms2);
                    num += list.Count;
                    for (int j = 0; j < list.Count; j++)
                    {
                        num2 += list[j].MarketValue * (float)list[j].stackCount;
                        if (list[j].def.IsIngestible)
                        {
                            num3 += list[j].GetStatValue(StatDefOf.Nutrition) * (float)list[j].stackCount;
                        }
                        if (!(list[j] is Pawn))
                        {
                            num4 += list[j].GetStatValue(StatDefOf.Mass) * (float)list[j].stackCount;
                        }
                    }
                    outThings.AddRange(list);
                }
            }
        }
        public VersionRange?Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options)
        {
            if (reader.TryReadNil())
            {
                return(null);
            }

            // stack overflow mitigation - see https://github.com/neuecc/MessagePack-CSharp/security/advisories/GHSA-7q36-4xx7-xcxf
            options.Security.DepthStep(ref reader);

            try
            {
                FloatRange?  floatRange     = null;
                bool?        isMaxInclusive = null;
                bool?        isMinInclusive = null;
                NuGetVersion?maxVersion     = null;
                NuGetVersion?minVersion     = null;
                string?      originalString = null;

                int propertyCount = reader.ReadMapHeader();

                for (var propertyIndex = 0; propertyIndex < propertyCount; ++propertyIndex)
                {
                    switch (reader.ReadString())
                    {
                    case FloatRangePropertyName:
                        floatRange = FloatRangeFormatter.Instance.Deserialize(ref reader, options);
                        break;

                    case IsMaxInclusivePropertyName:
                        isMaxInclusive = reader.ReadBoolean();
                        break;

                    case IsMinInclusivePropertyName:
                        isMinInclusive = reader.ReadBoolean();
                        break;

                    case MaxVersionPropertyName:
                        maxVersion = NuGetVersionFormatter.Instance.Deserialize(ref reader, options);
                        break;

                    case MinVersionPropertyName:
                        minVersion = NuGetVersionFormatter.Instance.Deserialize(ref reader, options);
                        break;

                    case OriginalStringPropertyName:
                        originalString = reader.ReadString();
                        break;

                    default:
                        reader.Skip();
                        break;
                    }
                }

                Assumes.True(isMinInclusive.HasValue);
                Assumes.True(isMaxInclusive.HasValue);

                return(new VersionRange(
                           minVersion,
                           isMinInclusive.Value,
                           maxVersion,
                           isMaxInclusive.Value,
                           floatRange,
                           originalString));
            }
            finally
            {
                // stack overflow mitigation - see https://github.com/neuecc/MessagePack-CSharp/security/advisories/GHSA-7q36-4xx7-xcxf
                reader.Depth--;
            }
        }
示例#21
0
        protected override bool Condition(ThingSetMakerParams parms)
        {
            FloatRange?totalMarketValueRange = parms.totalMarketValueRange;

            return(totalMarketValueRange != null && parms.totalMarketValueRange.Value.max >= this.minMaxTotalMarketValue);
        }
示例#22
0
 public NullableFloatRange(FloatRange?range) : base(range)
 {
 }
 public LightCondition(LightCondition copyMe)
 {
     requiresInside  = copyMe.requiresInside;
     requiresOutside = copyMe.requiresOutside;
     level           = copyMe.level;
 }
示例#24
0
        public override string ToString()
        {
            object[] obj = new object[116]
            {
                "rect=",
                rect,
                ", faction=",
                (faction == null) ? "null" : faction.ToString(),
                ", custom=",
                (custom == null) ? "null" : custom.Count.ToString(),
                ", ancientTempleEntranceHeight=",
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null
            };
            int?num = ancientTempleEntranceHeight;

            obj[7]  = ((!num.HasValue) ? "null" : ancientTempleEntranceHeight.ToString());
            obj[8]  = ", pawnGroupMakerParams=";
            obj[9]  = ((pawnGroupMakerParams == null) ? "null" : pawnGroupMakerParams.ToString());
            obj[10] = ", pawnGroupKindDef=";
            obj[11] = ((pawnGroupKindDef == null) ? "null" : pawnGroupKindDef.ToString());
            obj[12] = ", roofDef=";
            obj[13] = ((roofDef == null) ? "null" : roofDef.ToString());
            obj[14] = ", noRoof=";
            bool?flag = noRoof;

            obj[15] = ((!flag.HasValue) ? "null" : noRoof.ToString());
            obj[16] = ", addRoomCenterToRootsToUnfog=";
            bool?flag2 = addRoomCenterToRootsToUnfog;

            obj[17] = ((!flag2.HasValue) ? "null" : addRoomCenterToRootsToUnfog.ToString());
            obj[18] = ", singleThingToSpawn=";
            obj[19] = ((singleThingToSpawn == null) ? "null" : singleThingToSpawn.ToString());
            obj[20] = ", singleThingDef=";
            obj[21] = ((singleThingDef == null) ? "null" : singleThingDef.ToString());
            obj[22] = ", singleThingStuff=";
            obj[23] = ((singleThingStuff == null) ? "null" : singleThingStuff.ToString());
            obj[24] = ", singleThingStackCount=";
            int?num2 = singleThingStackCount;

            obj[25] = ((!num2.HasValue) ? "null" : singleThingStackCount.ToString());
            obj[26] = ", skipSingleThingIfHasToWipeBuildingOrDoesntFit=";
            bool?flag3 = skipSingleThingIfHasToWipeBuildingOrDoesntFit;

            obj[27] = ((!flag3.HasValue) ? "null" : skipSingleThingIfHasToWipeBuildingOrDoesntFit.ToString());
            obj[28] = ", spawnBridgeIfTerrainCantSupportThing=";
            bool?flag4 = spawnBridgeIfTerrainCantSupportThing;

            obj[29] = ((!flag4.HasValue) ? "null" : spawnBridgeIfTerrainCantSupportThing.ToString());
            obj[30] = ", singlePawnToSpawn=";
            obj[31] = ((singlePawnToSpawn == null) ? "null" : singlePawnToSpawn.ToString());
            obj[32] = ", singlePawnKindDef=";
            obj[33] = ((singlePawnKindDef == null) ? "null" : singlePawnKindDef.ToString());
            obj[34] = ", disableSinglePawn=";
            bool?flag5 = disableSinglePawn;

            obj[35] = ((!flag5.HasValue) ? "null" : disableSinglePawn.ToString());
            obj[36] = ", singlePawnLord=";
            obj[37] = ((singlePawnLord == null) ? "null" : singlePawnLord.ToString());
            obj[38] = ", singlePawnSpawnCellExtraPredicate=";
            obj[39] = ((singlePawnSpawnCellExtraPredicate == null) ? "null" : singlePawnSpawnCellExtraPredicate.ToString());
            obj[40] = ", singlePawnGenerationRequest=";
            PawnGenerationRequest?pawnGenerationRequest = singlePawnGenerationRequest;

            obj[41] = ((!pawnGenerationRequest.HasValue) ? "null" : singlePawnGenerationRequest.ToString());
            obj[42] = ", postThingSpawn=";
            obj[43] = ((postThingSpawn == null) ? "null" : postThingSpawn.ToString());
            obj[44] = ", postThingGenerate=";
            obj[45] = ((postThingGenerate == null) ? "null" : postThingGenerate.ToString());
            obj[46] = ", mechanoidsCount=";
            int?num3 = mechanoidsCount;

            obj[47] = ((!num3.HasValue) ? "null" : mechanoidsCount.ToString());
            obj[48] = ", hivesCount=";
            int?num4 = hivesCount;

            obj[49] = ((!num4.HasValue) ? "null" : hivesCount.ToString());
            obj[50] = ", disableHives=";
            bool?flag6 = disableHives;

            obj[51] = ((!flag6.HasValue) ? "null" : disableHives.ToString());
            obj[52] = ", thingRot=";
            Rot4?rot = thingRot;

            obj[53] = ((!rot.HasValue) ? "null" : thingRot.ToString());
            obj[54] = ", wallStuff=";
            obj[55] = ((wallStuff == null) ? "null" : wallStuff.ToString());
            obj[56] = ", chanceToSkipWallBlock=";
            float?num5 = chanceToSkipWallBlock;

            obj[57] = ((!num5.HasValue) ? "null" : chanceToSkipWallBlock.ToString());
            obj[58] = ", floorDef=";
            obj[59] = ((floorDef == null) ? "null" : floorDef.ToString());
            obj[60] = ", chanceToSkipFloor=";
            float?num6 = chanceToSkipFloor;

            obj[61] = ((!num6.HasValue) ? "null" : chanceToSkipFloor.ToString());
            obj[62] = ", filthDef=";
            obj[63] = ((filthDef == null) ? "null" : filthDef.ToString());
            obj[64] = ", filthDensity=";
            FloatRange?floatRange = filthDensity;

            obj[65] = ((!floatRange.HasValue) ? "null" : filthDensity.ToString());
            obj[66] = ", floorOnlyIfTerrainSupports=";
            bool?flag7 = floorOnlyIfTerrainSupports;

            obj[67] = ((!flag7.HasValue) ? "null" : floorOnlyIfTerrainSupports.ToString());
            obj[68] = ", clearEdificeOnly=";
            bool?flag8 = clearEdificeOnly;

            obj[69] = ((!flag8.HasValue) ? "null" : clearEdificeOnly.ToString());
            obj[70] = ", clearFillageOnly=";
            bool?flag9 = clearFillageOnly;

            obj[71] = ((!flag9.HasValue) ? "null" : clearFillageOnly.ToString());
            obj[72] = ", clearRoof=";
            bool?flag10 = clearRoof;

            obj[73] = ((!flag10.HasValue) ? "null" : clearRoof.ToString());
            obj[74] = ", ancientCryptosleepCasketGroupID=";
            int?num7 = ancientCryptosleepCasketGroupID;

            obj[75] = ((!num7.HasValue) ? "null" : ancientCryptosleepCasketGroupID.ToString());
            obj[76] = ", podContentsType=";
            PodContentsType?podContentsType = this.podContentsType;

            obj[77] = ((!podContentsType.HasValue) ? "null" : this.podContentsType.ToString());
            obj[78] = ", thingSetMakerDef=";
            obj[79] = ((thingSetMakerDef == null) ? "null" : thingSetMakerDef.ToString());
            obj[80] = ", thingSetMakerParams=";
            ThingSetMakerParams?thingSetMakerParams = this.thingSetMakerParams;

            obj[81] = ((!thingSetMakerParams.HasValue) ? "null" : this.thingSetMakerParams.ToString());
            obj[82] = ", stockpileConcreteContents=";
            obj[83] = ((stockpileConcreteContents == null) ? "null" : stockpileConcreteContents.Count.ToString());
            obj[84] = ", stockpileMarketValue=";
            float?num8 = stockpileMarketValue;

            obj[85] = ((!num8.HasValue) ? "null" : stockpileMarketValue.ToString());
            obj[86] = ", innerStockpileSize=";
            int?num9 = innerStockpileSize;

            obj[87] = ((!num9.HasValue) ? "null" : innerStockpileSize.ToString());
            obj[88] = ", edgeDefenseWidth=";
            int?num10 = edgeDefenseWidth;

            obj[89] = ((!num10.HasValue) ? "null" : edgeDefenseWidth.ToString());
            obj[90] = ", edgeDefenseTurretsCount=";
            int?num11 = edgeDefenseTurretsCount;

            obj[91] = ((!num11.HasValue) ? "null" : edgeDefenseTurretsCount.ToString());
            obj[92] = ", edgeDefenseMortarsCount=";
            int?num12 = edgeDefenseMortarsCount;

            obj[93] = ((!num12.HasValue) ? "null" : edgeDefenseMortarsCount.ToString());
            obj[94] = ", edgeDefenseGuardsCount=";
            int?num13 = edgeDefenseGuardsCount;

            obj[95]  = ((!num13.HasValue) ? "null" : edgeDefenseGuardsCount.ToString());
            obj[96]  = ", mortarDef=";
            obj[97]  = ((mortarDef == null) ? "null" : mortarDef.ToString());
            obj[98]  = ", pathwayFloorDef=";
            obj[99]  = ((pathwayFloorDef == null) ? "null" : pathwayFloorDef.ToString());
            obj[100] = ", cultivatedPlantDef=";
            obj[101] = ((cultivatedPlantDef == null) ? "null" : cultivatedPlantDef.ToString());
            obj[102] = ", fillWithThingsPadding=";
            int?num14 = fillWithThingsPadding;

            obj[103] = ((!num14.HasValue) ? "null" : fillWithThingsPadding.ToString());
            obj[104] = ", settlementPawnGroupPoints=";
            float?num15 = settlementPawnGroupPoints;

            obj[105] = ((!num15.HasValue) ? "null" : settlementPawnGroupPoints.ToString());
            obj[106] = ", settlementPawnGroupSeed=";
            int?num16 = settlementPawnGroupSeed;

            obj[107] = ((!num16.HasValue) ? "null" : settlementPawnGroupSeed.ToString());
            obj[108] = ", streetHorizontal=";
            bool?flag11 = streetHorizontal;

            obj[109] = ((!flag11.HasValue) ? "null" : streetHorizontal.ToString());
            obj[110] = ", edgeThingAvoidOtherEdgeThings=";
            bool?flag12 = edgeThingAvoidOtherEdgeThings;

            obj[111] = ((!flag12.HasValue) ? "null" : edgeThingAvoidOtherEdgeThings.ToString());
            obj[112] = ", allowPlacementOffEdge=";
            bool?flag13 = allowPlacementOffEdge;

            obj[113] = ((!flag13.HasValue) ? "null" : allowPlacementOffEdge.ToString());
            obj[114] = ", thrustAxis=";
            Rot4?rot2 = thrustAxis;

            obj[115] = ((!rot2.HasValue) ? "null" : thrustAxis.ToString());
            return(string.Concat(obj));
        }
示例#25
0
        public PawnKindDefStats(PawnKindDef d) : base(d)
        {
            if (d.race != null)
            {
                this.race = new DefStat <ThingDef>(d.race);
            }
            if (d.defaultFactionType != null)
            {
                this.defaultFactionType = new DefStat <FactionDef>(d.defaultFactionType);
            }
            if (d.forcedTraits?.Count > 0)
            {
                this.forcedTraits = new List <TraitRequirementStat>(d.forcedTraits.Count);
                foreach (var t in d.forcedTraits)
                {
                    this.forcedTraits.Add(new TraitRequirementStat(t));
                }
            }
            if (d.disallowedTraits?.Count > 0)
            {
                this.disallowedTraits = new List <DefStat <TraitDef> >(d.disallowedTraits.Count);
                foreach (var t in d.disallowedTraits)
                {
                    this.disallowedTraits.Add(new DefStat <TraitDef>(t));
                }
            }
            this.minGenerationAge = d.minGenerationAge;
            this.maxGenerationAge = d.maxGenerationAge;
            if (d.fixedGender != null)
            {
                this.fixedGender = d.fixedGender.Value;
            }

            this.allowOldAgeInjuries   = d.allowOldAgeInjuries;
            this.destroyGearOnDrop     = d.destroyGearOnDrop;
            this.defendPointRadius     = d.defendPointRadius;
            this.factionHostileOnKill  = d.factionHostileOnKill;
            this.factionHostileOnDeath = d.factionHostileOnDeath;
            if (d.initialResistanceRange != null)
            {
                this.initialResistanceRange = d.initialResistanceRange.Value;
            }
            if (d.initialWillRange != null)
            {
                this.initialWillRange = d.initialWillRange.Value;
            }
            //this.allowRoyalRoomRequirements = true;
            //this.allowRoyalApparelRequirements = true;
            this.isFighter                = d.isFighter;
            this.combatPower              = d.combatPower;
            this.canArriveManhunter       = d.canArriveManhunter;
            this.canBeSapper              = d.canBeSapper;
            this.isGoodBreacher           = d.isGoodBreacher;
            this.baseRecruitDifficulty    = d.baseRecruitDifficulty;
            this.aiAvoidCover             = d.aiAvoidCover;
            this.fleeHealthThresholdRange = new FloatRange(d.fleeHealthThresholdRange.min, d.fleeHealthThresholdRange.max);
            this.acceptArrestChanceFactor = d.acceptArrestChanceFactor;
            this.gearHealthRange          = new FloatRange(d.gearHealthRange.min, d.gearHealthRange.max);
            this.weaponMoney              = new FloatRange(d.weaponMoney.min, d.weaponMoney.max);
            if (d.weaponTags != null)
            {
                this.weaponTags = new List <string>(d.weaponTags.Count);
                foreach (var s in d.weaponTags)
                {
                    this.weaponTags.Add(s);
                }
            }
            if (d.weaponStuffOverride != null)
            {
                this.weaponStuffOverride = new DefStat <ThingDef>(d.weaponStuffOverride);
            }
            if (d.weaponStyleDef != null)
            {
                this.weaponStyleDef = new DefStat <ThingStyleDef>(d.weaponStyleDef);
            }
            this.apparelMoney = new FloatRange(d.apparelMoney.min, d.apparelMoney.max);
            if (d.apparelRequired != null)
            {
                this.apparelRequired = new List <DefStat <ThingDef> >(d.apparelRequired.Count);
                foreach (var a in d.apparelRequired)
                {
                    this.apparelRequired.Add(new DefStat <ThingDef>(a));
                }
            }
            if (d.apparelTags != null)
            {
                this.apparelTags = new List <string>(d.apparelTags.Count);
                foreach (var s in d.apparelTags)
                {
                    this.apparelTags.Add(s);
                }
            }
            if (d.apparelDisallowTags != null)
            {
                this.apparelDisallowTags = new List <string>(d.apparelDisallowTags.Count);
                foreach (var s in d.apparelDisallowTags)
                {
                    this.apparelDisallowTags.Add(s);
                }
            }
            this.apparelAllowHeadgearChance            = d.apparelAllowHeadgearChance;
            this.apparelIgnoreSeasons                  = d.apparelIgnoreSeasons;
            this.ignoreFactionApparelStuffRequirements = d.ignoreFactionApparelStuffRequirements;
            if (d.techHediffsRequired != null)
            {
                this.techHediffsRequired = new List <DefStat <ThingDef> >(d.techHediffsRequired.Count);
                foreach (var a in d.techHediffsRequired)
                {
                    this.techHediffsRequired.Add(new DefStat <ThingDef>(a));
                }
            }
            this.techHediffsMoney = new FloatRange(d.techHediffsMoney.min, d.techHediffsMoney.max);
            if (d.techHediffsTags != null)
            {
                this.techHediffsTags = new List <string>(d.techHediffsTags.Count);
                foreach (var s in d.techHediffsTags)
                {
                    this.techHediffsTags.Add(s);
                }
            }
            if (d.techHediffsDisallowTags != null)
            {
                this.techHediffsDisallowTags = new List <string>(d.techHediffsDisallowTags.Count);
                foreach (var s in d.techHediffsDisallowTags)
                {
                    this.techHediffsDisallowTags.Add(s);
                }
            }
            this.techHediffsChance          = d.techHediffsChance;
            this.techHediffsMaxAmount       = d.techHediffsMaxAmount;
            this.biocodeWeaponChance        = d.biocodeWeaponChance;
            this.chemicalAddictionChance    = d.chemicalAddictionChance;
            this.combatEnhancingDrugsChance = d.combatEnhancingDrugsChance;
            this.combatEnhancingDrugsCount  = new IntRange(d.combatEnhancingDrugsCount.min, d.combatEnhancingDrugsCount.max);
            if (d.forcedAddictions != null)
            {
                this.forcedAddictions = new List <DefStat <ChemicalDef> >(d.forcedAddictions.Count);
                foreach (var a in d.forcedAddictions)
                {
                    this.forcedAddictions.Add(new DefStat <ChemicalDef>(a));
                }
            }
            this.trader              = d.trader;
            this.extraSkillLevels    = d.extraSkillLevels;
            this.minTotalSkillLevels = d.minTotalSkillLevels;
            this.minBestSkillLevel   = d.minBestSkillLevel;
            this.wildGroupSize       = new IntRange(d.wildGroupSize.min, d.wildGroupSize.max);
            this.ecoSystemWeight     = d.ecoSystemWeight;
        }
示例#26
0
        public override string ToString()
        {
            object[] expr_07 = new object[116];
            expr_07[0] = "rect=";
            expr_07[1] = this.rect;
            expr_07[2] = ", faction=";
            expr_07[3] = ((this.faction == null) ? "null" : this.faction.ToString());
            expr_07[4] = ", custom=";
            expr_07[5] = ((this.custom == null) ? "null" : this.custom.Count.ToString());
            expr_07[6] = ", ancientTempleEntranceHeight=";
            int arg_B9_1 = 7;
            int?num      = this.ancientTempleEntranceHeight;

            expr_07[arg_B9_1] = ((!num.HasValue) ? "null" : this.ancientTempleEntranceHeight.ToString());
            expr_07[8]        = ", pawnGroupMakerParams=";
            expr_07[9]        = ((this.pawnGroupMakerParams == null) ? "null" : this.pawnGroupMakerParams.ToString());
            expr_07[10]       = ", pawnGroupKindDef=";
            expr_07[11]       = ((this.pawnGroupKindDef == null) ? "null" : this.pawnGroupKindDef.ToString());
            expr_07[12]       = ", roofDef=";
            expr_07[13]       = ((this.roofDef == null) ? "null" : this.roofDef.ToString());
            expr_07[14]       = ", noRoof=";
            int  arg_17A_1 = 15;
            bool?flag      = this.noRoof;

            expr_07[arg_17A_1] = ((!flag.HasValue) ? "null" : this.noRoof.ToString());
            expr_07[16]        = ", addRoomCenterToRootsToUnfog=";
            int  arg_1B5_1 = 17;
            bool?flag2     = this.addRoomCenterToRootsToUnfog;

            expr_07[arg_1B5_1] = ((!flag2.HasValue) ? "null" : this.addRoomCenterToRootsToUnfog.ToString());
            expr_07[18]        = ", singleThingToSpawn=";
            expr_07[19]        = ((this.singleThingToSpawn == null) ? "null" : this.singleThingToSpawn.ToString());
            expr_07[20]        = ", singleThingDef=";
            expr_07[21]        = ((this.singleThingDef == null) ? "null" : this.singleThingDef.ToString());
            expr_07[22]        = ", singleThingStuff=";
            expr_07[23]        = ((this.singleThingStuff == null) ? "null" : this.singleThingStuff.ToString());
            expr_07[24]        = ", singleThingStackCount=";
            int arg_278_1 = 25;
            int?num2      = this.singleThingStackCount;

            expr_07[arg_278_1] = ((!num2.HasValue) ? "null" : this.singleThingStackCount.ToString());
            expr_07[26]        = ", skipSingleThingIfHasToWipeBuildingOrDoesntFit=";
            int  arg_2B4_1 = 27;
            bool?flag3     = this.skipSingleThingIfHasToWipeBuildingOrDoesntFit;

            expr_07[arg_2B4_1] = ((!flag3.HasValue) ? "null" : this.skipSingleThingIfHasToWipeBuildingOrDoesntFit.ToString());
            expr_07[28]        = ", spawnBridgeIfTerrainCantSupportThing=";
            int  arg_2F0_1 = 29;
            bool?flag4     = this.spawnBridgeIfTerrainCantSupportThing;

            expr_07[arg_2F0_1] = ((!flag4.HasValue) ? "null" : this.spawnBridgeIfTerrainCantSupportThing.ToString());
            expr_07[30]        = ", singlePawnToSpawn=";
            expr_07[31]        = ((this.singlePawnToSpawn == null) ? "null" : this.singlePawnToSpawn.ToString());
            expr_07[32]        = ", singlePawnKindDef=";
            expr_07[33]        = ((this.singlePawnKindDef == null) ? "null" : this.singlePawnKindDef.ToString());
            expr_07[34]        = ", disableSinglePawn=";
            int  arg_386_1 = 35;
            bool?flag5     = this.disableSinglePawn;

            expr_07[arg_386_1] = ((!flag5.HasValue) ? "null" : this.disableSinglePawn.ToString());
            expr_07[36]        = ", singlePawnLord=";
            expr_07[37]        = ((this.singlePawnLord == null) ? "null" : this.singlePawnLord.ToString());
            expr_07[38]        = ", singlePawnSpawnCellExtraPredicate=";
            expr_07[39]        = ((this.singlePawnSpawnCellExtraPredicate == null) ? "null" : this.singlePawnSpawnCellExtraPredicate.ToString());
            expr_07[40]        = ", singlePawnGenerationRequest=";
            int arg_41C_1 = 41;
            PawnGenerationRequest?pawnGenerationRequest = this.singlePawnGenerationRequest;

            expr_07[arg_41C_1] = ((!pawnGenerationRequest.HasValue) ? "null" : this.singlePawnGenerationRequest.ToString());
            expr_07[42]        = ", postThingSpawn=";
            expr_07[43]        = ((this.postThingSpawn == null) ? "null" : this.postThingSpawn.ToString());
            expr_07[44]        = ", postThingGenerate=";
            expr_07[45]        = ((this.postThingGenerate == null) ? "null" : this.postThingGenerate.ToString());
            expr_07[46]        = ", mechanoidsCount=";
            int arg_4B2_1 = 47;
            int?num3      = this.mechanoidsCount;

            expr_07[arg_4B2_1] = ((!num3.HasValue) ? "null" : this.mechanoidsCount.ToString());
            expr_07[48]        = ", hivesCount=";
            int arg_4EE_1 = 49;
            int?num4      = this.hivesCount;

            expr_07[arg_4EE_1] = ((!num4.HasValue) ? "null" : this.hivesCount.ToString());
            expr_07[50]        = ", disableHives=";
            int  arg_52A_1 = 51;
            bool?flag6     = this.disableHives;

            expr_07[arg_52A_1] = ((!flag6.HasValue) ? "null" : this.disableHives.ToString());
            expr_07[52]        = ", thingRot=";
            int  arg_566_1 = 53;
            Rot4?rot       = this.thingRot;

            expr_07[arg_566_1] = ((!rot.HasValue) ? "null" : this.thingRot.ToString());
            expr_07[54]        = ", wallStuff=";
            expr_07[55]        = ((this.wallStuff == null) ? "null" : this.wallStuff.ToString());
            expr_07[56]        = ", chanceToSkipWallBlock=";
            int   arg_5CF_1 = 57;
            float?num5      = this.chanceToSkipWallBlock;

            expr_07[arg_5CF_1] = ((!num5.HasValue) ? "null" : this.chanceToSkipWallBlock.ToString());
            expr_07[58]        = ", floorDef=";
            expr_07[59]        = ((this.floorDef == null) ? "null" : this.floorDef.ToString());
            expr_07[60]        = ", chanceToSkipFloor=";
            int   arg_638_1 = 61;
            float?num6      = this.chanceToSkipFloor;

            expr_07[arg_638_1] = ((!num6.HasValue) ? "null" : this.chanceToSkipFloor.ToString());
            expr_07[62]        = ", filthDef=";
            expr_07[63]        = ((this.filthDef == null) ? "null" : this.filthDef.ToString());
            expr_07[64]        = ", filthDensity=";
            int        arg_6A1_1  = 65;
            FloatRange?floatRange = this.filthDensity;

            expr_07[arg_6A1_1] = ((!floatRange.HasValue) ? "null" : this.filthDensity.ToString());
            expr_07[66]        = ", floorOnlyIfTerrainSupports=";
            int  arg_6DD_1 = 67;
            bool?flag7     = this.floorOnlyIfTerrainSupports;

            expr_07[arg_6DD_1] = ((!flag7.HasValue) ? "null" : this.floorOnlyIfTerrainSupports.ToString());
            expr_07[68]        = ", clearEdificeOnly=";
            int  arg_719_1 = 69;
            bool?flag8     = this.clearEdificeOnly;

            expr_07[arg_719_1] = ((!flag8.HasValue) ? "null" : this.clearEdificeOnly.ToString());
            expr_07[70]        = ", clearFillageOnly=";
            int  arg_755_1 = 71;
            bool?flag9     = this.clearFillageOnly;

            expr_07[arg_755_1] = ((!flag9.HasValue) ? "null" : this.clearFillageOnly.ToString());
            expr_07[72]        = ", clearRoof=";
            int  arg_791_1 = 73;
            bool?flag10    = this.clearRoof;

            expr_07[arg_791_1] = ((!flag10.HasValue) ? "null" : this.clearRoof.ToString());
            expr_07[74]        = ", ancientCryptosleepCasketGroupID=";
            int arg_7CD_1 = 75;
            int?num7      = this.ancientCryptosleepCasketGroupID;

            expr_07[arg_7CD_1] = ((!num7.HasValue) ? "null" : this.ancientCryptosleepCasketGroupID.ToString());
            expr_07[76]        = ", podContentsType=";
            int             arg_809_1       = 77;
            PodContentsType?podContentsType = this.podContentsType;

            expr_07[arg_809_1] = ((!podContentsType.HasValue) ? "null" : this.podContentsType.ToString());
            expr_07[78]        = ", thingSetMakerDef=";
            expr_07[79]        = ((this.thingSetMakerDef == null) ? "null" : this.thingSetMakerDef.ToString());
            expr_07[80]        = ", thingSetMakerParams=";
            int arg_872_1 = 81;
            ThingSetMakerParams?thingSetMakerParams = this.thingSetMakerParams;

            expr_07[arg_872_1] = ((!thingSetMakerParams.HasValue) ? "null" : this.thingSetMakerParams.ToString());
            expr_07[82]        = ", stockpileConcreteContents=";
            expr_07[83]        = ((this.stockpileConcreteContents == null) ? "null" : this.stockpileConcreteContents.Count.ToString());
            expr_07[84]        = ", stockpileMarketValue=";
            int   arg_8EA_1 = 85;
            float?num8      = this.stockpileMarketValue;

            expr_07[arg_8EA_1] = ((!num8.HasValue) ? "null" : this.stockpileMarketValue.ToString());
            expr_07[86]        = ", innerStockpileSize=";
            int arg_926_1 = 87;
            int?num9      = this.innerStockpileSize;

            expr_07[arg_926_1] = ((!num9.HasValue) ? "null" : this.innerStockpileSize.ToString());
            expr_07[88]        = ", edgeDefenseWidth=";
            int arg_962_1 = 89;
            int?num10     = this.edgeDefenseWidth;

            expr_07[arg_962_1] = ((!num10.HasValue) ? "null" : this.edgeDefenseWidth.ToString());
            expr_07[90]        = ", edgeDefenseTurretsCount=";
            int arg_99E_1 = 91;
            int?num11     = this.edgeDefenseTurretsCount;

            expr_07[arg_99E_1] = ((!num11.HasValue) ? "null" : this.edgeDefenseTurretsCount.ToString());
            expr_07[92]        = ", edgeDefenseMortarsCount=";
            int arg_9DA_1 = 93;
            int?num12     = this.edgeDefenseMortarsCount;

            expr_07[arg_9DA_1] = ((!num12.HasValue) ? "null" : this.edgeDefenseMortarsCount.ToString());
            expr_07[94]        = ", edgeDefenseGuardsCount=";
            int arg_A16_1 = 95;
            int?num13     = this.edgeDefenseGuardsCount;

            expr_07[arg_A16_1] = ((!num13.HasValue) ? "null" : this.edgeDefenseGuardsCount.ToString());
            expr_07[96]        = ", mortarDef=";
            expr_07[97]        = ((this.mortarDef == null) ? "null" : this.mortarDef.ToString());
            expr_07[98]        = ", pathwayFloorDef=";
            expr_07[99]        = ((this.pathwayFloorDef == null) ? "null" : this.pathwayFloorDef.ToString());
            expr_07[100]       = ", cultivatedPlantDef=";
            expr_07[101]       = ((this.cultivatedPlantDef == null) ? "null" : this.cultivatedPlantDef.ToString());
            expr_07[102]       = ", fillWithThingsPadding=";
            int arg_AD9_1 = 103;
            int?num14     = this.fillWithThingsPadding;

            expr_07[arg_AD9_1] = ((!num14.HasValue) ? "null" : this.fillWithThingsPadding.ToString());
            expr_07[104]       = ", settlementPawnGroupPoints=";
            int   arg_B15_1 = 105;
            float?num15     = this.settlementPawnGroupPoints;

            expr_07[arg_B15_1] = ((!num15.HasValue) ? "null" : this.settlementPawnGroupPoints.ToString());
            expr_07[106]       = ", settlementPawnGroupSeed=";
            int arg_B51_1 = 107;
            int?num16     = this.settlementPawnGroupSeed;

            expr_07[arg_B51_1] = ((!num16.HasValue) ? "null" : this.settlementPawnGroupSeed.ToString());
            expr_07[108]       = ", streetHorizontal=";
            int  arg_B8D_1 = 109;
            bool?flag11    = this.streetHorizontal;

            expr_07[arg_B8D_1] = ((!flag11.HasValue) ? "null" : this.streetHorizontal.ToString());
            expr_07[110]       = ", edgeThingAvoidOtherEdgeThings=";
            int  arg_BC9_1 = 111;
            bool?flag12    = this.edgeThingAvoidOtherEdgeThings;

            expr_07[arg_BC9_1] = ((!flag12.HasValue) ? "null" : this.edgeThingAvoidOtherEdgeThings.ToString());
            expr_07[112]       = ", allowPlacementOffEdge=";
            int  arg_C05_1 = 113;
            bool?flag13    = this.allowPlacementOffEdge;

            expr_07[arg_C05_1] = ((!flag13.HasValue) ? "null" : this.allowPlacementOffEdge.ToString());
            expr_07[114]       = ", thrustAxis=";
            int  arg_C41_1 = 115;
            Rot4?rot2      = this.thrustAxis;

            expr_07[arg_C41_1] = ((!rot2.HasValue) ? "null" : this.thrustAxis.ToString());
            return(string.Concat(expr_07));
        }
示例#27
0
        public override string ToString()
        {
            object[] obj = new object[110]
            {
                "rect=",
                this.rect,
                ", faction=",
                (this.faction == null) ? "null" : this.faction.ToString(),
                ", custom=",
                (this.custom == null) ? "null" : this.custom.Count.ToString(),
                ", ancientTempleEntranceHeight=",
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null
            };
            int?nullable = this.ancientTempleEntranceHeight;

            obj[7]  = ((!nullable.HasValue) ? "null" : this.ancientTempleEntranceHeight.ToString());
            obj[8]  = ", pawnGroupMakerParams=";
            obj[9]  = ((this.pawnGroupMakerParams == null) ? "null" : this.pawnGroupMakerParams.ToString());
            obj[10] = ", pawnGroupKindDef=";
            obj[11] = ((this.pawnGroupKindDef == null) ? "null" : this.pawnGroupKindDef.ToString());
            obj[12] = ", roofDef=";
            obj[13] = ((this.roofDef == null) ? "null" : this.roofDef.ToString());
            obj[14] = ", noRoof=";
            bool?nullable2 = this.noRoof;

            obj[15] = ((!nullable2.HasValue) ? "null" : this.noRoof.ToString());
            obj[16] = ", addRoomCenterToRootsToUnfog=";
            bool?nullable3 = this.addRoomCenterToRootsToUnfog;

            obj[17] = ((!nullable3.HasValue) ? "null" : this.addRoomCenterToRootsToUnfog.ToString());
            obj[18] = ", singleThingToSpawn=";
            obj[19] = ((this.singleThingToSpawn == null) ? "null" : this.singleThingToSpawn.ToString());
            obj[20] = ", singleThingDef=";
            obj[21] = ((this.singleThingDef == null) ? "null" : this.singleThingDef.ToString());
            obj[22] = ", singleThingStuff=";
            obj[23] = ((this.singleThingStuff == null) ? "null" : this.singleThingStuff.ToString());
            obj[24] = ", singleThingStackCount=";
            int?nullable4 = this.singleThingStackCount;

            obj[25] = ((!nullable4.HasValue) ? "null" : this.singleThingStackCount.ToString());
            obj[26] = ", skipSingleThingIfHasToWipeBuildingOrDoesntFit=";
            bool?nullable5 = this.skipSingleThingIfHasToWipeBuildingOrDoesntFit;

            obj[27] = ((!nullable5.HasValue) ? "null" : this.skipSingleThingIfHasToWipeBuildingOrDoesntFit.ToString());
            obj[28] = ", singlePawnToSpawn=";
            obj[29] = ((this.singlePawnToSpawn == null) ? "null" : this.singlePawnToSpawn.ToString());
            obj[30] = ", singlePawnKindDef=";
            obj[31] = ((this.singlePawnKindDef == null) ? "null" : this.singlePawnKindDef.ToString());
            obj[32] = ", disableSinglePawn=";
            bool?nullable6 = this.disableSinglePawn;

            obj[33] = ((!nullable6.HasValue) ? "null" : this.disableSinglePawn.ToString());
            obj[34] = ", singlePawnLord=";
            obj[35] = ((this.singlePawnLord == null) ? "null" : this.singlePawnLord.ToString());
            obj[36] = ", singlePawnSpawnCellExtraPredicate=";
            obj[37] = ((this.singlePawnSpawnCellExtraPredicate == null) ? "null" : this.singlePawnSpawnCellExtraPredicate.ToString());
            obj[38] = ", singlePawnGenerationRequest=";
            PawnGenerationRequest?nullable7 = this.singlePawnGenerationRequest;

            obj[39] = ((!nullable7.HasValue) ? "null" : this.singlePawnGenerationRequest.ToString());
            obj[40] = ", postThingSpawn=";
            obj[41] = ((this.postThingSpawn == null) ? "null" : this.postThingSpawn.ToString());
            obj[42] = ", postThingGenerate=";
            obj[43] = ((this.postThingGenerate == null) ? "null" : this.postThingGenerate.ToString());
            obj[44] = ", mechanoidsCount=";
            int?nullable8 = this.mechanoidsCount;

            obj[45] = ((!nullable8.HasValue) ? "null" : this.mechanoidsCount.ToString());
            obj[46] = ", hivesCount=";
            int?nullable9 = this.hivesCount;

            obj[47] = ((!nullable9.HasValue) ? "null" : this.hivesCount.ToString());
            obj[48] = ", disableHives=";
            bool?nullable10 = this.disableHives;

            obj[49] = ((!nullable10.HasValue) ? "null" : this.disableHives.ToString());
            obj[50] = ", thingRot=";
            Rot4?nullable11 = this.thingRot;

            obj[51] = ((!nullable11.HasValue) ? "null" : this.thingRot.ToString());
            obj[52] = ", wallStuff=";
            obj[53] = ((this.wallStuff == null) ? "null" : this.wallStuff.ToString());
            obj[54] = ", chanceToSkipWallBlock=";
            float?nullable12 = this.chanceToSkipWallBlock;

            obj[55] = ((!nullable12.HasValue) ? "null" : this.chanceToSkipWallBlock.ToString());
            obj[56] = ", floorDef=";
            obj[57] = ((this.floorDef == null) ? "null" : this.floorDef.ToString());
            obj[58] = ", chanceToSkipFloor=";
            float?nullable13 = this.chanceToSkipFloor;

            obj[59] = ((!nullable13.HasValue) ? "null" : this.chanceToSkipFloor.ToString());
            obj[60] = ", filthDef=";
            obj[61] = ((this.filthDef == null) ? "null" : this.filthDef.ToString());
            obj[62] = ", filthDensity=";
            FloatRange?nullable14 = this.filthDensity;

            obj[63] = ((!nullable14.HasValue) ? "null" : this.filthDensity.ToString());
            obj[64] = ", clearEdificeOnly=";
            bool?nullable15 = this.clearEdificeOnly;

            obj[65] = ((!nullable15.HasValue) ? "null" : this.clearEdificeOnly.ToString());
            obj[66] = ", clearFillageOnly=";
            bool?nullable16 = this.clearFillageOnly;

            obj[67] = ((!nullable16.HasValue) ? "null" : this.clearFillageOnly.ToString());
            obj[68] = ", clearRoof=";
            bool?nullable17 = this.clearRoof;

            obj[69] = ((!nullable17.HasValue) ? "null" : this.clearRoof.ToString());
            obj[70] = ", ancientCryptosleepCasketGroupID=";
            int?nullable18 = this.ancientCryptosleepCasketGroupID;

            obj[71] = ((!nullable18.HasValue) ? "null" : this.ancientCryptosleepCasketGroupID.ToString());
            obj[72] = ", podContentsType=";
            PodContentsType?nullable19 = this.podContentsType;

            obj[73] = ((!nullable19.HasValue) ? "null" : this.podContentsType.ToString());
            obj[74] = ", itemCollectionGeneratorDef=";
            obj[75] = ((this.itemCollectionGeneratorDef == null) ? "null" : this.itemCollectionGeneratorDef.ToString());
            obj[76] = ", itemCollectionGeneratorParams=";
            ItemCollectionGeneratorParams?nullable20 = this.itemCollectionGeneratorParams;

            obj[77] = ((!nullable20.HasValue) ? "null" : this.itemCollectionGeneratorParams.ToString());
            obj[78] = ", stockpileConcreteContents=";
            obj[79] = ((this.stockpileConcreteContents == null) ? "null" : this.stockpileConcreteContents.Count.ToString());
            obj[80] = ", stockpileMarketValue=";
            float?nullable21 = this.stockpileMarketValue;

            obj[81] = ((!nullable21.HasValue) ? "null" : this.stockpileMarketValue.ToString());
            obj[82] = ", innerStockpileSize=";
            int?nullable22 = this.innerStockpileSize;

            obj[83] = ((!nullable22.HasValue) ? "null" : this.innerStockpileSize.ToString());
            obj[84] = ", edgeDefenseWidth=";
            int?nullable23 = this.edgeDefenseWidth;

            obj[85] = ((!nullable23.HasValue) ? "null" : this.edgeDefenseWidth.ToString());
            obj[86] = ", edgeDefenseTurretsCount=";
            int?nullable24 = this.edgeDefenseTurretsCount;

            obj[87] = ((!nullable24.HasValue) ? "null" : this.edgeDefenseTurretsCount.ToString());
            obj[88] = ", edgeDefenseMortarsCount=";
            int?nullable25 = this.edgeDefenseMortarsCount;

            obj[89] = ((!nullable25.HasValue) ? "null" : this.edgeDefenseMortarsCount.ToString());
            obj[90] = ", edgeDefenseGuardsCount=";
            int?nullable26 = this.edgeDefenseGuardsCount;

            obj[91] = ((!nullable26.HasValue) ? "null" : this.edgeDefenseGuardsCount.ToString());
            obj[92] = ", mortarDef=";
            obj[93] = ((this.mortarDef == null) ? "null" : this.mortarDef.ToString());
            obj[94] = ", pathwayFloorDef=";
            obj[95] = ((this.pathwayFloorDef == null) ? "null" : this.pathwayFloorDef.ToString());
            obj[96] = ", cultivatedPlantDef=";
            obj[97] = ((this.cultivatedPlantDef == null) ? "null" : this.cultivatedPlantDef.ToString());
            obj[98] = ", fillWithThingsPadding=";
            int?nullable27 = this.fillWithThingsPadding;

            obj[99]  = ((!nullable27.HasValue) ? "null" : this.fillWithThingsPadding.ToString());
            obj[100] = ", factionBasePawnGroupPointsFactor=";
            float?nullable28 = this.factionBasePawnGroupPointsFactor;

            obj[101] = ((!nullable28.HasValue) ? "null" : this.factionBasePawnGroupPointsFactor.ToString());
            obj[102] = ", streetHorizontal=";
            bool?nullable29 = this.streetHorizontal;

            obj[103] = ((!nullable29.HasValue) ? "null" : this.streetHorizontal.ToString());
            obj[104] = ", edgeThingAvoidOtherEdgeThings=";
            bool?nullable30 = this.edgeThingAvoidOtherEdgeThings;

            obj[105] = ((!nullable30.HasValue) ? "null" : this.edgeThingAvoidOtherEdgeThings.ToString());
            obj[106] = ", allowPlacementOffEdge=";
            bool?nullable31 = this.allowPlacementOffEdge;

            obj[107] = ((!nullable31.HasValue) ? "null" : this.allowPlacementOffEdge.ToString());
            obj[108] = ", thrustAxis=";
            Rot4?nullable32 = this.thrustAxis;

            obj[109] = ((!nullable32.HasValue) ? "null" : this.thrustAxis.ToString());
            return(string.Concat(obj));
        }