mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Close storage UI when item becomes inaccessible (#14536)
* add hide_from_all to storage objects, to call by something once it's locked/close * lockers call hide_from_all on stored storage items * secure storage calls hide_from_all on lock * throwing storage closes it * adding storage to a disposal chute closes it * adding storage to a crate closes it * adding storage to the destructive analyzer closes it
This commit is contained in:
@@ -103,8 +103,8 @@
|
||||
to_chat(user, "You can't place that item inside the disposal unit.")
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/storage))
|
||||
var/obj/item/storage/S = I
|
||||
var/obj/item/storage/S = I
|
||||
if(istype(S))
|
||||
if((S.allow_quick_empty || S.allow_quick_gather) && S.contents.len)
|
||||
S.hide_from(user)
|
||||
user.visible_message("[user] empties \the [S] into \the [src].", "You empty \the [S] into \the [src].")
|
||||
@@ -134,6 +134,8 @@
|
||||
if(!user.drop_item())
|
||||
return
|
||||
if(I)
|
||||
if(istype(S))
|
||||
S.hide_from_all()
|
||||
I.forceMove(src)
|
||||
|
||||
to_chat(user, "You place \the [I] into the [src].")
|
||||
|
||||
Reference in New Issue
Block a user