From 92549836ab8d06a2ec1c60b0e09f4e8026da9b27 Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 26 May 2025 15:23:46 -0500 Subject: [PATCH] Fix shuttle engines `anchored` state not matching `engine_state` (#91345) ## About The Pull Request Building a shuttle engine from a circuit has a misaligned state where you can weld it immediately because it thinks the engine is already anchored when it is not. This results in welded engines being able to be dragged and moved around. ## Why It's Good For The Game Bugfix. ## Changelog :cl: fix: Fix shuttle engines built from a circuit board having it's `anchored` state not matching the correct `engine_state`. This would consider the engine to be anchored already when it was not and allow someone to weld it despite it being able to be dragged and moved around. /:cl: --- code/game/shuttle_engines.dm | 7 +++---- code/modules/cargo/packs/engineering.dm | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/code/game/shuttle_engines.dm b/code/game/shuttle_engines.dm index bc8d594b8c9..35bd07a7f07 100644 --- a/code/game/shuttle_engines.dm +++ b/code/game/shuttle_engines.dm @@ -39,6 +39,9 @@ . = ..() AddComponent(/datum/component/simple_rotation) register_context() + if(!mapload) + engine_state = ENGINE_UNWRENCHED + anchored = FALSE /obj/machinery/power/shuttle_engine/on_construction(mob/user) . = ..() @@ -191,10 +194,6 @@ name = "burst engine" desc = "An engine that releases a large bluespace burst to propel it." -/obj/machinery/power/shuttle_engine/propulsion/burst/cargo - engine_state = ENGINE_UNWRENCHED - anchored = FALSE - /obj/machinery/power/shuttle_engine/propulsion/burst/left name = "left burst engine" icon_state = "burst_l" diff --git a/code/modules/cargo/packs/engineering.dm b/code/modules/cargo/packs/engineering.dm index 0173fd69e7f..ee808e9a8d6 100644 --- a/code/modules/cargo/packs/engineering.dm +++ b/code/modules/cargo/packs/engineering.dm @@ -103,7 +103,7 @@ cost = CARGO_CRATE_VALUE * 6 access = ACCESS_CE access_view = ACCESS_CE - contains = list(/obj/machinery/power/shuttle_engine/propulsion/burst/cargo) + contains = list(/obj/machinery/power/shuttle_engine/propulsion/burst) crate_name = "shuttle engine crate" crate_type = /obj/structure/closet/crate/secure/engineering