mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
cyborg trays drop stuff upon death. NAD disallowed
This commit is contained in:
@@ -381,11 +381,11 @@
|
||||
flags = CONDUCT
|
||||
materials = list(MAT_METAL=3000)
|
||||
|
||||
/obj/item/storage/bag/tray/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
..()
|
||||
/obj/item/storage/bag/tray/attack(mob/living/M, mob/living/user)
|
||||
. = ..()
|
||||
// Drop all the things. All of them.
|
||||
var/list/obj/item/oldContents = contents.Copy()
|
||||
quick_empty()
|
||||
drop_inventory(user)
|
||||
|
||||
// Make each item scatter a bit
|
||||
for(var/obj/item/I in oldContents)
|
||||
@@ -418,6 +418,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/storage/bag/tray/cyborg
|
||||
cant_hold = list(/obj/item/disk/nuclear) // Prevents some cheesing
|
||||
|
||||
/obj/item/storage/bag/tray/cyborg/afterattack(atom/target, mob/user as mob)
|
||||
if( isturf(target) || istype(target,/obj/structure/table) )
|
||||
|
||||
@@ -438,8 +438,11 @@
|
||||
if((!ishuman(usr) && (src.loc != usr)) || usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
drop_inventory(usr)
|
||||
|
||||
/obj/item/storage/proc/drop_inventory(user)
|
||||
var/turf/T = get_turf(src)
|
||||
hide_from(usr)
|
||||
hide_from(user)
|
||||
for(var/obj/item/I in contents)
|
||||
remove_from_storage(I, T)
|
||||
CHECK_TICK
|
||||
@@ -499,10 +502,9 @@
|
||||
|
||||
/obj/item/storage/attack_self(mob/user)
|
||||
|
||||
//Clicking on itself will empty it, if it has the verb to do that.
|
||||
if(user.is_in_active_hand(src))
|
||||
if(verbs.Find(/obj/item/storage/verb/quick_empty))
|
||||
quick_empty()
|
||||
//Clicking on itself will empty it, if allow_quick_empty is TRUE
|
||||
if(allow_quick_empty && user.is_in_active_hand(src))
|
||||
drop_inventory(user)
|
||||
|
||||
//Returns the storage depth of an atom. This is the number of storage items the atom is contained in before reaching toplevel (the area).
|
||||
//Returns -1 if the atom was not found on container.
|
||||
|
||||
Reference in New Issue
Block a user