mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
fix PWRangler crashing with PWRs using heat sinks
This commit is contained in:
parent
89b1cb1de0
commit
871de4ae47
@ -22,7 +22,12 @@ local mt = {
|
||||
}
|
||||
setmetatable(const, mt)
|
||||
|
||||
const.fullCoreHeatMAX = 9000000
|
||||
for address, _ in component.list("ntm_pwr_control") do
|
||||
pwrController = address
|
||||
end
|
||||
|
||||
_, _, const.coreHeatCapacity = call(pwrController, "getHeat")
|
||||
const.fullCoreHeatMAX = const.coreHeatCapacity * 0.9
|
||||
const.coldCoolantLevelMIN = 10000
|
||||
const.hotCoolantLevelMAX = 0.5
|
||||
|
||||
@ -88,10 +93,6 @@ buttons[9] = newButton(94, 9, 12, 2, 0x00FF00, 0x00AA00, function() coolantLossE
|
||||
|
||||
buttons[10] = newButton(107, 8, 5, 3, 0xFF0000, 0xAA0000, function() runSig = false end)
|
||||
|
||||
for address, _ in component.list("ntm_pwr_control") do
|
||||
pwrController = address
|
||||
end
|
||||
|
||||
gpu.setForeground(0xAAAAAA)
|
||||
|
||||
--Control rods
|
||||
@ -203,7 +204,7 @@ while (runSig == true) do
|
||||
rodLevel = call(pwrController, "getLevel")
|
||||
|
||||
coreHeat, _ = call(pwrController, "getHeat")
|
||||
coreHeat = coreHeat//1000000
|
||||
coreHeat = coreHeat // (const.coreHeatCapacity / 10)
|
||||
|
||||
for _, b in pairs(buttons) do
|
||||
drawButton(b, b.colorUp)
|
||||
@ -243,7 +244,7 @@ while (runSig == true) do
|
||||
|
||||
fullCoreHeat, fullHullHeat = call(pwrController, "getHeat")
|
||||
coldCoolantLevel, _, hotCoolantLevel, maxHotCoolantLevel = call(pwrController, "getCoolantInfo")
|
||||
|
||||
|
||||
coldCoolantOutflow = coldCoolantLevel - prevCoolantFlow
|
||||
hotCoolantOutflow = hotCoolantLevel - prevHotCoolantFlow
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user