diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm index d1e078dfbcf..566cecdfe86 100644 --- a/code/_helpers/global_lists.dm +++ b/code/_helpers/global_lists.dm @@ -33,6 +33,7 @@ var/global/list/all_areas = list() //Languages/species/whitelist. var/global/list/datum/species/all_species = list() +var/global/list/all_species_short_names = list() var/global/list/all_languages = list() var/global/list/language_keys = list() // Table of say codes for all languages var/global/list/whitelisted_species = list(SPECIES_HUMAN) // Species that require a whitelist check. @@ -91,6 +92,9 @@ var/global/list/cloaking_devices = list() //Hearing sensitive listening in closely var/global/list/intent_listener = list() +// cache for clothing species adaptability +var/global/list/contained_clothing_species_adaption_cache = list() + ////////////////////////// /////Initial Building///// ////////////////////////// @@ -181,6 +185,7 @@ var/global/list/intent_listener = list() if(length(S.autohiss_basic_map) || length(S.autohiss_extra_map) || length(S.autohiss_basic_extend) || length(S.autohiss_extra_extend)) S.has_autohiss = TRUE all_species[S.name] = S + all_species_short_names |= S.short_name sortTim(all_species, GLOBAL_PROC_REF(cmp_text_asc)) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index a4e493f9b34..1e43f2d1490 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -20,6 +20,8 @@ */ var/list/sprite_sheets_refit = null + var/species_sprite_adaption_type = WORN_UNDER + //material things var/material/material = null var/applies_material_color = TRUE @@ -55,6 +57,25 @@ /obj/item/clothing/proc/update_clothing_icon() return +/obj/item/clothing/proc/build_and_apply_species_adaption() + if(!contained_sprite) + return + if(type in contained_clothing_species_adaption_cache) + var/list/adaption_cache = contained_clothing_species_adaption_cache[type] + if(length(adaption_cache)) + icon_auto_adapt = TRUE + icon_supported_species_tags = adaption_cache + return + var/list/new_adaption_cache = list() + var/list/all_icon_states = icon_states(icon) + for(var/short_name in all_species_short_names) + if((short_name + "_" + item_state + species_sprite_adaption_type) in all_icon_states) + new_adaption_cache += short_name + contained_clothing_species_adaption_cache[type] = length(new_adaption_cache) ? new_adaption_cache : null + if(length(new_adaption_cache)) + icon_auto_adapt = TRUE + icon_supported_species_tags = new_adaption_cache + // Aurora forensics port. /obj/item/clothing/clean_blood() . = ..() @@ -313,6 +334,7 @@ /obj/item/clothing/ears name = "ears" icon = 'icons/obj/clothing/ears.dmi' + species_sprite_adaption_type = WORN_LEAR w_class = ITEMSIZE_TINY throwforce = 2 slot_flags = SLOT_EARS @@ -391,6 +413,7 @@ slot_l_hand_str = 'icons/mob/items/clothing/lefthand_gloves.dmi', slot_r_hand_str = 'icons/mob/items/clothing/righthand_gloves.dmi' ) + species_sprite_adaption_type = WORN_GLOVES siemens_coefficient = 0.75 var/wired = FALSE var/obj/item/cell/cell = 0 @@ -509,6 +532,7 @@ slot_l_hand_str = 'icons/mob/items/clothing/lefthand_hats.dmi', slot_r_hand_str = 'icons/mob/items/clothing/righthand_hats.dmi' ) + species_sprite_adaption_type = WORN_HEAD body_parts_covered = HEAD slot_flags = SLOT_HEAD w_class = ITEMSIZE_SMALL @@ -698,6 +722,7 @@ slot_l_hand_str = 'icons/mob/items/clothing/lefthand_masks.dmi', slot_r_hand_str = 'icons/mob/items/clothing/righthand_masks.dmi' ) + species_sprite_adaption_type = WORN_MASK slot_flags = SLOT_MASK drop_sound = 'sound/items/drop/hat.ogg' pickup_sound = 'sound/items/pickup/hat.ogg' @@ -808,6 +833,7 @@ slot_r_hand_str = 'icons/mob/items/clothing/righthand_shoes.dmi' ) desc = "Comfortable-looking shoes." + species_sprite_adaption_type = WORN_SHOES gender = PLURAL //Carn: for grammarically correct text-parsing siemens_coefficient = 0.9 body_parts_covered = FEET @@ -963,6 +989,7 @@ BODYTYPE_VAURCA_BULWARK = 'icons/mob/species/bulwark/suit.dmi' ) name = "suit" + species_sprite_adaption_type = WORN_SUIT var/fire_resist = T0C+100 body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS allowed = list(/obj/item/tank/emergency_oxygen) @@ -1335,6 +1362,7 @@ name = "ring" w_class = ITEMSIZE_TINY icon = 'icons/obj/clothing/rings.dmi' + species_sprite_adaption_type = WORN_GLOVES slot_flags = SLOT_GLOVES gender = NEUTER drop_sound = 'sound/items/drop/ring.ogg' diff --git a/code/modules/clothing/spacesuits/spacesuits.dm b/code/modules/clothing/spacesuits/spacesuits.dm index bfe65bb3e8a..d0e8a8b809e 100644 --- a/code/modules/clothing/spacesuits/spacesuits.dm +++ b/code/modules/clothing/spacesuits/spacesuits.dm @@ -34,6 +34,10 @@ light_wedge = LIGHT_WIDE on = 0 +/obj/item/clothing/head/helmet/space/Initialize() + . = ..() + build_and_apply_species_adaption() + /obj/item/clothing/suit/space name = "softsuit" desc = "A suit that protects against low pressure environments." @@ -63,6 +67,10 @@ var/list/supporting_limbs //If not-null, automatically splints breaks. Checked when removing the suit. +/obj/item/clothing/suit/space/Initialize() + . = ..() + build_and_apply_species_adaption() + /obj/item/clothing/suit/space/equipped(mob/M) check_limb_support() ..() diff --git a/code/modules/research/xenoarchaeology/tools/anomaly_suit.dm b/code/modules/research/xenoarchaeology/tools/anomaly_suit.dm index ec47785dca1..b4fd7cc891b 100644 --- a/code/modules/research/xenoarchaeology/tools/anomaly_suit.dm +++ b/code/modules/research/xenoarchaeology/tools/anomaly_suit.dm @@ -5,6 +5,8 @@ desc = "A sealed bio suit capable of insulating against exotic alien energies." icon_state = "engspace_suit" item_state = "engspace_suit" + icon_auto_adapt = TRUE + icon_supported_species_tags = list("skr", "taj", "una") armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 100) /obj/item/clothing/head/hazmat/anomaly @@ -12,6 +14,8 @@ desc = "A sealed bio hood capable of insulating against exotic alien energies." icon_state = "engspace_helmet" item_state = "engspace_helmet" + icon_auto_adapt = TRUE + icon_supported_species_tags = list("skr", "taj", "una") armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 100) /obj/item/clothing/suit/space/anomaly diff --git a/html/changelogs/geeves-alien_suits.yml b/html/changelogs/geeves-alien_suits.yml new file mode 100644 index 00000000000..648101e43f2 --- /dev/null +++ b/html/changelogs/geeves-alien_suits.yml @@ -0,0 +1,6 @@ +author: Captain Gecko, Geeves + +delete-after: True + +changes: + - rscadd: "Added Unathi, Tajara, and Skrell specific sprites for the Anomaly Suit, Softsuit, and Emergency Softsuit." diff --git a/icons/obj/item/clothing/head/hazmat.dmi b/icons/obj/item/clothing/head/hazmat.dmi index 4adcc3e4b8b..392b9e794a9 100644 Binary files a/icons/obj/item/clothing/head/hazmat.dmi and b/icons/obj/item/clothing/head/hazmat.dmi differ diff --git a/icons/obj/item/clothing/softsuits/softsuit.dmi b/icons/obj/item/clothing/softsuits/softsuit.dmi index b4853cf317b..09c62f8e675 100644 Binary files a/icons/obj/item/clothing/softsuits/softsuit.dmi and b/icons/obj/item/clothing/softsuits/softsuit.dmi differ diff --git a/icons/obj/item/clothing/softsuits/softsuit_emergency.dmi b/icons/obj/item/clothing/softsuits/softsuit_emergency.dmi index dba46bc8bc9..044f6704119 100644 Binary files a/icons/obj/item/clothing/softsuits/softsuit_emergency.dmi and b/icons/obj/item/clothing/softsuits/softsuit_emergency.dmi differ diff --git a/icons/obj/item/clothing/suit/hazmat.dmi b/icons/obj/item/clothing/suit/hazmat.dmi index bf41d6c782d..17027c2d77d 100644 Binary files a/icons/obj/item/clothing/suit/hazmat.dmi and b/icons/obj/item/clothing/suit/hazmat.dmi differ