Created
October 23, 2025 09:16
-
-
Save quonic/05fae436cda7f9b4778f1f84d1787645 to your computer and use it in GitHub Desktop.
Rocket Fueling Controls for Stationeers with the Modular Consoles mod
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This script will allow a console to control the | |
| # pumping of V and NO2 from their respective tanks | |
| # into the rocket. It reads pressures from the | |
| # tanks(via pipe analyzers) and rocket, and allows | |
| # the user to control pumps and valves via | |
| # console switches. | |
| # Device Definitions | |
| define TurboPump 1310794736 | |
| define PipeAnalyzer 435685051 | |
| define DigitalValve -1280984102 | |
| define GasCapsuleTankSmall -1385712131 | |
| define LedDisplay -246585138 | |
| define FlipSwitch 1773255945 | |
| define LogicSwitch -1612655781 | |
| # Hashes | |
| # Pumps | |
| define VPumpHash HASH("V Pump Tank to Rocket") | |
| define N2PumpHash HASH("NO2 Pump Tank to Rocket") | |
| # Pipe Analyzers | |
| define VPipeAnalHash HASH("V Tank Pipe Analyzer") | |
| define N2PipeAnalHash HASH("NO2 Tank Pipe Analyzer") | |
| # Digital Valves | |
| define VValveHash HASH("V Valve Tank to Rocket") | |
| define N2ValveHash HASH("NO2 Valve Tank to Rocket") | |
| # Rocket Tanks | |
| define VRcTkHash HASH("V Gas Capsule Tank Small") | |
| define N2RcTkHash HASH("NO2 Gas Capsule Tank Small") | |
| # Console Displays | |
| define VTankPressureDisplayHash HASH("V Tank Pressure Display") | |
| define N2TankPressureDisplayHash HASH("NO2 Tank Pressure Display") | |
| define VRocketPressureDisplayHash HASH("V Rocket Pressure Display") | |
| define N2RocketPressureDisplayHash HASH("NO2 Rocket Pressure Display") | |
| # Console Switches | |
| define VValveSwitchHash HASH("V Valve Switch") | |
| define N2ValveSwitchHash HASH("NO2 Valve Switch") | |
| define VPumpDirSwitchHash HASH("V Pump Dir Switch") | |
| define N2PumpDirSwitchHash HASH("NO2 Pump Dir Switch") | |
| define VPumpSwitchHash HASH("V Pump Switch") | |
| define N2PumpSwitchHash HASH("NO2 Pump Switch") | |
| # Variables | |
| alias VTankPressure r0 | |
| alias N2TankPressure r1 | |
| alias VRocketPressure r2 | |
| alias N2RocketPressure r3 | |
| alias VPumpSwitchStatus r4 | |
| alias N2PumpSwitchStatus r5 | |
| alias VPumpDir r6 | |
| alias N2PumpDir r7 | |
| alias VValveSwitch r8 | |
| alias N2ValveSwitch r9 | |
| # Main Loop | |
| Start: | |
| jal Read | |
| jal Write | |
| yield | |
| j Start | |
| # Subroutines | |
| Read: | |
| lbn VTankPressure PipeAnalyzer VPipeAnalHash Pressure Sum | |
| lbn N2TankPressure PipeAnalyzer N2PipeAnalHash Pressure Sum | |
| lbn VRocketPressure GasCapsuleTankSmall VRcTkHash Pressure Sum | |
| lbn N2RocketPressure GasCapsuleTankSmall N2RcTkHash Pressure Sum | |
| lbn VPumpDir FlipSwitch VPumpDirSwitchHash Setting Average | |
| lbn N2PumpDir FlipSwitch N2PumpDirSwitchHash Setting Average | |
| lbn VPumpSwitchStatus LogicSwitch VPumpSwitchHash Setting Average | |
| lbn N2PumpSwitchStatus LogicSwitch N2PumpSwitchHash Setting Average | |
| lbn VValveSwitch FlipSwitch VValveSwitchHash Setting Average | |
| lbn N2ValveSwitch FlipSwitch N2ValveSwitchHash Setting Average | |
| j ra | |
| Write: | |
| sbn LedDisplay VTankPressureDisplayHash Setting VTankPressure | |
| sbn LedDisplay N2TankPressureDisplayHash Setting N2TankPressure | |
| sbn LedDisplay VRocketPressureDisplayHash Setting VRocketPressure | |
| sbn LedDisplay N2RocketPressureDisplayHash Setting N2RocketPressure | |
| sbn TurboPump VPumpHash Mode VPumpDir | |
| sbn TurboPump N2PumpHash Mode N2PumpDir | |
| sbn TurboPump VPumpHash On VPumpSwitchStatus | |
| sbn TurboPump N2PumpHash On N2PumpSwitchStatus | |
| sbn DigitalValve VValveHash On VValveSwitch | |
| sbn DigitalValve N2ValveHash On N2ValveSwitch | |
| j ra |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment