adds a check to see if storage container is secured/locked on disposal units (#15359)

This commit is contained in:
harryob
2022-12-19 14:29:22 +00:00
committed by GitHub
parent 0bb4bb7807
commit 01dcbb5ddc
2 changed files with 13 additions and 0 deletions
+7
View File
@@ -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)
@@ -0,0 +1,6 @@
author: harryob
delete-after: True
changes:
- bugfix: "Disposal units no longer bypass high tech locking devices."