Skip to content

Commit

Permalink
Fix corpses merging with weeds when hung
Browse files Browse the repository at this point in the history
  • Loading branch information
Drulikar committed Jul 29, 2023
1 parent 4e8cdad commit 89f3427
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions code/datums/components/weed_food.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions code/game/objects/items/stacks/predator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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

0 comments on commit 89f3427

Please sign in to comment.