From 383c94df25bac5167df78d2ae776776152f3f7bb Mon Sep 17 00:00:00 2001 From: Rune Knight <30399783+Runian@users.noreply.github.com> Date: Thu, 2 May 2024 01:55:03 -0700 Subject: [PATCH] Various mecha bugfixes (#21982) * mech luxury bugfix * clamp bugfix * fulton bugfix * () --- code/game/mecha/equipment/tools/work_tools.dm | 5 ++++- code/modules/mining/fulton.dm | 7 +++++++ code/modules/shuttle/special.dm | 6 ++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 7ad9827407dd..b5f0fa151302 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -11,11 +11,11 @@ energy_drain = 10 toolspeed = 0.5 usesound = 'sound/mecha/hydraulic.ogg' - tool_behaviour = TOOL_CROWBAR equip_actions = list(/datum/action/innate/mecha/equipment/clamp_mode) /// How much damage does it apply when used var/dam_force = 20 var/obj/mecha/working/ripley/cargo_holder + var/previous_tool_behavior = TOOL_CROWBAR harmful = FALSE /datum/action/innate/mecha/equipment/clamp_mode @@ -41,11 +41,14 @@ /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/attach(obj/mecha/M as obj) ..() cargo_holder = M + tool_behaviour = previous_tool_behavior return /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/detach(atom/moveto = null) ..() cargo_holder = null + previous_tool_behavior = tool_behaviour + tool_behaviour = 0 /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/action(atom/target, mob/living/user, params) if(!action_checks(target)) diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm index 19eea5ae191a..7109efc0219d 100644 --- a/code/modules/mining/fulton.dm +++ b/code/modules/mining/fulton.dm @@ -257,6 +257,13 @@ GLOBAL_LIST_EMPTY(total_extraction_beacons) chosen_mecha.forceMove(pod) stored_mecha -= chosen_mecha new /obj/effect/DPtarget(get_teleport_turf(get_turf(user), 1), pod) + finalize_mech(chosen_mecha) + +/obj/item/extraction_pack/mech_drop/proc/finalize_mech(obj/mecha/mecha) + // Reverts the anchor & density given by the extraction pack which would of been done through uses_beacon (but didn't because it was set to FALSE). + mecha.anchored = FALSE + mecha.density = initial(mecha.density) + return FALSE /obj/item/extraction_pack/mech_drop/examine() . = ..() diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm index ba49735c5d1a..ea11223652bd 100644 --- a/code/modules/shuttle/special.dm +++ b/code/modules/shuttle/special.dm @@ -247,6 +247,12 @@ set_scanline("scanning", 10) return TRUE + if(ismecha(mover)) + var/obj/mecha/mech = mover + if(mech.occupant != null && (mech.occupant in approved_passengers)) + set_scanline("scanning", 10) + return TRUE + if(!isliving(mover)) //No stowaways return FALSE return FALSE