×
Create a new article
Write your page title here:
We currently have 277 articles on Waste Of Space Wiki. Type your article name above or create one of the articles listed here!



    Waste Of Space Wiki

    Automatic Reactor: Difference between revisions

    Content deleted Content added
    Fixed one typo
    L4PRY (talk | contribs)
    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.
    To refill a reactor automatically, you need to attach a microcontroller to the reactor, with a port touching a Dispenser and a Polysilicon (Mode2 and has to be touching the reactor). The code will use port ID 1 to read the reactor's fuel status, port ID 2 to control the dispenser and port ID 3 to eject [[NuclearWaste|nuclear waste]].
    # 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.

    The code will use port ID 1 to read the reactor's fuel status, port ID 2 to control the dispenser and port ID 3 to eject [[NuclearWaste|nuclear waste]].


    <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] <= 0 then
    if fuel[i] <= eject_time then
    TriggerPort(3)
    TriggerPort(3)
    dispenser:Dispense()
    dispenser:Dispense()
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.

    Recent changes

  • Jo857294 • 1 day ago
  • 116.111.185.163 • 13 days ago
  • 116.111.185.163 • 13 days ago
  • 116.111.185.163 • 13 days ago
  • Cookies help us deliver our services. By using our services, you agree to our use of cookies.