public override void PreAbsorbStack(Thing otherStack, int count) { float t = (float)count / (float)(this.parent.stackCount + count); CompTempTransforms comp = ((ThingWithComps)otherStack).GetComp <CompTempTransforms>(); this.ruinedPercent = Mathf.Lerp(this.ruinedPercent, comp.ruinedPercent, t); }
public override bool AllowStackWith(Thing other) { CompTempTransforms comp = ((ThingWithComps)other).GetComp <CompTempTransforms>(); return(this.Ruined == comp.Ruined); }