View difference between Paste ID: CSAeX7zk and JQdGHZbg
SHOW: | | - or go back to the newest paste.
1
-- modified to work with draconic rf storage (trying to determine actual 'gain' from reactor)
2
local stabilizer = peripheral.wrap("right")
3
local storage = peripheral.find("draconic_rf_storage")
4
local monitor = peripheral.wrap("bottom")
5
6
term.redirect(monitor)
7
local x=0
8
local y=0
9
while true do
10
11
monitor.clear()
12
13
--for key,value in pairs(storage) do
14
--print("key: "..key..", value: "..value)
15
--end
16
17-
print(x..", "..((((x-y)/1000/1000)/3)*20).."MRF/t"..", "..(x*100/2140000000000).."%")
17+
18
y=x
19
x=storage.getEnergyStored()
20
--end
21
--local stabilizer = core.getReactorInfo()
22
23
--for _, method in pairs(stabilizer) do
24-
--print("              status: "..stabilizer.status)
24+
25-
--print("      generationRate: "..stabilizer.generationRate.." RF/t")
25+
26-
--print("         temperature: "..stabilizer.temperature)
26+
print("              status: "..stabilizer.status)
27-
--print("       fieldStrength: "..stabilizer.fieldStrength)
27+
print("      generationRate: "..stabilizer.generationRate.." RF/t")
28-
--print("    maxFieldStrength: "..stabilizer.maxFieldStrength)
28+
print("         temperature: "..stabilizer.temperature)
29-
--print("      fieldDrainRate: "..stabilizer.fieldDrainRate)
29+
print("       fieldStrength: "..stabilizer.fieldStrength)
30-
--print("Fuel Conversion Rate: "..stabilizer.fuelConversionRate.." nb/t")
30+
print("    maxFieldStrength: "..stabilizer.maxFieldStrength)
31-
--print("   maxFuelConversion: "..stabilizer.maxFuelConversion)
31+
print("      fieldDrainRate: "..stabilizer.fieldDrainRate)
32-
--local fuelConversionPercent=stabilizer.fuelConversion*100/stabilizer.maxFuelConversion
32+
print("Fuel Conversion Rate: "..stabilizer.fuelConversionRate.." nb/t")
33-
--print("      fuelConversion: "..stabilizer.fuelConversion.."("..fuelConversionPercent.."%)")
33+
print("   maxFuelConversion: "..stabilizer.maxFuelConversion)
34-
--local energySaturationPercent=stabilizer.energySaturation*100/stabilizer.maxEnergySaturation
34+
local fuelConversionPercent=stabilizer.fuelConversion*100/stabilizer.maxFuelConversion
35-
--print("    energySaturation: "..stabilizer.energySaturation.."("..energySaturationPercent.."%)")
35+
print("      fuelConversion: "..stabilizer.fuelConversion.."("..fuelConversionPercent.."%)")
36-
--print(" maxEnergySaturation: "..stabilizer.maxEnergySaturation)
36+
local energySaturationPercent=stabilizer.energySaturation*100/stabilizer.maxEnergySaturation
37-
--local fieldStrengthPercent=stabilizer.fieldStrength*100/stabilizer.maxFieldStrength
37+
print("    energySaturation: "..stabilizer.energySaturation.."("..energySaturationPercent.."%)")
38-
--print("      fieldStrength%: "..fieldStrengthPercent)
38+
print(" maxEnergySaturation: "..stabilizer.maxEnergySaturation)
39-
--if (fieldStrengthPercent<51 or energySaturationPercent<51) then
39+
local fieldStrengthPercent=stabilizer.fieldStrength*100/stabilizer.maxFieldStrength
40-
-- if it's < than some kill switch probably have it scram the reactor
40+
print("      fieldStrength%: "..fieldStrengthPercent)
41-
--  redstone.setOutput("back", not redstone.getOutput("back"))
41+
print(" Energy Core Storage: "..x..", "..((((x-y)/1000/1000)/2)*20).."MRF/t"..", "..(x*100/2140000000000).."%")
42-
--  redstone.setOutput("top",false)
42+
43
if (fieldStrengthPercent<51 or energySaturationPercent<51) then
44-
--if (fieldStrengthPercent>51 and energySaturationPercent>51) then
44+
 if it's < than some kill switch probably have it scram the reactor
45-
--  redstone.setOutput("back",false)
45+
  redstone.setOutput("back", not redstone.getOutput("back"))
46-
--  redstone.setOutput("top",not redstone.getOutput("top"))
46+
  redstone.setOutput("top",false)
47
end
48
if (fieldStrengthPercent>51 and energySaturationPercent>51) then
49
  redstone.setOutput("back",false)
50
  redstone.setOutput("top",not redstone.getOutput("top"))
51
end
52
sleep(2)
53
end