Merge pull request #11093 from VOREStation/Arokha/emptynear

Allow emptying contents from nearby bags
This commit is contained in:
Aronai Sieyes
2021-07-15 15:03:21 -04:00
committed by GitHub
@@ -662,9 +662,20 @@
/obj/item/weapon/storage/verb/quick_empty()
set name = "Empty Contents"
set category = "Object"
set src in view(1)
if(((!(ishuman(usr) || isrobot(usr))) && (src.loc != usr)) || usr.stat || usr.restrained())
// Only humans and robots can dump contents
if(!(ishuman(usr) || isrobot(usr)))
return
// Hard to do when you're KO'd
if(usr.incapacitated())
return
// Has to be at least adjacent (just for safety, src in view should handle this already)
if(!Adjacent(usr))
return
drop_contents()
/obj/item/weapon/storage/proc/drop_contents() // why is this a proc? literally just for RPEDs