mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Slightly refactors storage item insertion (#24429)
* everything is on fire * silent trait check * how did it even become CRLF * minor formatting * fix icon updating and adds silent insertion to global trait list * adds the new parameter to documentation - whoops! * pain * contra review * contra review again, reduces amount of checks for user in the loops --------- Co-authored-by: cybercapitalism <98280110+cybercapitalism@users.noreply.github.com>
This commit is contained in:
co-authored by
cybercapitalism
parent
25848b6988
commit
19c0b70171
@@ -272,7 +272,7 @@
|
||||
// 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(obj/item/W, slot, initial = FALSE)
|
||||
if(W.mob_can_equip(src, slot, 1))
|
||||
if(W.mob_can_equip(src, slot, TRUE))
|
||||
//Mob can equip. Equip it.
|
||||
equip_to_slot_or_del(W, slot, initial)
|
||||
else
|
||||
@@ -280,12 +280,12 @@
|
||||
if(isstorage(back))
|
||||
var/obj/item/storage/S = back
|
||||
//Now, S represents a container we can insert W into.
|
||||
S.handle_item_insertion(W, TRUE, TRUE)
|
||||
S.handle_item_insertion(W, src, TRUE, TRUE)
|
||||
return S
|
||||
if(ismodcontrol(back))
|
||||
var/obj/item/mod/control/C = back
|
||||
if(C.bag)
|
||||
C.bag.handle_item_insertion(W, TRUE, TRUE)
|
||||
C.bag.handle_item_insertion(W, src, TRUE, TRUE)
|
||||
return C.bag
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
Reference in New Issue
Block a user