slot_equipment_priority no longer contributes to list init overhead

This commit is contained in:
c0
2016-06-18 05:09:15 +03:00
parent 1311fb9b43
commit 0abc91c59d
3 changed files with 25 additions and 18 deletions
+14 -1
View File
@@ -231,8 +231,21 @@ var/next_mob_id = 0
//returns 0 if it cannot, 1 if successful
/mob/proc/equip_to_appropriate_slot(obj/item/W)
if(!istype(W)) return 0
var/slot_priority = W.slot_equipment_priority
for(var/slot in W.slot_equipment_priority)
if(!slot_priority)
slot_priority = list( \
slot_back, slot_wear_id,\
slot_w_uniform, slot_wear_suit,\
slot_wear_mask, slot_head,\
slot_shoes, slot_gloves,\
slot_ears, slot_glasses,\
slot_belt, slot_s_store,\
slot_l_store, slot_r_store,\
slot_drone_storage\
)
for(var/slot in slot_priority)
if(equip_to_slot_if_possible(W, slot, 0, 1, 1)) //qdel_on_fail = 0; disable_warning = 1; redraw_mob = 1
return 1