Esempio n. 1
0
		public override bool TryMergeWith(Hediff other)
		{
			if (other == null || other.def != def || other.Part != Part)
			{
				return false;
			}
			HediffStacks addition = (HediffStacks) other;
			stacksList.Add(addition);
			Severity += addition.stacks;
			return true;
		}
Esempio n. 2
0
		public override void Tick()
        {
			base.Tick();
			if (!done && (duration <= ageTicks||(link!=null && link.ShouldRemove)))
            {
				Severity -= stacks;
				done = true;
			}
			for (int i = stacksList.Count - 1; i >= 0; i--)
			{
				HediffStacks stack = stacksList[i];
				stack.Tick();
				if (stack.ShouldRemove)
                {
					Severity -= stack.stacks;
					stacksList.RemoveAt(i);
				}
			}
		}