コード例 #1
0
        public StuffPropertiesStats(StuffProperties p)
        {
            this.commonality          = p.commonality;
            this.allowColorGenerators = p.allowColorGenerators;
            this.color = new ColorStats(p.color);

            Util.AssignDefStat(p.constructEffect, out this.constructEffect);
            Util.AssignDefStat(p.appearance, out this.appearance);
            Util.AssignDefStat(p.soundImpactStuff, out this.soundImpactStuff);
            Util.AssignDefStat(p.soundMeleeHitSharp, out this.soundMeleeHitSharp);
            Util.AssignDefStat(p.soundMeleeHitBlunt, out this.soundMeleeHitBlunt);

            Util.Populate(out this.statOffsets, p.statOffsets, (v) => new FloatValueDefStat <StatDef>(v.stat, v.value));
            Util.Populate(out this.statFactors, p.statFactors, (v) => new FloatValueDefStat <StatDef>(v.stat, v.value));
        }
コード例 #2
0
 public GraphicDataStats(GraphicData d)
 {
     this.texPath = d.texPath;
     //this.graphicClass = d.graphicClass;
     Util.AssignDefStat(d.shaderType, out this.shaderType);
     this.color    = new ColorStats(d.color);
     this.colorTwo = new ColorStats(d.colorTwo);
     this.drawSize = new Vector2Stats(d.drawSize);
     this.onGroundRandomRotateAngle = d.onGroundRandomRotateAngle;
     this.drawRotated       = d.drawRotated;
     this.allowFlip         = d.allowFlip;
     this.flipExtraRotation = d.flipExtraRotation;
     if (d.shadowData != null)
     {
         this.shadowData = new ShadowDataStats(d.shadowData);
     }
     if (d.damageData != null)
     {
         this.damageData = new DamageGraphicDataStats(d.damageData);
     }
     this.linkType  = d.linkType;
     this.linkFlags = d.linkFlags;
 }
コード例 #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);
        }