Content deleted Content added
Fixed one typo |
No edit summary |
||
Line 10: | Line 10: | ||
Additionally, you can place a Mode 2 (Flip-Flop) polysilicon to eject Uranium/NuclearWaste. |
Additionally, you can place a Mode 2 (Flip-Flop) polysilicon to eject Uranium/NuclearWaste. |
||
To refill a reactor automatically, here's a few steps. |
|||
⚫ | |||
# Firstly, get a microcontroller and put it on the Reactor. |
|||
# Get a [[Port|port]] (Configure PortID to 1) and attach a Polysilicon (Configured to Flip-Flop) to it. This must be touching the Reactor aswell. |
|||
# Get a [[Dispenser|dispenser]] and attach it to a port (Configure PortID to 2) above the Reactor. |
|||
# Put the script below into the microcontroller and power it. |
|||
# Keep it mind, that you have to turn the microcontroller on, obviously. For this you should use a [[Transformer|transformer]] with an Activate polysilicon to turn it on everytime you rejoin. Transformers have to be powered in order to work. |
|||
⚫ | |||
<syntaxhighlight lang="lua" line="1"> |
<syntaxhighlight lang="lua" line="1"> |
||
local eject_time = 0.9 --This determines when to eject, change this to control when you want to eject fuel. (0 to 1) |
|||
local reactor = GetPartFromPort(1, "Reactor") |
local reactor = GetPartFromPort(1, "Reactor") |
||
local dispenser = GetPartFromPort(2, "Dispenser") |
local dispenser = GetPartFromPort(2, "Dispenser") |
||
Line 19: | Line 29: | ||
local fuel = reactor:GetFuel() |
local fuel = reactor:GetFuel() |
||
for i = 1, #fuel do |
for i = 1, #fuel do |
||
if fuel[i] <= |
if fuel[i] <= eject_time then |
||
TriggerPort(3) |
TriggerPort(3) |
||
dispenser:Dispense() |
dispenser:Dispense() |