diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 8d4b8306f26..eb9594e6ab0 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -17,7 +17,7 @@ //underwear init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear, GLOB.underwear_list, GLOB.underwear_m, GLOB.underwear_f) //undershirt - init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt, GLOB.undershirt_list, GLOB.undershirt_m, GLOB.undershirt_f) + init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt, GLOB.undershirt_list, GLOB.undershirt_m, GLOB.undershirt_f, GLOB.undershirt_full_list) //socks init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, GLOB.socks_list, GLOB.socks_m, GLOB.socks_f) //alt heads diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index 32d5ed5733c..f9c5a101f04 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -20,6 +20,7 @@ GLOBAL_LIST_EMPTY(underwear_f) //stores only underwear name GLOBAL_LIST_EMPTY(undershirt_list) //stores /datum/sprite_accessory/undershirt indexed by name GLOBAL_LIST_EMPTY(undershirt_m) //stores only undershirt name GLOBAL_LIST_EMPTY(undershirt_f) //stores only undershirt name +GLOBAL_LIST_EMPTY(undershirt_full_list) //Socks GLOBAL_LIST_EMPTY(socks_list) //stores /datum/sprite_accessory/socks indexed by name GLOBAL_LIST_EMPTY(socks_m) //stores only socks name diff --git a/code/controllers/configuration/sections/custom_sprites_configuration.dm b/code/controllers/configuration/sections/custom_sprites_configuration.dm index 3b1c18feb70..3962b6f18ef 100644 --- a/code/controllers/configuration/sections/custom_sprites_configuration.dm +++ b/code/controllers/configuration/sections/custom_sprites_configuration.dm @@ -10,6 +10,8 @@ var/list/pai_holoform_ckeys = list() /// Assoc of ckeys that have custom pAI screens. Key: ckey | value: list of icon states var/list/ipc_screen_map = list() + /// A list of ckeys to available undershirt fluff accessories + var/list/fluff_undershirts = list() /datum/configuration_section/custom_sprites_configuration/load_data(list/data) // Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line @@ -17,6 +19,7 @@ CONFIG_LOAD_LIST(ai_core_ckeys, data["ai_core"]) CONFIG_LOAD_LIST(ai_hologram_ckeys, data["ai_hologram"]) CONFIG_LOAD_LIST(pai_holoform_ckeys, data["pai_holoform"]) + CONFIG_LOAD_LIST(fluff_undershirts, data["fluff_undershirts"]) // Load the ipc screens if(islist(data["ipc_screens"])) diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 638306fa7d7..8a1670a2331 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -377,7 +377,7 @@ GLOBAL_VAR_INIT(record_id_num, 1001) underwear_standing.Blend(new /icon(u_icon, "uw_[U.icon_state]_s"), ICON_OVERLAY) if(H.undershirt && H.dna.species.clothing_flags & HAS_UNDERSHIRT) - var/datum/sprite_accessory/undershirt/U2 = GLOB.undershirt_list[H.undershirt] + var/datum/sprite_accessory/undershirt/U2 = GLOB.undershirt_full_list[H.undershirt] if(U2) var/u2_icon = U2.sprite_sheets && (H.dna.species.sprite_sheet_name in U2.sprite_sheets) ? U2.sprite_sheets[H.dna.species.sprite_sheet_name] : U2.icon underwear_standing.Blend(new /icon(u2_icon, "us_[U2.icon_state]_s"), ICON_OVERLAY) diff --git a/code/game/objects/structures/dresser.dm b/code/game/objects/structures/dresser.dm index 5bc31b1d050..39953e0f3be 100644 --- a/code/game/objects/structures/dresser.dm +++ b/code/game/objects/structures/dresser.dm @@ -35,6 +35,10 @@ if(!(H.dna.species.name in S.species_allowed)) continue valid_undershirts[undershirt] = GLOB.undershirt_list[undershirt] + for(var/config in GLOB.configuration.custom_sprites.fluff_undershirts) + if(user.ckey in config["ckeys"]) + valid_undershirts[config["name"]] = GLOB.undershirt_full_list[config["name"]] + sortTim(valid_undershirts, GLOBAL_PROC_REF(cmp_text_asc)) var/new_undershirt = tgui_input_list(user, "Choose your undershirt:", "Changing", valid_undershirts) if(new_undershirt) H.undershirt = new_undershirt diff --git a/code/modules/client/preference/character.dm b/code/modules/client/preference/character.dm index 3c428704268..ca41f5f71a8 100644 --- a/code/modules/client/preference/character.dm +++ b/code/modules/client/preference/character.dm @@ -1017,7 +1017,7 @@ var/icon/undershirt_s = null if(undershirt && (current_species.clothing_flags & HAS_UNDERSHIRT)) - var/datum/sprite_accessory/undershirt/U2 = GLOB.undershirt_list[undershirt] + var/datum/sprite_accessory/undershirt/U2 = GLOB.undershirt_full_list[undershirt] if(U2) var/u2_icon = U2.sprite_sheets && (current_species.sprite_sheet_name in U2.sprite_sheets) ? U2.sprite_sheets[current_species.sprite_sheet_name] : U2.icon undershirt_s = new/icon(u2_icon, "us_[U2.icon_state]_s", ICON_OVERLAY) diff --git a/code/modules/client/preference/link_processing.dm b/code/modules/client/preference/link_processing.dm index 2f358e18304..16844d7b02e 100644 --- a/code/modules/client/preference/link_processing.dm +++ b/code/modules/client/preference/link_processing.dm @@ -613,6 +613,9 @@ if(active_character.body_type == FEMALE && SA.body_type == MALE) continue valid_undershirts[undershirt] = GLOB.undershirt_list[undershirt] + for(var/config in GLOB.configuration.custom_sprites.fluff_undershirts) + if(user.ckey in config["ckeys"]) + valid_undershirts[config["name"]] = GLOB.undershirt_full_list[config["name"]] sortTim(valid_undershirts, GLOBAL_PROC_REF(cmp_text_asc)) var/new_undershirt = tgui_input_list(user, "Choose your character's undershirt", "Character Preference", valid_undershirts) ShowChoices(user) 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 a8db6ff9387..ca956fe6765 100644 --- a/code/modules/mob/living/carbon/human/human_update_icons.dm +++ b/code/modules/mob/living/carbon/human/human_update_icons.dm @@ -257,7 +257,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) underwear_standing.Blend(new /icon(u_icon, "uw_[U.icon_state]_s"), ICON_OVERLAY) if(undershirt && dna.species.clothing_flags & HAS_UNDERSHIRT) - var/datum/sprite_accessory/undershirt/U2 = GLOB.undershirt_list[undershirt] + var/datum/sprite_accessory/undershirt/U2 = GLOB.undershirt_full_list[undershirt] if(U2) var/u2_icon = U2.sprite_sheets && (dna.species.sprite_sheet_name in U2.sprite_sheets) ? U2.sprite_sheets[dna.species.sprite_sheet_name] : U2.icon underwear_standing.Blend(new /icon(u2_icon, "us_[U2.icon_state]_s"), ICON_OVERLAY) diff --git a/config/example/config.toml b/config/example/config.toml index d267309178b..011acb78f38 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -163,6 +163,13 @@ ipc_screens = [ "Icon State 2", ]}, ] +fluff_undershirts = [ + { name = "Shirt Name Here", ckeys = [ + "ckeyhere1", + "ckeyhere2", + ] }, +] + ################################################################