diff --git a/code/__DEFINES/inventory.dm b/code/__DEFINES/inventory.dm index e3b667a8339..2d989821cf4 100644 --- a/code/__DEFINES/inventory.dm +++ b/code/__DEFINES/inventory.dm @@ -157,19 +157,21 @@ #define CLOTHING_DIGITIGRADE_VARIATION (1<<1) ///The sprite works fine for digitigrade legs as-is. #define CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON (1<<2) +///has a sprite for monkeys +#define CLOTHING_MONKEY_VARIATION (1<<3) // SKYRAT EDIT ADDITION /// The sprite works fine for snouts. -#define CLOTHING_SNOUTED_VARIATION (1<<3) +#define CLOTHING_SNOUTED_VARIATION (1<<4) /// The sprite works fine for snouts as-is. -#define CLOTHING_SNOUTED_VARIATION_NO_NEW_ICON (1<<4) +#define CLOTHING_SNOUTED_VARIATION_NO_NEW_ICON (1<<5) /// The sprite works fine for vox snouts. -#define CLOTHING_SNOUTED_VOX_VARIATION (1<<5) +#define CLOTHING_SNOUTED_VOX_VARIATION (1<<6) /// The sprite works fine for vox snouts as is. -#define CLOTHING_SNOUTED_VOX_VARIATION_NO_NEW_ICON (1<<6) +#define CLOTHING_SNOUTED_VOX_VARIATION_NO_NEW_ICON (1<<7) /// The sprite works fine for vox snouts. -#define CLOTHING_SNOUTED_BETTER_VOX_VARIATION (1<<7) +#define CLOTHING_SNOUTED_BETTER_VOX_VARIATION (1<<8) /// The sprite works fine for vox snouts as is. -#define CLOTHING_SNOUTED_BETTER_VOX_VARIATION_NO_NEW_ICON (1<<8) +#define CLOTHING_SNOUTED_BETTER_VOX_VARIATION_NO_NEW_ICON (1<<9) // SKYRAT EDIT END //flags for covering body parts diff --git a/code/__DEFINES/species_clothing_paths.dm b/code/__DEFINES/species_clothing_paths.dm index be95aa3a3b0..146e28133ce 100644 --- a/code/__DEFINES/species_clothing_paths.dm +++ b/code/__DEFINES/species_clothing_paths.dm @@ -6,6 +6,10 @@ ///The dmi for humanoid oversuits #define DEFAULT_SUIT_FILE 'icons/mob/clothing/suits/default.dmi' +//MONKEY PATHS +///The dmi for monkey uniforms +#define MONKEY_UNIFORM_FILE 'icons/mob/species/monkey/uniform.dmi' + //DIGITIGRADE PATHS ///The dmi containing digitigrade uniforms #define DIGITIGRADE_UNIFORM_FILE 'modular_skyrat/master_files/icons/mob/clothing/uniform_digi.dmi' // SKYRAT EDIT CHANGE diff --git a/code/modules/clothing/under/suits.dm b/code/modules/clothing/under/suits.dm index e6b42194b9d..d486812a16b 100644 --- a/code/modules/clothing/under/suits.dm +++ b/code/modules/clothing/under/suits.dm @@ -30,6 +30,7 @@ desc = "It's a very smart uniform with a special pocket for tip." icon_state = "waiter" inhand_icon_state = "waiter" + supports_variations_flags = CLOTHING_MONKEY_VARIATION /obj/item/clothing/under/suit/blacktwopiece name = "black two piece suit" diff --git a/code/modules/mob/living/carbon/human/human_update_icons.dm b/code/modules/mob/living/carbon/human/human_update_icons.dm index d549d756f1f..fa67d713541 100644 --- a/code/modules/mob/living/carbon/human/human_update_icons.dm +++ b/code/modules/mob/living/carbon/human/human_update_icons.dm @@ -172,6 +172,9 @@ There are several things that need to be remembered: icon_file = dna.species.generate_custom_worn_icon(LOADOUT_ITEM_UNIFORM, w_uniform) // SKYRAT EDIT END + if((dna?.species.bodytype & BODYTYPE_MONKEY) && (uniform.supports_variations_flags & CLOTHING_MONKEY_VARIATION)) + icon_file = MONKEY_UNIFORM_FILE + //Female sprites have lower priority than digitigrade sprites else if(dna.species.sexes && (dna.species.bodytype & BODYTYPE_HUMANOID) && physique == FEMALE && uniform.female_sprite_flags != NO_FEMALE_UNIFORM) //Agggggggghhhhh woman = TRUE diff --git a/code/modules/mob/living/carbon/human/monkey/monkey.dm b/code/modules/mob/living/carbon/human/monkey/monkey.dm index b0cccf6618d..50443d02a23 100644 --- a/code/modules/mob/living/carbon/human/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/human/monkey/monkey.dm @@ -76,6 +76,7 @@ GLOBAL_DATUM(the_one_and_only_punpun, /mob/living/carbon/human/species/monkey/pu equip_to_slot_or_del(new relic_hat, ITEM_SLOT_HEAD) if(relic_mask) equip_to_slot_or_del(new relic_mask, ITEM_SLOT_MASK) + equip_to_slot_or_del(new /obj/item/clothing/under/suit/waiter(src), ITEM_SLOT_ICLOTHING) /mob/living/carbon/human/species/monkey/punpun/Destroy() if(GLOB.the_one_and_only_punpun == src) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index df49c065003..a8f116904cd 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -412,6 +412,12 @@ GLOBAL_LIST_EMPTY(features_by_species) // organ.Insert will qdel any current organs in that slot, so we don't need to. replacement.Insert(C, TRUE, FALSE) +/datum/species/proc/worn_items_fit_body_check(mob/living/carbon/wearer) + for(var/obj/item/equipped_item in wearer.get_all_worn_items()) + var/equipped_item_slot = wearer.get_slot_by_item(equipped_item) + if(!can_equip(equipped_item, equipped_item_slot, H = wearer, bypass_equip_delay_self = TRUE, ignore_equipped = TRUE)) + wearer.dropItemToGround(equipped_item) + /** * Proc called when a carbon becomes this species. * @@ -427,10 +433,6 @@ GLOBAL_LIST_EMPTY(features_by_species) // Drop the items the new species can't wear if((AGENDER in species_traits)) C.gender = PLURAL - for(var/slot_id in no_equip) - var/obj/item/thing = C.get_item_by_slot(slot_id) - if(thing && (!thing.species_exception || !is_type_in_list(src,thing.species_exception))) - C.dropItemToGround(thing) if(C.hud_used) C.hud_used.update_locked_slots() @@ -440,6 +442,8 @@ GLOBAL_LIST_EMPTY(features_by_species) replace_body(C, src) regenerate_organs(C, old_species, visual_only = C.visual_only_organs) + INVOKE_ASYNC(src, .proc/worn_items_fit_body_check, C) + if(exotic_bloodtype && C.dna.blood_type != exotic_bloodtype) C.dna.blood_type = exotic_bloodtype @@ -838,14 +842,15 @@ GLOBAL_LIST_EMPTY(features_by_species) /datum/species/proc/spec_death(gibbed, mob/living/carbon/human/H) 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, ignore_equipped = FALSE) if(slot in no_equip) if(!I.species_exception || !is_type_in_list(src, I.species_exception)) return FALSE // if there's an item in the slot we want, fail - if(H.get_item_by_slot(slot)) - return FALSE + if(!ignore_equipped) + if(H.get_item_by_slot(slot)) + return FALSE // this check prevents us from equipping something to a slot it doesn't support, WITH the exceptions of storage slots (pockets, suit storage, and backpacks) // we don't require having those slots defined in the item's slot_flags, so we'll rely on their own checks further down @@ -913,6 +918,12 @@ GLOBAL_LIST_EMPTY(features_by_species) return FALSE return equip_delay_self_check(I, H, bypass_equip_delay_self) if(ITEM_SLOT_ICLOTHING) + var/obj/item/bodypart/chest = H.get_bodypart(BODY_ZONE_CHEST) + if(chest && (chest.bodytype & BODYTYPE_MONKEY)) + if(!(I.supports_variations_flags & CLOTHING_MONKEY_VARIATION)) + if(!disable_warning) + to_chat(H, span_warning("[I] doesn't fit your [chest.name]!")) + return FALSE return equip_delay_self_check(I, H, bypass_equip_delay_self) if(ITEM_SLOT_ID) var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST) diff --git a/code/modules/mob/living/carbon/human/species_types/monkeys.dm b/code/modules/mob/living/carbon/human/species_types/monkeys.dm index 24d11a8e510..0dcfe6b2460 100644 --- a/code/modules/mob/living/carbon/human/species_types/monkeys.dm +++ b/code/modules/mob/living/carbon/human/species_types/monkeys.dm @@ -35,7 +35,6 @@ ITEM_SLOT_OCLOTHING, ITEM_SLOT_GLOVES, ITEM_SLOT_FEET, - ITEM_SLOT_ICLOTHING, ITEM_SLOT_SUITSTORE, ) changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | ERT_SPAWN | SLIME_EXTRACT diff --git a/icons/mob/species/monkey/uniform.dmi b/icons/mob/species/monkey/uniform.dmi new file mode 100644 index 00000000000..21d70e5694f Binary files /dev/null and b/icons/mob/species/monkey/uniform.dmi differ