mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
adds a check to see if storage container is secured/locked on disposal units (#15359)
This commit is contained in:
@@ -177,6 +177,13 @@
|
||||
|
||||
if(istype(I, /obj/item/storage) && length(I.contents) && user.a_intent != I_HURT)
|
||||
var/obj/item/storage/S = I
|
||||
|
||||
if(istype(S, /obj/item/storage/secure))
|
||||
var/obj/item/storage/secure/secured_storage = S
|
||||
if(secured_storage.locked)
|
||||
to_chat(user, SPAN_WARNING("You can't empty \the [secured_storage] into \the [src]. It is locked."))
|
||||
return TRUE
|
||||
|
||||
user.visible_message("<b>[user]</b> empties \the [S] into \the [src].", SPAN_NOTICE("You empty \the [S] into \the [src]."), range = 3)
|
||||
for(var/obj/item/O in S.contents)
|
||||
S.remove_from_storage(O, src)
|
||||
|
||||
Reference in New Issue
Block a user