Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix corpses merging with weeds when hung #4051

Merged
merged 1 commit into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
harryob marked this conversation as resolved.
Show resolved Hide resolved
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
Loading