Skip to content

Commit

Permalink
Merge pull request tgstation#41921 from kevinz000/patch-584
Browse files Browse the repository at this point in the history
Fixes some instances of storage not closing when it should (on move)
  • Loading branch information
optimumtact authored Dec 16, 2018
2 parents 15c9b20 + 18860d2 commit 0e982ca
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/datums/components/storage/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
RegisterSignal(parent, COMSIG_ITEM_PICKUP, .proc/signal_on_pickup)

RegisterSignal(parent, COMSIG_MOVABLE_POST_THROW, .proc/close_all)
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, .proc/on_move)

RegisterSignal(parent, COMSIG_CLICK_ALT, .proc/on_alt_click)
RegisterSignal(parent, COMSIG_MOUSEDROP_ONTO, .proc/mousedrop_onto)
Expand Down Expand Up @@ -155,6 +156,12 @@
var/datum/component/storage/slave = i
next += slave.parent

/datum/component/storage/proc/on_move()
var/atom/A = parent
for(var/mob/living/L in can_see_contents())
if(!L.CanReach(A))
hide_from(L)

/datum/component/storage/proc/attack_self(datum/source, mob/M)
if(locked)
to_chat(M, "<span class='warning'>[parent] seems to be locked!</span>")
Expand Down

0 comments on commit 0e982ca

Please sign in to comment.