Esempio n. 1
0
		public SkyfallerPropertiesStats(SkyfallerProperties p)
		{
			this.hitRoof = p.hitRoof;
			this.reversed = p.reversed;
			this.explosionRadius = p.explosionRadius;
			this.explosionDamageFactor = p.explosionDamageFactor;
			this.shrapnelDistanceFactor = p.shrapnelDistanceFactor;
			this.movementType = p.movementType;
			this.speed = p.speed;
			this.cameraShake = p.cameraShake;
			this.rotateGraphicTowardsDirection = p.rotateGraphicTowardsDirection;
			this.anticipationSoundTicks = p.anticipationSoundTicks;
			this.motesPerCell = p.motesPerCell;

			if (p.shadowSize == null)
				this.shadowSize = new Vector2Stats(p.shadowSize);
			if (p.ticksToImpactRange == null)
				this.ticksToImpactRange = new MinMaxIntStats(p.ticksToImpactRange);
			if (p.metalShrapnelCountRange == null)
				this.metalShrapnelCountRange = new MinMaxIntStats(p.metalShrapnelCountRange);
			if (p.rubbleShrapnelCountRange == null)
				this.rubbleShrapnelCountRange = new MinMaxIntStats(p.rubbleShrapnelCountRange);

			Util.AssignDefStat(p.explosionDamage, out this.explosionDamage);
			Util.AssignDefStat(p.impactSound, out this.impactSound);
			Util.AssignDefStat(p.anticipationSound, out this.anticipationSound);
		}
