См. определение в файле Torch.c строка 287
288 {
290 {
291 return;
292 }
295 float torchCurrentEnergy = GetCompEM().GetEnergy();
296 float sourceQuantity = 100000;
297
298 if (source)
299 {
300 sourceQuantity = source.GetQuantity();
301 }
302
304
306
307 float freeUpgradeCapacity = maxOverallCapacity - torchCurrentEnergy;
308 float upgradeQuantity = Math.Min(freeUpgradeCapacity, sourceQuantity);
309 int upgradedRags = Math.Ceil((upgradeQuantity + currentlyUpgraded) /
m_BurnTimePerRagEx);
312 GetCompEM().AddEnergy(upgradeQuantity);
314 if (source)
315 {
316 source.AddQuantity(-upgradeQuantity);
317 }
320 }
void UpdateCheckForReceivingUpgrade()
bool m_ConsumeRagFlipFlop
void LockRags(bool do_lock)
Перекрестные ссылки CalculateQuantity(), Math::Ceil(), GetRag(), GetRagQuantity(), LockRags(), m_BurnTimePerRagEx, m_ConsumeRagFlipFlop, m_RagsUpgradedCount, Math::Max(), Math::Min(), RuinRags() и UpdateCheckForReceivingUpgrade().
Используется в RecipeBase::Do().