private void TryTakeFuelFromFeeder(CoalFeeder feeder) { if (Find.TickManager.TicksGame % 5 == 0 && takingResources) { if (feeder.HasFuelItem && !reachedMax) { feeder.ContainedFuel.stackCount--; if (feeder.ContainedFuel.stackCount == 0) { feeder.ContainedFuel.Destroy(); } fuel++; if (fuel >= maxFuel - 1) { reachedMax = true; } } else { if (reachedMax && fuel < maxFuel / 2) { reachedMax = false; } } } }