From 9c22f72d4ec5758b0002d6c411c77b56cb1d1031 Mon Sep 17 00:00:00 2001 From: templeofshadow Date: Mon, 29 Jun 2026 14:12:07 -0500 Subject: [PATCH] add nil check for rotator thrusters with nil transmissions --- main.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.lua b/main.lua index f8b3343..4df75a3 100644 --- a/main.lua +++ b/main.lua @@ -663,6 +663,11 @@ function SetThrusterPower(thruster, power) if thruster.type == "rotator" then thruster.power = power local actualPower = 0 + if thruster.transmission == nil then + print("ERROR: SetThrusterPower called with nil transmission for rotator thruster.") + print("Thruster: "..thruster.name) + return + end if peripheral.getType(peripheral.wrap(thruster.transmission)) == "Create_RotationSpeedController" then if (math.ceil(power*256) - power*256 <= 0.5) then actualPower = math.ceil(power*256)