Skip to content

Commit

Permalink
Fix the bodybag RegisterSignal (tgstation#44896)
Browse files Browse the repository at this point in the history
Missed a callback being used to register a signal.
  • Loading branch information
ninjanomnom authored and SpaceManiac committed Jul 3, 2019
1 parent baf5ed8 commit 1ce7742
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions code/game/objects/items/bodybag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,10 @@
unfoldedbag_path = /obj/structure/closet/body_bag/bluespace
w_class = WEIGHT_CLASS_SMALL
item_flags = NO_MAT_REDEMPTION
var/static/datum/callback/canreach_blocking_callback = CALLBACK(GLOBAL_PROC, .proc/__bluespace_bodybag_canreach_block)

/obj/item/bodybag/bluespace/Initialize()
. = ..()
RegisterSignal(src, COMSIG_ATOM_CANREACH, canreach_blocking_callback)

/proc/__bluespace_bodybag_canreach_block()
return COMPONENT_BLOCK_REACH
RegisterSignal(src, COMSIG_ATOM_CANREACH, .proc/CanReachReact)

/obj/item/bodybag/bluespace/examine(mob/user)
. = ..()
Expand All @@ -66,6 +62,9 @@
to_chat(A, "<span class='notice'>You suddenly feel the space around you torn apart! You're free!</span>")
return ..()

/obj/item/bodybag/bluespace/proc/CanReachReact(atom/movable/source, list/next)
return COMPONENT_BLOCK_REACH

/obj/item/bodybag/bluespace/deploy_bodybag(mob/user, atom/location)
var/obj/structure/closet/body_bag/R = new unfoldedbag_path(location)
for(var/atom/movable/A in contents)
Expand Down

0 comments on commit 1ce7742

Please sign in to comment.