From 89f3427c881046fe78dbdad6d17aeecaecdb3362 Mon Sep 17 00:00:00 2001 From: Drulikar Date: Sat, 29 Jul 2023 15:23:30 -0700 Subject: [PATCH] Fix corpses merging with weeds when hung --- code/datums/components/weed_food.dm | 5 +++++ code/game/objects/items/stacks/predator.dm | 3 +++ 2 files changed, 8 insertions(+) diff --git a/code/datums/components/weed_food.dm b/code/datums/components/weed_food.dm index 0c578b661517..ce6c17e0af95 100644 --- a/code/datums/components/weed_food.dm +++ b/code/datums/components/weed_food.dm @@ -193,6 +193,8 @@ return FALSE if(!parent_turf?.weeds) return FALSE + if(SEND_SIGNAL(parent_mob, COMSIG_ATTEMPT_MOB_PULL) & COMPONENT_CANCEL_MOB_PULL) + return FALSE if(unmerged_time == world.time) return merge_with_weeds() // Weeds upgraded, re-merge now re-using the apperance @@ -245,6 +247,9 @@ UnregisterSignal(parent_buckle, COSMIG_OBJ_AFTER_BUCKLE) parent_buckle = null + if(SEND_SIGNAL(parent_mob, COMSIG_ATTEMPT_MOB_PULL) & COMPONENT_CANCEL_MOB_PULL) + return FALSE + absorbing_weeds = parent_turf?.weeds if(!absorbing_weeds) return FALSE diff --git a/code/game/objects/items/stacks/predator.dm b/code/game/objects/items/stacks/predator.dm index e500932b08f6..42874b907e02 100644 --- a/code/game/objects/items/stacks/predator.dm +++ b/code/game/objects/items/stacks/predator.dm @@ -51,6 +51,8 @@ SPAN_NOTICE("You start hanging [victim] up by the rope...")) if(!do_after(user, 3 SECONDS, INTERRUPT_NO_NEEDHAND, BUSY_ICON_HOSTILE, victim)) return + if(victim.anchored) + return // Just in case weed_food took them during this time user.visible_message(SPAN_WARNING("[user] hangs [victim] from the ceiling!"), SPAN_NOTICE("You finish hanging [victim].")) user.stop_pulling() victim.get_hung() @@ -106,4 +108,5 @@ apply_transform(A) pixel_x = 0 pixel_y = 0 + Moved(loc, NONE, TRUE) // Trigger any movement signals return COMPONENT_CANCEL_ATTACK