예제 #1
0
        public override void Apply(ref float statValue, StatDef statDef, Thing thing)
        {
            ThingWithComps thingWithComps = (ThingWithComps)thing;

            CompAutomataDataHolder comp = thingWithComps.TryGetComp <CompAutomataDataHolder>();

            statValue += Mathf.Max((comp?.MarketValue ?? 0f) * multiplier + addition, 0f);
        }
        public override void Apply(ref float statValue, StatDef statDef, Thing thing)
        {
            ThingWithComps thingWithComps = (ThingWithComps)thing;

            CompAutomataDataHolder comp = thingWithComps.TryGetComp <CompAutomataDataHolder>();

            if (comp != null)
            {
                float materialStat = GetMaterialStuffPower(comp.automataData.baseMaterialDef, statDef);
                statValue += Mathf.Max(materialStat * multiplier + addition, 0f);
            }
        }
예제 #3
0
 public void CopyFrom(CompAutomataDataHolder other)
 {
     automataData = other.automataData;
 }