См. определение в файле Torch.c строка 294
295 {
297 {
298 return;
299 }
302 float torchCurrentEnergy = GetCompEM().GetEnergy();
303 float sourceQuantity = 100000;
304
305 if (source)
306 {
307 sourceQuantity = source.GetQuantity();
308 }
309
311
313
314 float freeUpgradeCapacity = maxOverallCapacity - torchCurrentEnergy;
315 float upgradeQuantity = Math.Min(freeUpgradeCapacity, sourceQuantity);
316 int upgradedRags = Math.Ceil((upgradeQuantity + currentlyUpgraded) /
m_BurnTimePerRagEx);
319 GetCompEM().AddEnergy(upgradeQuantity);
321 if (source)
322 {
323 source.AddQuantity(-upgradeQuantity);
324 }
327 }
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().