Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Instrumentation.lua
- ---------------------------------------------------------------------------
- --- Written 2025
- --- This file is part of the Nuclear Reactor Control System Instrumentation
- --- For Bigger Reactors on the ATM9TTS 1.1.3 Server
- --- Created by npick001
- ---
- --- *scope edits by kaibochan
- ---------------------------------------------------------------------------
- local Instruments = {}
- function Instruments.CreateReactorStatus(reactor)
- return {
- activity = Instruments.CheckActivity(reactor),
- control_rod_depths = Instruments.CheckRodDepths(reactor),
- fuel = Instruments.CheckFuel(reactor),
- fuel_heat = Instruments.CheckFuelHeat(reactor),
- waste = Instruments.CheckWaste(reactor),
- power_stored = Instruments.CheckPowerStorage(reactor)
- }
- end
- function Instruments.CheckActivity(r)
- return r.active()
- end
- function Instruments.CheckRodDepths(r)
- -- check rod depth
- num_rods = r.controlRodCount()
- rod_depths = {}
- for i = 0, num_rods - 1 do
- rod_depths[i + 1] = r.getControlRod(i).level()
- end
- return rod_depths
- end
- function Instruments.CheckFuel(r)
- return r.fuelTank().fuel()
- end
- function Instruments.CheckWaste(r)
- return r.fuelTank().waste()
- end
- function Instruments.CheckPowerStorage(r)
- return r.battery().stored()
- end
- function Instruments.CheckFuelHeat(r)
- return r.fuelTemperature()
- end
- return Instruments
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement