Esempio n. 1
0
        public override void PreAbsorbStack(Thing otherStack, int count)
        {
            CompDTemperature newComp = otherStack.TryGetComp <CompDTemperature>();

            if (newComp != null)
            {
                this.curTemp = (this.curTemp * this.parent.stackCount + newComp.curTemp * count) / (float)(this.parent.stackCount + count);
            }
            base.PreAbsorbStack(otherStack, count);
        }
Esempio n. 2
0
        public override void PostSplitOff(Thing piece)
        {
            CompDTemperature newComp = piece.TryGetComp <CompDTemperature>();

            if (newComp != null)
            {
                newComp.curTemp = curTemp;
            }
            base.PostSplitOff(piece);
        }
Esempio n. 3
0
        public override void PostIngested(Pawn ingester)
        {
            CompDTemperature temp = ingester.TryGetComp <CompDTemperature>();

            if (temp != null)
            {
                temp.curTemp += (this.curTemp - temp.curTemp) / 5.0f;
            }
            if (ingester.needs.mood != null)
            {
                ThoughtDef memory = GetIngestMemory();
                if (memory != null)
                {
                    MakeIngestMemory(memory, ingester);
                }
            }
            base.PostIngested(ingester);
        }