mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +01:00
Try using backpack for failed item storage first.
Conflicts: code/modules/mob/mob.dm
This commit is contained in:
@@ -143,12 +143,17 @@
|
||||
// Convinience proc. Collects crap that fails to equip either onto the mob's back, or drops it.
|
||||
// Used in job equipping so shit doesn't pile up at the start loc.
|
||||
/mob/living/carbon/human/proc/equip_or_collect(var/obj/item/W, var/slot)
|
||||
if(!equip_to_slot_or_del(W, slot))
|
||||
// Do I have a bag?
|
||||
var/obj/item/weapon/storage/bag/plasticbag/B = is_in_hands(/obj/item/weapon/storage/bag/plasticbag)
|
||||
if(!equip_to_slot_or_drop(W, slot))
|
||||
// Do I have a backpack?
|
||||
var/obj/item/weapon/storage/B = back
|
||||
|
||||
// Do I have a plastic bag?
|
||||
if(!B)
|
||||
B=is_in_hands(/obj/item/weapon/storage/bag/plasticbag)
|
||||
|
||||
if(!B)
|
||||
// Gimme one.
|
||||
B=new(null) // Null in case of failed equip.
|
||||
B=new /obj/item/weapon/storage/bag/plasticbag(null) // Null in case of failed equip.
|
||||
if(!put_in_hands(B,slot_back))
|
||||
return // Fuck it
|
||||
B.handle_item_insertion(W,1)
|
||||
|
||||
Reference in New Issue
Block a user