From a34a7ba5d4e2dc8bb20201b5cb8e4bea2f4abc51 Mon Sep 17 00:00:00 2001
From: Ghommie <42542238+Ghommie@users.noreply.github.com>
Date: Sun, 28 Jun 2020 01:10:22 +0200
Subject: [PATCH] You can't (un)equip garments on/from obscured inventory slots
anymore.
---
code/_onclick/hud/screen_objects.dm | 2 +-
code/game/objects/items.dm | 4 +-
code/modules/mob/inventory.dm | 95 +++++++++++--------
code/modules/mob/living/carbon/carbon.dm | 13 +++
code/modules/mob/living/carbon/human/human.dm | 28 +-----
.../mob/living/carbon/human/inventory.dm | 31 +++++-
.../mob/living/carbon/human/species.dm | 35 ++++---
code/modules/mob/living/carbon/inventory.dm | 12 +++
.../mob/living/carbon/monkey/combat.dm | 2 +-
.../mob/living/carbon/monkey/inventory.dm | 7 +-
.../simple_animal/friendly/drone/inventory.dm | 2 +-
.../simple_animal/guardian/types/dextrous.dm | 2 +-
code/modules/mob/mob.dm | 61 ++----------
13 files changed, 153 insertions(+), 141 deletions(-)
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 4ed286eb08..0088dde15a 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -153,7 +153,7 @@
var/image/item_overlay = image(holding)
item_overlay.alpha = 92
- if(!user.can_equip(holding, slot_id, TRUE))
+ if(!user.can_equip(holding, slot_id, TRUE, TRUE, TRUE))
item_overlay.color = "#FF0000"
else
item_overlay.color = "#00ff00"
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 60bae4016a..bc05522abe 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -496,11 +496,11 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
//if this is being done by a mob other than M, it will include the mob equipper, who is trying to equip the item to mob M. equipper will be null otherwise.
//If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen.
//Set disable_warning to TRUE if you wish it to not give you outputs.
-/obj/item/proc/mob_can_equip(mob/living/M, mob/living/equipper, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE)
+/obj/item/proc/mob_can_equip(mob/living/M, mob/living/equipper, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE, clothing_check = FALSE, list/return_warning)
if(!M)
return FALSE
- return M.can_equip(src, slot, disable_warning, bypass_equip_delay_self)
+ return M.can_equip(src, slot, disable_warning, bypass_equip_delay_self, clothing_check, return_warning)
/obj/item/verb/verb_pickup()
set src in oview(1)
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index 74775203b1..83cc09a624 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -158,7 +158,7 @@
//Returns if a certain item can be equipped to a certain slot.
// Currently invalid for two-handed items - call obj/item/mob_can_equip() instead.
-/mob/proc/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE)
+/mob/proc/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE, clothing_check = FALSE, list/return_warning)
return FALSE
/mob/proc/can_put_in_hand(I, hand_index)
@@ -338,50 +338,63 @@
return FALSE
return TRUE
+//This is a SAFE proc. Use this instead of equip_to_slot()!
+//set qdel_on_fail to have it delete W if it fails to equip
+//set disable_warning to disable the 'you are unable to equip that' warning.
+//unset redraw_mob to prevent the mob from being redrawn at the end.
+/mob/proc/equip_to_slot_if_possible(obj/item/W, slot, qdel_on_fail = FALSE, disable_warning = FALSE, redraw_mob = TRUE, bypass_equip_delay_self = FALSE, clothing_check = FALSE)
+ if(!istype(W))
+ return FALSE
+ var/list/warning = list("You are unable to equip that!")
+ if(!W.mob_can_equip(src, null, slot, disable_warning, bypass_equip_delay_self, clothing_check, warning))
+ if(qdel_on_fail)
+ qdel(W)
+ else if(!disable_warning)
+ to_chat(src, warning[1])
+ return FALSE
+ equip_to_slot(W, slot, redraw_mob) //This proc should not ever fail.
+ return TRUE
+
+//This is an UNSAFE proc. It merely handles the actual job of equipping. All the checks on whether you can or can't equip need to be done before! Use mob_can_equip() for that task.
+//In most cases you will want to use equip_to_slot_if_possible()
+/mob/proc/equip_to_slot(obj/item/W, slot)
+ return
+
+//This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the round starts and when events happen and such.
+//Also bypasses equip delay checks, since the mob isn't actually putting it on.
+/mob/proc/equip_to_slot_or_del(obj/item/W, slot)
+ return equip_to_slot_if_possible(W, slot, TRUE, TRUE, FALSE, TRUE)
+
+//puts the item "W" into an appropriate slot in a human's inventory
+//returns 0 if it cannot, 1 if successful
+/mob/proc/equip_to_appropriate_slot(obj/item/W, clothing_check = FALSE)
+ if(!istype(W))
+ return 0
+ var/slot_priority = 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_NECK,\
+ SLOT_SHOES, SLOT_GLOVES,\
+ SLOT_EARS, SLOT_GLASSES,\
+ SLOT_BELT, SLOT_S_STORE,\
+ SLOT_L_STORE, SLOT_R_STORE,\
+ SLOT_GENERC_DEXTROUS_STORAGE\
+ )
+
+ for(var/slot in slot_priority)
+ if(equip_to_slot_if_possible(W, slot, FALSE, TRUE, TRUE, FALSE, clothing_check)) //qdel_on_fail = 0; disable_warning = 1; redraw_mob = 1
+ return 1
+
+ return 0
+
//Outdated but still in use apparently. This should at least be a human proc.
//Daily reminder to murder this - Remie.
/mob/living/proc/get_equipped_items(include_pockets = FALSE)
return
-/mob/living/carbon/get_equipped_items(include_pockets = FALSE)
- var/list/items = list()
- if(back)
- items += back
- if(head)
- items += head
- if(wear_mask)
- items += wear_mask
- if(wear_neck)
- items += wear_neck
- return items
-
-/mob/living/carbon/human/get_equipped_items(include_pockets = FALSE)
- var/list/items = ..()
- if(belt)
- items += belt
- if(ears)
- items += ears
- if(glasses)
- items += glasses
- if(gloves)
- items += gloves
- if(shoes)
- items += shoes
- if(wear_id)
- items += wear_id
- if(wear_suit)
- items += wear_suit
- if(w_uniform)
- items += w_uniform
- if(include_pockets)
- if(l_store)
- items += l_store
- if(r_store)
- items += r_store
- if(s_store)
- items += s_store
- return items
-
/mob/living/proc/unequip_everything()
var/list/items = list()
items |= get_equipped_items(TRUE)
@@ -394,7 +407,7 @@
to_chat(M, "You are not holding anything to equip!")
return FALSE
- if(M.equip_to_appropriate_slot(src))
+ if(M.equip_to_appropriate_slot(src, TRUE))
M.update_inv_hands()
return TRUE
else
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 7b201e7492..da8b397e6d 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -1160,3 +1160,16 @@
dna.features["body_model"] = MALE
if(update_icon)
update_body()
+
+/mob/living/carbon/check_obscured_slots()
+ if(head)
+ if(head.flags_inv & HIDEMASK)
+ LAZYOR(., SLOT_WEAR_MASK)
+ if(head.flags_inv & HIDEEYES)
+ LAZYOR(., SLOT_GLASSES)
+ if(head.flags_inv & HIDEEARS)
+ LAZYOR(., SLOT_EARS)
+
+ if(wear_mask)
+ if(wear_mask.flags_inv & HIDEEYES)
+ LAZYOR(., SLOT_GLASSES)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 4421c383e6..46e0a0c64e 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -511,33 +511,15 @@
// Might need re-wording.
to_chat(user, "There is no exposed flesh or thin material [above_neck(target_zone) ? "on [p_their()] head" : "on [p_their()] body"].")
-/mob/living/carbon/human/proc/check_obscured_slots()
- var/list/obscured = list()
-
+/mob/living/carbon/human/check_obscured_slots()
+ . = ..()
if(wear_suit)
if(wear_suit.flags_inv & HIDEGLOVES)
- obscured |= SLOT_GLOVES
+ LAZYOR(., SLOT_GLOVES)
if(wear_suit.flags_inv & HIDEJUMPSUIT)
- obscured |= SLOT_W_UNIFORM
+ LAZYOR(., SLOT_W_UNIFORM)
if(wear_suit.flags_inv & HIDESHOES)
- obscured |= SLOT_SHOES
-
- if(head)
- if(head.flags_inv & HIDEMASK)
- obscured |= SLOT_WEAR_MASK
- if(head.flags_inv & HIDEEYES)
- obscured |= SLOT_GLASSES
- if(head.flags_inv & HIDEEARS)
- obscured |= SLOT_EARS
-
- if(wear_mask)
- if(wear_mask.flags_inv & HIDEEYES)
- obscured |= SLOT_GLASSES
-
- if(obscured.len)
- return obscured
- else
- return null
+ LAZYOR(., SLOT_SHOES)
/mob/living/carbon/human/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null)
if(judgement_criteria & JUDGE_EMAGGED)
diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm
index 8de143e2bd..a7593ca0cb 100644
--- a/code/modules/mob/living/carbon/human/inventory.dm
+++ b/code/modules/mob/living/carbon/human/inventory.dm
@@ -1,5 +1,32 @@
-/mob/living/carbon/human/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE)
- return dna.species.can_equip(I, slot, disable_warning, src, bypass_equip_delay_self)
+/mob/living/carbon/human/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE, clothing_check = FALSE, list/return_warning)
+ return dna.species.can_equip(I, slot, disable_warning, src, bypass_equip_delay_self, clothing_check, return_warning)
+
+/mob/living/carbon/human/get_equipped_items(include_pockets = FALSE)
+ var/list/items = ..()
+ if(belt)
+ items += belt
+ if(ears)
+ items += ears
+ if(glasses)
+ items += glasses
+ if(gloves)
+ items += gloves
+ if(shoes)
+ items += shoes
+ if(wear_id)
+ items += wear_id
+ if(wear_suit)
+ items += wear_suit
+ if(w_uniform)
+ items += w_uniform
+ if(include_pockets)
+ if(l_store)
+ items += l_store
+ if(r_store)
+ items += r_store
+ if(s_store)
+ items += s_store
+ return items
// Return the item currently in the slot ID
/mob/living/carbon/human/get_item_by_slot(slot_id)
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index f256345c68..0a28764d46 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -1065,11 +1065,16 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
// handles the equipping of species-specific gear
return
-/datum/species/proc/can_equip(obj/item/I, slot, disable_warning, mob/living/carbon/human/H, bypass_equip_delay_self = FALSE)
+/datum/species/proc/can_equip(obj/item/I, slot, disable_warning, mob/living/carbon/human/H, bypass_equip_delay_self = FALSE, clothing_check = FALSE, list/return_warning)
if(slot in no_equip)
if(!I.species_exception || !is_type_in_list(src, I.species_exception))
return FALSE
+ if(clothing_check && (slot in H.check_obscured_slots()))
+ if(return_warning)
+ return_warning[1] = "You are unable to equip with your current garments in the way!"
+ return FALSE
+
var/num_arms = H.get_num_arms(FALSE)
var/num_legs = H.get_num_legs(FALSE)
@@ -1131,8 +1136,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(!CHECK_BITFIELD(I.item_flags, NO_UNIFORM_REQUIRED))
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
- if(!disable_warning)
- to_chat(H, "You need a jumpsuit before you can attach this [I.name]!")
+ if(return_warning)
+ return_warning[1] = "You need a jumpsuit before you can attach this [I.name]!"
return FALSE
if(!(I.slot_flags & ITEM_SLOT_BELT))
return
@@ -1173,8 +1178,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(!CHECK_BITFIELD(I.item_flags, NO_UNIFORM_REQUIRED))
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
- if(!disable_warning)
- to_chat(H, "You need a jumpsuit before you can attach this [I.name]!")
+ if(return_warning)
+ return_warning[1] = "You need a jumpsuit before you can attach this [I.name]!"
return FALSE
if( !(I.slot_flags & ITEM_SLOT_ID) )
return FALSE
@@ -1188,8 +1193,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_L_LEG)
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
- if(!disable_warning)
- to_chat(H, "You need a jumpsuit before you can attach this [I.name]!")
+ if(return_warning)
+ return_warning[1] = "You need a jumpsuit before you can attach this [I.name]!"
return FALSE
if(I.slot_flags & ITEM_SLOT_DENYPOCKET)
return FALSE
@@ -1204,8 +1209,8 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_R_LEG)
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
- if(!disable_warning)
- to_chat(H, "You need a jumpsuit before you can attach this [I.name]!")
+ if(return_warning)
+ return_warning[1] = "You need a jumpsuit before you can attach this [I.name]!"
return FALSE
if(I.slot_flags & ITEM_SLOT_DENYPOCKET)
return FALSE
@@ -1218,16 +1223,16 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
if(H.s_store)
return FALSE
if(!H.wear_suit)
- if(!disable_warning)
- to_chat(H, "You need a suit before you can attach this [I.name]!")
+ if(return_warning)
+ return_warning[1] = "You need a suit before you can attach this [I.name]!"
return FALSE
if(!H.wear_suit.allowed)
- if(!disable_warning)
- to_chat(H, "You somehow have a suit with no defined allowed items for suit storage, stop that.")
+ if(return_warning)
+ return_warning[1] = "You somehow have a suit with no defined allowed items for suit storage, stop that."
return FALSE
if(I.w_class > WEIGHT_CLASS_BULKY)
- if(!disable_warning)
- to_chat(H, "The [I.name] is too big to attach.") //should be src?
+ if(return_warning)
+ return_warning[1] = "The [I.name] is too big to attach."
return FALSE
if( istype(I, /obj/item/pda) || istype(I, /obj/item/pen) || is_type_in_list(I, H.wear_suit.allowed) )
return TRUE
diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm
index 50801e1c0d..cc837a490c 100644
--- a/code/modules/mob/living/carbon/inventory.dm
+++ b/code/modules/mob/living/carbon/inventory.dm
@@ -117,6 +117,18 @@
if(!QDELETED(src))
update_inv_legcuffed()
+/mob/living/carbon/get_equipped_items(include_pockets = FALSE)
+ var/list/items = list()
+ if(back)
+ items += back
+ if(head)
+ items += head
+ if(wear_mask)
+ items += wear_mask
+ if(wear_neck)
+ items += wear_neck
+ return items
+
//handle stuff to update when a mob equips/unequips a mask.
/mob/living/proc/wear_mask_update(obj/item/clothing/C, toggle_off = 1)
update_inv_wear_mask()
diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm
index 1b0856bfcd..149ec5f0e3 100644
--- a/code/modules/mob/living/carbon/monkey/combat.dm
+++ b/code/modules/mob/living/carbon/monkey/combat.dm
@@ -81,7 +81,7 @@
/mob/living/carbon/monkey/proc/pickup_and_wear(obj/item/I)
if(QDELETED(I) || I.loc != src)
return
- equip_to_appropriate_slot(I)
+ equip_to_appropriate_slot(I, TRUE)
/mob/living/carbon/monkey/resist_restraints()
var/obj/item/I = null
diff --git a/code/modules/mob/living/carbon/monkey/inventory.dm b/code/modules/mob/living/carbon/monkey/inventory.dm
index d5fffc70a2..6de28793c7 100644
--- a/code/modules/mob/living/carbon/monkey/inventory.dm
+++ b/code/modules/mob/living/carbon/monkey/inventory.dm
@@ -1,4 +1,9 @@
-/mob/living/carbon/monkey/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE)
+/mob/living/carbon/monkey/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE, clothing_check = FALSE, list/return_warning)
+ if(clothing_check && (slot in check_obscured_slots()))
+ if(return_warning)
+ return_warning[1] = "You are unable to equip with your current garments in the way!"
+ return FALSE
+
switch(slot)
if(SLOT_HANDS)
if(get_empty_held_indexes())
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm b/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm
index 6e89f045da..8034e3c5e5 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm
@@ -19,7 +19,7 @@
return 0
-/mob/living/simple_animal/drone/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE)
+/mob/living/simple_animal/drone/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE, clothing_check = FALSE, list/return_warning)
switch(slot)
if(SLOT_HEAD)
if(head)
diff --git a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm
index b4865c4337..a1850fabca 100644
--- a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm
+++ b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm
@@ -50,7 +50,7 @@
return 1
return 0
-/mob/living/simple_animal/hostile/guardian/dextrous/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE)
+/mob/living/simple_animal/hostile/guardian/dextrous/can_equip(obj/item/I, slot, disable_warning = FALSE, bypass_equip_delay_self = FALSE, clothing_check = FALSE, list/return_warning)
switch(slot)
if(SLOT_GENERC_DEXTROUS_STORAGE)
if(internal_storage)
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index c5d2a34f89..bc1fc4b5ea 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -227,69 +227,24 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
var/obj/item/W = get_active_held_item()
if(istype(W))
- if(equip_to_slot_if_possible(W, slot,0,0,0))
- return 1
+ if(equip_to_slot_if_possible(W, slot, FALSE, FALSE, FALSE, TRUE))
+ return TRUE
if(!W)
// Activate the item
var/obj/item/I = get_item_by_slot(slot)
if(istype(I))
+ if(slot in check_obscured_slots())
+ to_chat(src, "You are unable to unequip while wearing other garments over it!")
+ return FALSE
I.attack_hand(src)
- return 0
+ return FALSE
-//This is a SAFE proc. Use this instead of equip_to_slot()!
-//set qdel_on_fail to have it delete W if it fails to equip
-//set disable_warning to disable the 'you are unable to equip that' warning.
-//unset redraw_mob to prevent the mob from being redrawn at the end.
-/mob/proc/equip_to_slot_if_possible(obj/item/W, slot, qdel_on_fail = FALSE, disable_warning = FALSE, redraw_mob = TRUE, bypass_equip_delay_self = FALSE)
- if(!istype(W))
- return FALSE
- if(!W.mob_can_equip(src, null, slot, disable_warning, bypass_equip_delay_self))
- if(qdel_on_fail)
- qdel(W)
- else
- if(!disable_warning)
- to_chat(src, "You are unable to equip that!")
- return FALSE
- equip_to_slot(W, slot, redraw_mob) //This proc should not ever fail.
- return TRUE
-
-//This is an UNSAFE proc. It merely handles the actual job of equipping. All the checks on whether you can or can't equip need to be done before! Use mob_can_equip() for that task.
-//In most cases you will want to use equip_to_slot_if_possible()
-/mob/proc/equip_to_slot(obj/item/W, slot)
+/// Checks for slots that are currently obscured by other garments.
+/mob/proc/check_obscured_slots()
return
-//This is just a commonly used configuration for the equip_to_slot_if_possible() proc, used to equip people when the round starts and when events happen and such.
-//Also bypasses equip delay checks, since the mob isn't actually putting it on.
-/mob/proc/equip_to_slot_or_del(obj/item/W, slot)
- return equip_to_slot_if_possible(W, slot, TRUE, TRUE, FALSE, TRUE)
-
-//puts the item "W" into an appropriate slot in a human's inventory
-//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
-
- if(!slot_priority)
- slot_priority = list( \
- SLOT_BACK, SLOT_WEAR_ID,\
- SLOT_W_UNIFORM, SLOT_WEAR_SUIT,\
- SLOT_WEAR_MASK, SLOT_HEAD, SLOT_NECK,\
- SLOT_SHOES, SLOT_GLOVES,\
- SLOT_EARS, SLOT_GLASSES,\
- SLOT_BELT, SLOT_S_STORE,\
- SLOT_L_STORE, SLOT_R_STORE,\
- SLOT_GENERC_DEXTROUS_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
-
- return 0
-
// reset_perspective(thing) set the eye to the thing (if it's equal to current default reset to mob perspective)
// reset_perspective() set eye to common default : mob on turf, loc otherwise
/mob/proc/reset_perspective(atom/A)