mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 09:35:30 +01:00
slot_equipment_priority no longer contributes to list init overhead
This commit is contained in:
@@ -88,23 +88,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
|
||||
var/hit_reaction_chance = 0 //If you want to have something unrelated to blocking/armour piercing etc. Maybe not needed, but trying to think ahead/allow more freedom
|
||||
|
||||
//The list of slots by priority. equip_to_appropriate_slot() uses this list. Doesn't matter if a mob type doesn't have a slot.
|
||||
var/list/slot_equipment_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\
|
||||
)
|
||||
var/list/slot_equipment_priority = null // for default list, see /mob/proc/equip_to_appropriate_slot()
|
||||
|
||||
// Needs to be in /obj/item because corgis can wear a lot of
|
||||
// non-clothing items
|
||||
|
||||
+14
-1
@@ -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
|
||||
|
||||
|
||||
@@ -228,6 +228,16 @@
|
||||
flags_inv = HIDEHAIR
|
||||
slot_flags = SLOT_HEAD
|
||||
armor = list(melee = 10, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0) //Weak melee protection, because you can wear it on your head
|
||||
slot_equipment_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
|
||||
)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/bucket/attackby(obj/O, mob/user, params)
|
||||
if(istype(O, /obj/item/weapon/mop))
|
||||
|
||||
Reference in New Issue
Block a user