Esempio n. 2
0
        public BuildingPropertiesStats(BuildingProperties p)
        {
            this.isEdifice                    = p.isEdifice;
            this.isInert                      = p.isInert;
            this.deconstructible              = GetDeconstructible(p);
            this.alwaysDeconstructible        = p.alwaysDeconstructible;
            this.claimable                    = p.claimable;
            this.isSittable                   = p.isSittable;
            this.expandHomeArea               = p.expandHomeArea;
            this.uninstallWork                = p.uninstallWork;
            this.wantsHopperAdjacent          = p.wantsHopperAdjacent;
            this.allowWireConnection          = p.allowWireConnection;
            this.shipPart                     = p.shipPart;
            this.canPlaceOverImpassablePlant  = p.canPlaceOverImpassablePlant;
            this.heatPerTickWhileWorking      = p.heatPerTickWhileWorking;
            this.canBuildNonEdificesUnder     = p.canBuildNonEdificesUnder;
            this.canPlaceOverWall             = p.canPlaceOverImpassablePlant;
            this.allowAutoroof                = p.allowAutoroof;
            this.preventDeteriorationOnTop    = p.preventDeteriorationOnTop;
            this.preventDeteriorationInside   = p.preventDeteriorationInside;
            this.isMealSource                 = p.isMealSource;
            this.isNaturalRock                = p.isNaturalRock;
            this.isResourceRock               = p.isResourceRock;
            this.repairable                   = p.repairable;
            this.roofCollapseDamageMultiplier = p.roofCollapseDamageMultiplier;
            this.hasFuelingPort               = p.hasFuelingPort;
            this.isPlayerEjectable            = p.isPlayerEjectable;
            this.bed_healPerDay               = p.bed_healPerDay;
            this.bed_defaultMedical           = p.bed_defaultMedical;
            this.bed_showSleeperBody          = p.bed_showSleeperBody;
            this.bed_humanlike                = p.bed_humanlike;
            this.bed_maxBodySize              = p.bed_maxBodySize;
            this.bed_caravansCanUse           = p.bed_caravansCanUse;
            this.nutritionCostPerDispense     = p.nutritionCostPerDispense;
            this.turretBurstWarmupTime        = p.turretBurstWarmupTime;
            this.turretBurstCooldownTime      = p.turretBurstCooldownTime;
            this.turretTopDrawSize            = p.turretTopDrawSize;
            this.turretTopOffset              = new Vector2Stats(p.turretTopOffset);
            this.ai_combatDangerous           = p.ai_combatDangerous;
            this.ai_chillDestination          = p.ai_chillDestination;
            this.mineableYield                = p.mineableYield;
            this.mineableNonMinedEfficiency   = p.mineableNonMinedEfficiency;
            this.mineableDropChance           = p.mineableDropChance;
            this.mineableYieldWasteable       = p.mineableYieldWasteable;
            this.mineableScatterCommonality   = p.mineableScatterCommonality;
            this.ignoreStoredThingsBeauty     = p.ignoreStoredThingsBeauty;
            this.isTrap = p.isTrap;
            this.trapDestroyOnSpring = p.trapDestroyOnSpring;
            this.trapPeacefulWildAnimalsSpringChanceFactor = p.trapPeacefulWildAnimalsSpringChanceFactor;
            this.unpoweredWorkTableWorkSpeedFactor         = p.unpoweredWorkTableWorkSpeedFactor;
            //this.workSpeedPenaltyOutdoors = p.workSpeedPenaltyOutdoors;
            //this.workSpeedPenaltyTemperature = p.workSpeedPenaltyTemperature;
            this.watchBuildingStandRectWidth = p.watchBuildingStandRectWidth;
            this.haulToContainerDuration     = p.haulToContainerDuration;

            if (p.mineableScatterLumpSizeRange != null)
            {
                this.mineableScatterLumpSizeRange = new MinMaxIntStats(p.mineableScatterLumpSizeRange);
            }
            if (p.watchBuildingStandDistanceRange != null)
            {
                this.watchBuildingStandDistanceRange = new MinMaxIntStats(p.watchBuildingStandDistanceRange);
            }
            if (p.blueprintGraphicData != null)
            {
                this.blueprintGraphicData = new GraphicDataStats(p.blueprintGraphicData);
            }
            if (p.trapUnarmedGraphicData != null)
            {
                this.trapUnarmedGraphicData = new GraphicDataStats(p.trapUnarmedGraphicData);
            }
            if (p.fullGraveGraphicData != null)
            {
                this.fullGraveGraphicData = new GraphicDataStats(p.fullGraveGraphicData);
            }

            Util.AssignDefStat(p.naturalTerrain, out this.naturalTerrain);
            Util.AssignDefStat(p.leaveTerrain, out this.leaveTerrain);
            Util.AssignDefStat(p.smoothedThing, out this.smoothedThing);
            Util.AssignDefStat(p.unsmoothedThing, out this.unsmoothedThing);
            Util.AssignDefStat(p.turretGunDef, out this.turretGunDef);
            Util.AssignDefStat(p.defaultPlantToGrow, out this.defaultPlantToGrow);
            Util.AssignDefStat(p.mineableThing, out this.mineableThing);
            Util.AssignDefStat(p.soundDispense, out this.soundDispense);
            Util.AssignDefStat(p.soundDoorOpenPowered, out this.soundDoorOpenPowered);
            Util.AssignDefStat(p.soundDoorClosePowered, out this.soundDoorClosePowered);
            Util.AssignDefStat(p.soundDoorOpenManual, out this.soundDoorOpenManual);
            Util.AssignDefStat(p.soundDoorCloseManual, out this.soundDoorCloseManual);
            Util.AssignDefStat(p.soundAmbient, out this.soundAmbient);
            Util.AssignDefStat(p.trapDamageCategory, out this.trapDamageCategory);
            Util.AssignDefStat(p.joyKind, out this.joyKind);
            Util.AssignDefStat(p.spawnedConceptLearnOpportunity, out this.spawnedConceptLearnOpportunity);
            Util.AssignDefStat(p.boughtConceptLearnOpportunity, out this.boughtConceptLearnOpportunity);

            Util.Populate(out this.buildingTags, p.buildingTags);
        }
