mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
@@ -164,13 +164,13 @@
|
||||
update_inv_wear_suit()
|
||||
else if(I == w_uniform)
|
||||
if(invdrop)
|
||||
if(r_store)
|
||||
if(r_store && !can_equip(r_store, SLOT_R_STORE, TRUE))
|
||||
dropItemToGround(r_store, TRUE) //Again, makes sense for pockets to drop.
|
||||
if(l_store)
|
||||
if(l_store && !can_equip(l_store, SLOT_L_STORE, TRUE))
|
||||
dropItemToGround(l_store, TRUE)
|
||||
if(wear_id)
|
||||
if(wear_id && !can_equip(wear_id, SLOT_WEAR_ID, TRUE))
|
||||
dropItemToGround(wear_id)
|
||||
if(belt)
|
||||
if(belt && !can_equip(belt, SLOT_BELT, TRUE))
|
||||
dropItemToGround(belt)
|
||||
w_uniform = null
|
||||
update_suit_sensors()
|
||||
|
||||
@@ -1060,6 +1060,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
stop_wagging_tail(H)
|
||||
return
|
||||
|
||||
//Now checks if the item is already equipped to that slot before instantly returning false because of it being there, so you can now check if an item is able to remain in a slot
|
||||
/datum/species/proc/can_equip(obj/item/I, slot, disable_warning, mob/living/carbon/human/H, bypass_equip_delay_self = FALSE)
|
||||
if((slot in no_equip) || (slot in extra_no_equip))
|
||||
if(!I.species_exception || !is_type_in_list(src, I.species_exception))
|
||||
@@ -1074,7 +1075,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
return TRUE
|
||||
return FALSE
|
||||
if(SLOT_WEAR_MASK)
|
||||
if(H.wear_mask)
|
||||
if(H.wear_mask && H.wear_mask != I)
|
||||
return FALSE
|
||||
if(!(I.slot_flags & ITEM_SLOT_MASK))
|
||||
return FALSE
|
||||
@@ -1082,25 +1083,25 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
return FALSE
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(SLOT_NECK)
|
||||
if(H.wear_neck)
|
||||
if(H.wear_neck && H.wear_neck != I)
|
||||
return FALSE
|
||||
if( !(I.slot_flags & ITEM_SLOT_NECK) )
|
||||
return FALSE
|
||||
return TRUE
|
||||
if(SLOT_BACK)
|
||||
if(H.back)
|
||||
if(H.back && H.back != I)
|
||||
return FALSE
|
||||
if( !(I.slot_flags & ITEM_SLOT_BACK) )
|
||||
return FALSE
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(SLOT_WEAR_SUIT)
|
||||
if(H.wear_suit)
|
||||
if(H.wear_suit && H.wear_suit != I)
|
||||
return FALSE
|
||||
if( !(I.slot_flags & ITEM_SLOT_OCLOTHING) )
|
||||
return FALSE
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(SLOT_GLOVES)
|
||||
if(H.gloves)
|
||||
if(H.gloves && H.gloves != I)
|
||||
return FALSE
|
||||
if( !(I.slot_flags & ITEM_SLOT_GLOVES) )
|
||||
return FALSE
|
||||
@@ -1108,7 +1109,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
return FALSE
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(SLOT_SHOES)
|
||||
if(H.shoes)
|
||||
if(H.shoes && H.shoes != I)
|
||||
return FALSE
|
||||
if( !(I.slot_flags & ITEM_SLOT_FEET) )
|
||||
return FALSE
|
||||
@@ -1121,7 +1122,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
return FALSE
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(SLOT_BELT)
|
||||
if(H.belt)
|
||||
if(H.belt && H.belt != I)
|
||||
return FALSE
|
||||
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
|
||||
@@ -1134,7 +1135,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
return
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(SLOT_GLASSES)
|
||||
if(H.glasses)
|
||||
if(H.glasses && H.glasses != I)
|
||||
return FALSE
|
||||
if(!(I.slot_flags & ITEM_SLOT_EYES))
|
||||
return FALSE
|
||||
@@ -1145,7 +1146,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
return FALSE
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(SLOT_HEAD)
|
||||
if(H.head)
|
||||
if(H.head && H.head != I)
|
||||
return FALSE
|
||||
if(!(I.slot_flags & ITEM_SLOT_HEAD))
|
||||
return FALSE
|
||||
@@ -1153,7 +1154,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
return FALSE
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(SLOT_EARS)
|
||||
if(H.ears)
|
||||
if(H.ears && H.ears != I)
|
||||
return FALSE
|
||||
if(!(I.slot_flags & ITEM_SLOT_EARS))
|
||||
return FALSE
|
||||
@@ -1161,13 +1162,13 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
return FALSE
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(SLOT_W_UNIFORM)
|
||||
if(H.w_uniform)
|
||||
if(H.w_uniform && H.w_uniform != I)
|
||||
return FALSE
|
||||
if( !(I.slot_flags & ITEM_SLOT_ICLOTHING) )
|
||||
return FALSE
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(SLOT_WEAR_ID)
|
||||
if(H.wear_id)
|
||||
if(H.wear_id && H.wear_id != I)
|
||||
return FALSE
|
||||
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
|
||||
@@ -1181,7 +1182,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
if(SLOT_L_STORE)
|
||||
if(HAS_TRAIT(I, TRAIT_NODROP)) //Pockets aren't visible, so you can't move TRAIT_NODROP items into them.
|
||||
return FALSE
|
||||
if(H.l_store)
|
||||
if(H.l_store && H.l_store != I)
|
||||
return FALSE
|
||||
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_L_LEG)
|
||||
@@ -1197,7 +1198,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
if(SLOT_R_STORE)
|
||||
if(HAS_TRAIT(I, TRAIT_NODROP))
|
||||
return FALSE
|
||||
if(H.r_store)
|
||||
if(H.r_store && H.r_store != I)
|
||||
return FALSE
|
||||
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_R_LEG)
|
||||
@@ -1214,7 +1215,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
if(SLOT_S_STORE)
|
||||
if(HAS_TRAIT(I, TRAIT_NODROP))
|
||||
return FALSE
|
||||
if(H.s_store)
|
||||
if(H.s_store && H.s_store != I)
|
||||
return FALSE
|
||||
if(!H.wear_suit)
|
||||
if(!disable_warning)
|
||||
@@ -1232,7 +1233,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
return TRUE
|
||||
return FALSE
|
||||
if(SLOT_HANDCUFFED)
|
||||
if(H.handcuffed)
|
||||
if(H.handcuffed && H.handcuffed != I)
|
||||
return FALSE
|
||||
if(!istype(I, /obj/item/restraints/handcuffs))
|
||||
return FALSE
|
||||
@@ -1240,7 +1241,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
return FALSE
|
||||
return TRUE
|
||||
if(SLOT_LEGCUFFED)
|
||||
if(H.legcuffed)
|
||||
if(H.legcuffed && H.legcuffed != I)
|
||||
return FALSE
|
||||
if(!istype(I, /obj/item/restraints/legcuffs))
|
||||
return FALSE
|
||||
@@ -1248,7 +1249,7 @@ GLOBAL_LIST_EMPTY(features_by_species)
|
||||
return FALSE
|
||||
return TRUE
|
||||
if(SLOT_IN_BACKPACK)
|
||||
if(H.back)
|
||||
if(H.back && H.back != I)
|
||||
if(SEND_SIGNAL(H.back, COMSIG_TRY_STORAGE_CAN_INSERT, I, H, TRUE))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
Reference in New Issue
Block a user