mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 05:27:39 +01:00
Merge pull request #11093 from VOREStation/Arokha/emptynear
Allow emptying contents from nearby bags
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user