Esempio n. 3
0
        public RacePropertiesStats(RaceProperties p)
        {
            this.intelligence              = p.intelligence;
            this.hasGenders                = p.hasGenders;
            this.needsRest                 = p.needsRest;
            this.nameCategory              = p.nameCategory;
            this.foodType                  = p.foodType;
            this.makesFootprints           = p.makesFootprints;
            this.executionRange            = p.executionRange;
            this.lifeExpectancy            = p.lifeExpectancy;
            this.herdAnimal                = p.herdAnimal;
            this.packAnimal                = p.packAnimal;
            this.predator                  = p.predator;
            this.maxPreyBodySize           = p.maxPreyBodySize;
            this.wildness                  = p.wildness;
            this.petness                   = p.petness;
            this.nuzzleMtbHours            = p.nuzzleMtbHours;
            this.manhunterOnDamageChance   = p.manhunterOnDamageChance;
            this.manhunterOnTameFailChance = p.manhunterOnTameFailChance;
            this.canBePredatorPrey         = p.canBePredatorPrey;
            this.herdMigrationAllowed      = p.herdMigrationAllowed;
            this.gestationPeriodDays       = p.gestationPeriodDays;
            this.mateMtbHours              = p.mateMtbHours;
            this.nameOnTameChance          = p.nameOnTameChance;
            //this.nameOnNuzzleChance = p.nameOnNuzzleChance;
            this.baseBodySize    = p.baseBodySize;
            this.baseHealthScale = p.baseHealthScale;
            this.baseHungerRate  = p.baseHungerRate;
            this.meatLabel       = p.meatLabel;
            this.meatMarketValue = p.meatMarketValue;

            this.meatColor = new ColorStats(p.meatColor);
            if (p.specialShadowData != null)
            {
                this.specialShadowData = new ShadowDataStats(p.specialShadowData);
            }
            if (p.soundCallIntervalRange != null)
            {
                this.soundCallIntervalRange = new MinMaxIntStats(p.soundCallIntervalRange);
            }
            if (p.ageGenerationCurve != null)
            {
                this.ageGenerationCurve = new SimpleCurveStats(p.ageGenerationCurve);
            }
            if (p.litterSizeCurve != null)
            {
                this.litterSizeCurve = new SimpleCurveStats(p.litterSizeCurve);
            }

            Util.Populate(out this.wildBiomes, p.wildBiomes, (v) => new FloatValueDefStat <BiomeDef>(v.biome, v.commonality));
            Util.Populate(out this.lifeStageAges, p.lifeStageAges, (v) => new LifeStageAgeStats(v));
            Util.Populate(out this.untrainableTags, p.untrainableTags);
            Util.Populate(out this.trainableTags, p.trainableTags);

            Util.AssignDefStat(GetFleshType(p), out this.fleshType);
            Util.AssignDefStat(GetBloodDef(p), out this.bloodDef);
            Util.AssignDefStat(p.thinkTreeMain, out this.thinkTreeMain);
            Util.AssignDefStat(p.thinkTreeConstant, out this.thinkTreeConstant);
            Util.AssignDefStat(p.body, out this.body);
            Util.AssignDefStat(p.trainability, out this.trainability);
            Util.AssignDefStat(GetNameGenerator(p), out this.nameGenerator);
            Util.AssignDefStat(GetNameGeneratorFemale(p), out this.nameGeneratorFemale);
            Util.AssignDefStat(p.useMeatFrom, out this.useMeatFrom);
            Util.AssignDefStat(p.useLeatherFrom, out this.useLeatherFrom);
            Util.AssignDefStat(p.leatherDef, out this.leatherDef);
            Util.AssignDefStat(p.soundMeleeHitPawn, out this.soundMeleeHitPawn);
            Util.AssignDefStat(p.soundMeleeHitBuilding, out this.soundMeleeHitBuilding);
            Util.AssignDefStat(p.soundMeleeMiss, out this.soundMeleeMiss);
            Util.AssignDefStat(p.meatDef, out this.meatDef);
            Util.AssignDefStat(p.corpseDef, out this.corpseDef);

            this.hediffGiverSets = Util.CreateDefStatList(p.hediffGiverSets);
        }