Compare commits

...

2 Commits

Author SHA1 Message Date
0544d04e85 react: switch to percentage 2024-10-25 00:56:48 +02:00
19741c17a8 update README 2024-10-25 00:56:41 +02:00
2 changed files with 21 additions and 19 deletions

View File

@ -1,4 +1,4 @@
Set up on the computer with `wget https://git.navidsassan.ch/navid.sassan/computercraft/-/raw/master/get get`.
Set up on the computer with `wget https://git.navidsassan.ch/navid.sassan/computercraft/raw/branch/master/get get`. Make sure to enable the http API in the computercraft config file on the server.
Then use `get README.md` for example, to download the `README.md`.

26
react
View File

@ -3,18 +3,6 @@
--import utils for lamp rednet stuffs
require("git-scripts.utils")
--regulate in between these in normal operation
NORMAL_THRESHOLD_U = 8000000
NORMAL_THRESHOLD_L = 7000000
--control rod pos for normal operation
NORMAL_ROD_POS = 81
--proportionally increase production when energy
--storage drops below this level
--(by removing control rods)
HIGH_THRESHOLD = 6000000
local active = false
local ctrl_rods = NORMAL_ROD_POS
@ -28,7 +16,21 @@ if modemSide then --not nil
lampID = rednet.lookup("reactLamp", "reactLamp")
end
--regulate in between these in normal operation
NORMAL_THRESHOLD_U = 0.8 * reactor.getEnergyCapacity()
NORMAL_THRESHOLD_L = 0.7 * reactor.getEnergyCapacity()
--control rod pos for normal operation
NORMAL_ROD_POS = 81
--proportionally increase production when energy
--storage drops below this level
--(by removing control rods)
HIGH_THRESHOLD = 0.6 * reactor.getEnergyCapacity()
print("Monitoring reactor...")
print("NORMAL_THRESHOLD_U: " .. NORMAL_THRESHOLD_U)
print("NORMAL_THRESHOLD_L: " .. NORMAL_THRESHOLD_L)
print("HIGH_THRESHOLD: " .. HIGH_THRESHOLD)
while (true)
do