From 249495424be9a511fe1f8a622d15e46d92e8380b Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 9 May 2024 08:36:12 +0200 Subject: [PATCH] [MIRROR] Fixes deployable turrets not actually being undeployable. (#27655) * Fixes deployable turrets not actually being undeployable. (#83061) Fixes #83053 --------- Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com> * Fixes deployable turrets not actually being undeployable. --------- Co-authored-by: Afevis Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com> --- code/game/objects/structures/deployable_turret.dm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/code/game/objects/structures/deployable_turret.dm b/code/game/objects/structures/deployable_turret.dm index ac4b35678c9..7b03348288a 100644 --- a/code/game/objects/structures/deployable_turret.dm +++ b/code/game/objects/structures/deployable_turret.dm @@ -51,19 +51,21 @@ /// Undeploying, for when you want to move your big dakka around /obj/machinery/deployable_turret/wrench_act(mob/living/user, obj/item/wrench/used_wrench) - . = ..() if(!can_be_undeployed) - return + return ITEM_INTERACT_SKIP_TO_ATTACK if(!ishuman(user)) - return + return ITEM_INTERACT_SKIP_TO_ATTACK used_wrench.play_tool_sound(user) user.balloon_alert(user, "undeploying...") if(!do_after(user, undeploy_time)) - return - var/obj/undeployed_object = new spawned_on_undeploy(src) + return ITEM_INTERACT_BLOCKING + var/obj/undeployed_object = new spawned_on_undeploy() //Keeps the health the same even if you redeploy the gun undeployed_object.modify_max_integrity(max_integrity) + if(!user.put_in_hands(undeployed_object)) + undeployed_object.forceMove(loc) qdel(src) + return ITEM_INTERACT_SUCCESS //BUCKLE HOOKS