diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index b170e84c37d..c840b8c1608 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -2,58 +2,6 @@ /////Initial Building///// ////////////////////////// -/proc/init_sprite_accessories() - //hair - init_sprite_accessory_subtypes(/datum/sprite_accessory/hair, GLOB.hairstyles_list, GLOB.hairstyles_male_list, GLOB.hairstyles_female_list) - //facial hair - init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, GLOB.facial_hairstyles_list, GLOB.facial_hairstyles_male_list, GLOB.facial_hairstyles_female_list) - //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) - //socks - init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, GLOB.socks_list) - //SKYRAT EDIT REMOVAL BEGIN - CUSTOMIZATION - /* - //bodypart accessories (blizzard intensifies) - init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, GLOB.body_markings_list) - init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, GLOB.tails_list_human, add_blank = TRUE) - init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/lizard, GLOB.tails_list_lizard, add_blank = TRUE) - init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/monkey, GLOB.tails_list_monkey, add_blank = TRUE) - init_sprite_accessory_subtypes(/datum/sprite_accessory/snouts, GLOB.snouts_list) - init_sprite_accessory_subtypes(/datum/sprite_accessory/horns,GLOB.horns_list) - init_sprite_accessory_subtypes(/datum/sprite_accessory/ears, GLOB.ears_list) - init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.wings_list) - init_sprite_accessory_subtypes(/datum/sprite_accessory/wings_open, GLOB.wings_open_list) - init_sprite_accessory_subtypes(/datum/sprite_accessory/frills, GLOB.frills_list) - init_sprite_accessory_subtypes(/datum/sprite_accessory/spines, GLOB.spines_list) - init_sprite_accessory_subtypes(/datum/sprite_accessory/tail_spines, GLOB.tail_spines_list) - init_sprite_accessory_subtypes(/datum/sprite_accessory/legs, GLOB.legs_list) - init_sprite_accessory_subtypes(/datum/sprite_accessory/caps, GLOB.caps_list) - init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_wings, GLOB.moth_wings_list) - init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_antennae, GLOB.moth_antennae_list) - init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_markings, GLOB.moth_markings_list) -*/ //SKYRAT EDIT REMOVAL END - init_sprite_accessory_subtypes(/datum/sprite_accessory/pod_hair, GLOB.pod_hair_list) - // SKYRAT EDIT ADDITION START - init_sprite_accessory_subtypes(/datum/sprite_accessory/bra, GLOB.bra_list, GLOB.bra_m, GLOB.bra_f) - init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/monkey, GLOB.tails_list_monkey, add_blank = TRUE) - init_sprite_accessory_subtypes(/datum/sprite_accessory/caps, GLOB.caps_list, add_blank = TRUE) - init_sprite_accessory_subtypes(/datum/sprite_accessory/wings/moth, GLOB.moth_wings_list) - - //Scream types - for(var/spath in subtypesof(/datum/scream_type)) - var/datum/scream_type/S = new spath() - GLOB.scream_types[S.name] = spath - sort_list(GLOB.scream_types, GLOBAL_PROC_REF(cmp_typepaths_asc)) - - //Laugh types - for(var/spath in subtypesof(/datum/laugh_type)) - var/datum/laugh_type/L = new spath() - GLOB.laugh_types[L.name] = spath - sort_list(GLOB.laugh_types, GLOBAL_PROC_REF(cmp_typepaths_asc)) - // SKYRAT EDIT ADDITION END - /// Inits GLOB.species_list. Not using GLOBAL_LIST_INIT b/c it depends on GLOB.string_lists /proc/init_species_list() for(var/species_path in subtypesof(/datum/species)) @@ -69,21 +17,10 @@ sort_list(surgeries, GLOBAL_PROC_REF(cmp_typepaths_asc)) return surgeries -/// Hair Gradients - Initialise all /datum/sprite_accessory/hair_gradient into an list indexed by gradient-style name -/proc/init_hair_gradients() - for(var/path in subtypesof(/datum/sprite_accessory/gradient)) - var/datum/sprite_accessory/gradient/gradient = new path() - if(gradient.gradient_category & GRADIENT_APPLIES_TO_HAIR) - GLOB.hair_gradients_list[gradient.name] = gradient - if(gradient.gradient_category & GRADIENT_APPLIES_TO_FACIAL_HAIR) - GLOB.facial_hair_gradients_list[gradient.name] = gradient - /// Legacy procs that really should be replaced with proper _INIT macros /proc/make_datum_reference_lists() // I tried to eliminate this proc but I couldn't untangle their init-order interdependencies -Dominion/Cyberboss - init_sprite_accessories() init_species_list() - init_hair_gradients() init_keybindings() GLOB.emote_list = init_emote_list() // WHY DOES THIS NEED TO GO HERE? IT JUST INITS DATUMS make_skyrat_datum_references() //SKYRAT EDIT ADDITION - CUSTOMIZATION diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index a23fe29e663..38778f2a29a 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -29,31 +29,31 @@ return COLOR_BLACK /proc/random_underwear(gender) - if(!GLOB.underwear_list.len) - init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear, GLOB.underwear_list, GLOB.underwear_m, GLOB.underwear_f) + if(length(SSaccessories.underwear_list) == 0) + CRASH("No underwear to choose from!") switch(gender) if(MALE) - return pick(GLOB.underwear_m) + return pick(SSaccessories.underwear_m) if(FEMALE) - return pick(GLOB.underwear_f) + return pick(SSaccessories.underwear_f) else - return pick(GLOB.underwear_list) + return pick(SSaccessories.underwear_list) /proc/random_undershirt(gender) - if(!GLOB.undershirt_list.len) - init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt, GLOB.undershirt_list, GLOB.undershirt_m, GLOB.undershirt_f) + if(length(SSaccessories.undershirt_list) == 0) + CRASH("No undershirts to choose from!") switch(gender) if(MALE) - return pick(GLOB.undershirt_m) + return pick(SSaccessories.undershirt_m) if(FEMALE) - return pick(GLOB.undershirt_f) + return pick(SSaccessories.undershirt_f) else - return pick(GLOB.undershirt_list) + return pick(SSaccessories.undershirt_list) /proc/random_socks() - if(!GLOB.socks_list.len) - init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, GLOB.socks_list) - return pick(GLOB.socks_list) + if(length(SSaccessories.socks_list) == 0) + CRASH("No socks to choose from!") + return pick(SSaccessories.socks_list) /proc/random_backpack() return pick(GLOB.backpacklist) @@ -89,8 +89,8 @@ init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_antennae, GLOB.moth_antennae_list) if(!GLOB.moth_markings_list.len) init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_markings, GLOB.moth_markings_list) - if(!GLOB.pod_hair_list.len) - init_sprite_accessory_subtypes(/datum/sprite_accessory/pod_hair, GLOB.pod_hair_list) + if(!SSaccessories.pod_hair_list.len) + init_sprite_accessory_subtypes(/datum/sprite_accessory/pod_hair, SSaccessories.pod_hair_list) //For now we will always return none for tail_human and ears. | "For now" he says. return(list( @@ -111,7 +111,7 @@ "moth_antennae" = pick(GLOB.moth_antennae_list), "moth_markings" = pick(GLOB.moth_markings_list), "tail_monkey" = "Monkey", - "pod_hair" = pick(GLOB.pod_hair_list), + "pod_hair" = pick(SSaccessories.pod_hair_list), )) */ //SKYRAT EDIT REMOVAL END @@ -119,20 +119,20 @@ /proc/random_hairstyle(gender) switch(gender) if(MALE) - return pick(GLOB.hairstyles_male_list) + return pick(SSaccessories.hairstyles_male_list) if(FEMALE) - return pick(GLOB.hairstyles_female_list) + return pick(SSaccessories.hairstyles_female_list) else - return pick(GLOB.hairstyles_list) + return pick(SSaccessories.hairstyles_list) /proc/random_facial_hairstyle(gender) switch(gender) if(MALE) - return pick(GLOB.facial_hairstyles_male_list) + return pick(SSaccessories.facial_hairstyles_male_list) if(FEMALE) - return pick(GLOB.facial_hairstyles_female_list) + return pick(SSaccessories.facial_hairstyles_female_list) else - return pick(GLOB.facial_hairstyles_list) + return pick(SSaccessories.facial_hairstyles_list) /proc/random_unique_name(gender, attempts_to_find_unique_name=10) for(var/i in 1 to attempts_to_find_unique_name) diff --git a/code/__HELPERS/~skyrat_helpers/unsorted.dm b/code/__HELPERS/~skyrat_helpers/unsorted.dm index f6ae26cc82b..7affdd9ef3d 100644 --- a/code/__HELPERS/~skyrat_helpers/unsorted.dm +++ b/code/__HELPERS/~skyrat_helpers/unsorted.dm @@ -47,9 +47,9 @@ center_turf.luminosity = old_luminosity return . -///This will check if GLOB.sprite_accessories[mutant_part]?[part_name] is associated with sprite accessory with factual TRUE. +///This will check if SSaccessories.sprite_accessories[mutant_part]?[part_name] is associated with sprite accessory with factual TRUE. /proc/is_factual_sprite_accessory(mutant_part, part_name) if(!mutant_part || !part_name) return FALSE - var/datum/sprite_accessory/accessory = GLOB.sprite_accessories[mutant_part]?[part_name] + var/datum/sprite_accessory/accessory = SSaccessories.sprite_accessories[mutant_part]?[part_name] return accessory?.factual diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm index 4981880d5ff..792d49cfde9 100644 --- a/code/_globalvars/lists/flavor_misc.dm +++ b/code/_globalvars/lists/flavor_misc.dm @@ -1,51 +1,3 @@ -//Preferences stuff - //Hairstyles -GLOBAL_LIST_EMPTY(hairstyles_list) //stores /datum/sprite_accessory/hair indexed by name -GLOBAL_LIST_EMPTY(hairstyles_male_list) //stores only hair names -GLOBAL_LIST_EMPTY(hairstyles_female_list) //stores only hair names -GLOBAL_LIST_EMPTY(facial_hairstyles_list) //stores /datum/sprite_accessory/facial_hair indexed by name -GLOBAL_LIST_EMPTY(facial_hairstyles_male_list) //stores only hair names -GLOBAL_LIST_EMPTY(facial_hairstyles_female_list) //stores only hair names -GLOBAL_LIST_EMPTY(hair_gradients_list) //stores /datum/sprite_accessory/hair_gradient indexed by name -GLOBAL_LIST_EMPTY(facial_hair_gradients_list) //stores /datum/sprite_accessory/facial_hair_gradient indexed by name - //Underwear -GLOBAL_LIST_EMPTY(underwear_list) //stores /datum/sprite_accessory/underwear indexed by name -GLOBAL_LIST_EMPTY(underwear_m) //stores only underwear name -GLOBAL_LIST_EMPTY(underwear_f) //stores only underwear name - //Undershirts -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 - //Socks -GLOBAL_LIST_EMPTY(socks_list) //stores /datum/sprite_accessory/socks indexed by name - //Lizard Bits (all datum lists indexed by name) -//SKYRAT EDIT REMOVAL - CUSTOMIZATION -/* -GLOBAL_LIST_EMPTY(body_markings_list) -GLOBAL_LIST_EMPTY(snouts_list) -GLOBAL_LIST_EMPTY(horns_list) -GLOBAL_LIST_EMPTY(frills_list) -GLOBAL_LIST_EMPTY(spines_list) -GLOBAL_LIST_EMPTY(tail_spines_list) -GLOBAL_LIST_EMPTY(legs_list) - - //Mutant Human bits -GLOBAL_LIST_EMPTY(tails_list_human) -GLOBAL_LIST_EMPTY(tails_list_lizard) -GLOBAL_LIST_EMPTY(tails_list_monkey) -GLOBAL_LIST_EMPTY(ears_list) -GLOBAL_LIST_EMPTY(wings_list) -GLOBAL_LIST_EMPTY(wings_open_list) -GLOBAL_LIST_EMPTY(moth_wings_list) -GLOBAL_LIST_EMPTY(moth_antennae_list) -GLOBAL_LIST_EMPTY(moth_markings_list) -*/ -//SKYRAT EDIT REMOVAL END -GLOBAL_LIST_EMPTY(caps_list) -GLOBAL_LIST_EMPTY(pod_hair_list) -GLOBAL_LIST_EMPTY(moth_wings_list) // SKYRAT EDIT ADDITION - Customization -GLOBAL_LIST_EMPTY(tails_list_monkey) // SKYRAT EDIT ADDITION - Customization - GLOBAL_LIST_INIT(color_list_ethereal, list( "Blue" = "#3399ff", "Bright Yellow" = "#ffff99", diff --git a/code/controllers/subsystem/sprite_accessories.dm b/code/controllers/subsystem/sprite_accessories.dm new file mode 100644 index 00000000000..2b0bb20e414 --- /dev/null +++ b/code/controllers/subsystem/sprite_accessories.dm @@ -0,0 +1,198 @@ +/// The non gender specific list that we get from init_sprite_accessory_subtypes() +#define DEFAULT_SPRITE_LIST "default_sprites" +/// The male specific list that we get from init_sprite_accessory_subtypes() +#define MALE_SPRITE_LIST "male_sprites" +/// The female specific list that we get from init_sprite_accessory_subtypes() +#define FEMALE_SPRITE_LIST "female_sprites" + +/// subsystem that just holds lists of sprite accessories for accession in generating said sprites. +/// A sprite accessory is something that we add to a human sprite to make them look different. This is hair, facial hair, underwear, mutant bits, etc. +SUBSYSTEM_DEF(accessories) // just 'accessories' for brevity + name = "Sprite Accessories" + flags = SS_NO_FIRE | SS_NO_INIT + + //Hairstyles + var/list/hairstyles_list //! stores /datum/sprite_accessory/hair indexed by name + var/list/hairstyles_male_list //! stores only hair names + var/list/hairstyles_female_list //! stores only hair names + var/list/facial_hairstyles_list //! stores /datum/sprite_accessory/facial_hair indexed by name + var/list/facial_hairstyles_male_list //! stores only hair names + var/list/facial_hairstyles_female_list //! stores only hair names + var/list/hair_gradients_list //! stores /datum/sprite_accessory/hair_gradient indexed by name + var/list/facial_hair_gradients_list //! stores /datum/sprite_accessory/facial_hair_gradient indexed by name + + //Underwear + var/list/underwear_list //! stores /datum/sprite_accessory/underwear indexed by name + var/list/underwear_m //! stores only underwear name + var/list/underwear_f //! stores only underwear name + + //Undershirts + var/list/undershirt_list //! stores /datum/sprite_accessory/undershirt indexed by name + var/list/undershirt_m //! stores only undershirt name + var/list/undershirt_f //! stores only undershirt name + + //Socks + var/list/socks_list //! stores /datum/sprite_accessory/socks indexed by name + + //SKYRAT EDIT REMOVAL - CUSTOMIZATION + /* + //Lizard Bits (all datum lists indexed by name) + var/list/body_markings_list + var/list/snouts_list + var/list/horns_list + var/list/frills_list + var/list/spines_list + var/list/legs_list + var/list/tail_spines_list + + //Mutant Human bits + var/list/tails_list_human + var/list/tails_list_lizard + var/list/tails_list_monkey + var/list/ears_list + var/list/wings_list + var/list/wings_open_list + var/list/moth_wings_list + var/list/moth_antennae_list + var/list/moth_markings_list + var/list/caps_list + */ + var/list/pod_hair_list + + // SKYRAT EDIT BEGIN + var/list/sprite_accessories + + /// Stores all /datum/sprite_accessory/bra indexed by name. + var/list/bra_list + /// Stores only the bra names for male-compatible bras. + var/list/bra_m + /// Stores only the bra names for female-compatible bras. + var/list/bra_f + + /// Shroom caps. + var/list/caps_list + /// Stores moth wings, both open and closed + var/list/moth_wings_list + /// Monkey tail list + var/list/tails_list_monkey + /// All the different scream types + var/list/scream_types + //SKYRAT EDIT END + +/datum/controller/subsystem/accessories/PreInit() // this stuff NEEDS to be set up before GLOB for preferences and stuff to work so this must go here. sorry + setup_lists() + init_hair_gradients() + +/// Sets up all of the lists for later utilization in the round and building sprites. +/// In an ideal world we could tack everything that just needed `DEFAULT_SPRITE_LIST` into static variables on the top, but due to the initialization order +/// where this subsystem will initialize BEFORE statics, it's just not feasible since this all needs to be ready for actual subsystems to use. +/// Sorry. +/datum/controller/subsystem/accessories/proc/setup_lists() + var/hair_lists = init_sprite_accessory_subtypes(/datum/sprite_accessory/hair) + hairstyles_list = hair_lists[DEFAULT_SPRITE_LIST] + hairstyles_male_list = hair_lists[MALE_SPRITE_LIST] + hairstyles_female_list = hair_lists[FEMALE_SPRITE_LIST] + + var/facial_hair_lists = init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair) + facial_hairstyles_list = facial_hair_lists[DEFAULT_SPRITE_LIST] + facial_hairstyles_male_list = facial_hair_lists[MALE_SPRITE_LIST] + facial_hairstyles_female_list = facial_hair_lists[FEMALE_SPRITE_LIST] + + var/underwear_lists = init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear) + underwear_list = underwear_lists[DEFAULT_SPRITE_LIST] + underwear_m = underwear_lists[MALE_SPRITE_LIST] + underwear_f = underwear_lists[FEMALE_SPRITE_LIST] + + var/undershirt_lists = init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt) + undershirt_list = undershirt_lists[DEFAULT_SPRITE_LIST] + undershirt_m = undershirt_lists[MALE_SPRITE_LIST] + undershirt_f = undershirt_lists[FEMALE_SPRITE_LIST] + + socks_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/socks)[DEFAULT_SPRITE_LIST] + + /* //SKYRAT EDIT REMOVAL - CUSTOMIZATION + body_markings_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings)[DEFAULT_SPRITE_LIST] + tails_list_human = init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, add_blank = TRUE)[DEFAULT_SPRITE_LIST] + tails_list_lizard = init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/lizard, add_blank = TRUE)[DEFAULT_SPRITE_LIST] + tails_list_monkey = init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/monkey, add_blank = TRUE)[DEFAULT_SPRITE_LIST] + snouts_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/snouts)[DEFAULT_SPRITE_LIST] + horns_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/horns)[DEFAULT_SPRITE_LIST] + ears_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/ears)[DEFAULT_SPRITE_LIST] + wings_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/wings)[DEFAULT_SPRITE_LIST] + wings_open_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/wings_open)[DEFAULT_SPRITE_LIST] + frills_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/frills)[DEFAULT_SPRITE_LIST] + spines_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/spines)[DEFAULT_SPRITE_LIST] + tail_spines_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/tail_spines)[DEFAULT_SPRITE_LIST] + legs_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/legs)[DEFAULT_SPRITE_LIST] + caps_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/caps)[DEFAULT_SPRITE_LIST] + moth_wings_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_wings)[DEFAULT_SPRITE_LIST] + moth_antennae_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_antennae)[DEFAULT_SPRITE_LIST] + moth_markings_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_markings)[DEFAULT_SPRITE_LIST] + pod_hair_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/pod_hair)[DEFAULT_SPRITE_LIST] + */ + + var/bra_lists = init_sprite_accessory_subtypes(/datum/sprite_accessory/bra) // SKYRAT EDIT ADDITION + bra_list = bra_lists[DEFAULT_SPRITE_LIST] + bra_m = bra_lists[MALE_SPRITE_LIST] + bra_f = bra_lists[FEMALE_SPRITE_LIST] + + moth_wings_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/wings/moth)[DEFAULT_SPRITE_LIST] // SKYRAT EDIT ADDITION - Customization + tails_list_monkey = init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/monkey, add_blank = TRUE)[DEFAULT_SPRITE_LIST] // SKYRAT EDIT ADDITION - We don't want monkeys getting randomized non-monkey tails + pod_hair_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/pod_hair, add_blank = TRUE)[DEFAULT_SPRITE_LIST] // SKYRAT EDIT - Customization - ORIGINAL: init_sprite_accessory_subtypes(/datum/sprite_accessory/pod_hair, GLOB.pod_hair_list) + + caps_list = init_sprite_accessory_subtypes(/datum/sprite_accessory/caps)[DEFAULT_SPRITE_LIST] + //SKYRAT EDIT ADDITION BEGIN + //Scream types + SSaccessories.scream_types = list() + for(var/spath in subtypesof(/datum/scream_type)) + var/datum/scream_type/S = new spath() + SSaccessories.scream_types[S.name] = spath + sort_list(SSaccessories.scream_types, GLOBAL_PROC_REF(cmp_typepaths_asc)) + //SKYRAT EDIT END + +/// This proc just intializes all /datum/sprite_accessory/hair_gradient into an list indexed by gradient-style name +/datum/controller/subsystem/accessories/proc/init_hair_gradients() + hair_gradients_list = list() + facial_hair_gradients_list = list() + for(var/path in subtypesof(/datum/sprite_accessory/gradient)) + var/datum/sprite_accessory/gradient/gradient = new path + if(gradient.gradient_category & GRADIENT_APPLIES_TO_HAIR) + hair_gradients_list[gradient.name] = gradient + if(gradient.gradient_category & GRADIENT_APPLIES_TO_FACIAL_HAIR) + facial_hair_gradients_list[gradient.name] = gradient + +/// This reads the applicable sprite accessory datum's subtypes and adds it to the subsystem's list of sprite accessories. +/// The boolean `add_blank` argument just adds a "None" option to the list of sprite accessories, like if a felinid doesn't want a tail or something, typically good for gated-off things. +/datum/controller/subsystem/accessories/proc/init_sprite_accessory_subtypes(prototype, add_blank = FALSE) + RETURN_TYPE(/list) + var/returnable_list = list( + DEFAULT_SPRITE_LIST = list(), + MALE_SPRITE_LIST = list(), + FEMALE_SPRITE_LIST = list(), + ) + + for(var/path in subtypesof(prototype)) + var/datum/sprite_accessory/accessory = new path + + if(accessory.icon_state) + returnable_list[DEFAULT_SPRITE_LIST][accessory.name] = accessory + else + returnable_list[DEFAULT_SPRITE_LIST] += accessory.name + + switch(accessory.gender) + if(MALE) + returnable_list[MALE_SPRITE_LIST] += accessory.name + if(FEMALE) + returnable_list[FEMALE_SPRITE_LIST] += accessory.name + else + returnable_list[MALE_SPRITE_LIST] += accessory.name + returnable_list[FEMALE_SPRITE_LIST] += accessory.name + + if(add_blank) + returnable_list[DEFAULT_SPRITE_LIST][SPRITE_ACCESSORY_NONE] = new /datum/sprite_accessory/blank + + return returnable_list + +#undef DEFAULT_SPRITE_LIST +#undef MALE_SPRITE_LIST +#undef FEMALE_SPRITE_LIST diff --git a/code/datums/dna.dm b/code/datums/dna.dm index 88dcae3ba7e..913e66a74ff 100644 --- a/code/datums/dna.dm +++ b/code/datums/dna.dm @@ -218,13 +218,12 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) L[DNA_GENDER_BLOCK] = construct_block(G_PLURAL, GENDERS) if(ishuman(holder)) var/mob/living/carbon/human/H = holder - if(!GLOB.hairstyles_list.len) - init_sprite_accessory_subtypes(/datum/sprite_accessory/hair,GLOB.hairstyles_list, GLOB.hairstyles_male_list, GLOB.hairstyles_female_list) - L[DNA_HAIRSTYLE_BLOCK] = construct_block(GLOB.hairstyles_list.Find(H.hairstyle), GLOB.hairstyles_list.len) + if(length(SSaccessories.hairstyles_list) == 0 || length(SSaccessories.facial_hairstyles_list) == 0) + CRASH("SSaccessories lists are empty, this is bad!") + + L[DNA_HAIRSTYLE_BLOCK] = construct_block(SSaccessories.hairstyles_list.Find(H.hairstyle), length(SSaccessories.hairstyles_list)) L[DNA_HAIR_COLOR_BLOCK] = sanitize_hexcolor(H.hair_color, include_crunch = FALSE) - if(!GLOB.facial_hairstyles_list.len) - init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, GLOB.facial_hairstyles_list, GLOB.facial_hairstyles_male_list, GLOB.facial_hairstyles_female_list) - L[DNA_FACIAL_HAIRSTYLE_BLOCK] = construct_block(GLOB.facial_hairstyles_list.Find(H.facial_hairstyle), GLOB.facial_hairstyles_list.len) + L[DNA_FACIAL_HAIRSTYLE_BLOCK] = construct_block(SSaccessories.facial_hairstyles_list.Find(H.facial_hairstyle), length(SSaccessories.facial_hairstyles_list)) L[DNA_FACIAL_HAIR_COLOR_BLOCK] = sanitize_hexcolor(H.facial_hair_color, include_crunch = FALSE) L[DNA_SKIN_TONE_BLOCK] = construct_block(GLOB.skin_tones.Find(H.skin_tone), GLOB.skin_tones.len) L[DNA_EYE_COLOR_LEFT_BLOCK] = sanitize_hexcolor(H.eye_color_left, include_crunch = FALSE) @@ -244,31 +243,33 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) if(features["ethcolor"]) L[DNA_ETHEREAL_COLOR_BLOCK] = sanitize_hexcolor(features["ethcolor"], include_crunch = FALSE) if(features["body_markings"]) - L[DNA_LIZARD_MARKINGS_BLOCK] = construct_block(GLOB.body_markings_list.Find(features["body_markings"]), GLOB.body_markings_list.len) + L[DNA_LIZARD_MARKINGS_BLOCK] = construct_block(SSaccessories.body_markings_list.Find(features["body_markings"]), length(SSaccessories.body_markings_list)) if(features["tail_cat"]) - L[DNA_TAIL_BLOCK] = construct_block(GLOB.tails_list_human.Find(features["tail_cat"]), GLOB.tails_list_human.len) + L[DNA_TAIL_BLOCK] = construct_block(SSaccessories.tails_list_human.Find(features["tail_cat"]), length(SSaccessories.tails_list_human)) if(features["tail_lizard"]) - L[DNA_LIZARD_TAIL_BLOCK] = construct_block(GLOB.tails_list_lizard.Find(features["tail_lizard"]), GLOB.tails_list_lizard.len) + L[DNA_LIZARD_TAIL_BLOCK] = construct_block(SSaccessories.tails_list_lizard.Find(features["tail_lizard"]), length(SSaccessories.tails_list_lizard)) + if(features["tail_monkey"]) + L[DNA_MONKEY_TAIL_BLOCK] = construct_block(SSaccessories.tails_list_monkey.Find(features["tail_monkey"]), length(SSaccessories.tails_list_monkey)) if(features["snout"]) - L[DNA_SNOUT_BLOCK] = construct_block(GLOB.snouts_list.Find(features["snout"]), GLOB.snouts_list.len) + L[DNA_SNOUT_BLOCK] = construct_block(SSaccessories.snouts_list.Find(features["snout"]), length(SSaccessories.snouts_list)) if(features["horns"]) - L[DNA_HORNS_BLOCK] = construct_block(GLOB.horns_list.Find(features["horns"]), GLOB.horns_list.len) + L[DNA_HORNS_BLOCK] = construct_block(SSaccessories.horns_list.Find(features["horns"]), length(SSaccessories.horns_list)) if(features["frills"]) - L[DNA_FRILLS_BLOCK] = construct_block(GLOB.frills_list.Find(features["frills"]), GLOB.frills_list.len) + L[DNA_FRILLS_BLOCK] = construct_block(SSaccessories.frills_list.Find(features["frills"]), length(SSaccessories.frills_list)) if(features["spines"]) - L[DNA_SPINES_BLOCK] = construct_block(GLOB.spines_list.Find(features["spines"]), GLOB.spines_list.len) + L[DNA_SPINES_BLOCK] = construct_block(SSaccessories.spines_list.Find(features["spines"]), length(SSaccessories.spines_list)) if(features["ears"]) - L[DNA_EARS_BLOCK] = construct_block(GLOB.ears_list.Find(features["ears"]), GLOB.ears_list.len) + L[DNA_EARS_BLOCK] = construct_block(SSaccessories.ears_list.Find(features["ears"]), length(SSaccessories.ears_list)) if(features["moth_wings"] != "Burnt Off") - L[DNA_MOTH_WINGS_BLOCK] = construct_block(GLOB.moth_wings_list.Find(features["moth_wings"]), GLOB.moth_wings_list.len) + L[DNA_MOTH_WINGS_BLOCK] = construct_block(SSaccessories.moth_wings_list.Find(features["moth_wings"]), length(SSaccessories.moth_wings_list)) if(features["moth_antennae"] != "Burnt Off") - L[DNA_MOTH_ANTENNAE_BLOCK] = construct_block(GLOB.moth_antennae_list.Find(features["moth_antennae"]), GLOB.moth_antennae_list.len) + L[DNA_MOTH_ANTENNAE_BLOCK] = construct_block(SSaccessories.moth_antennae_list.Find(features["moth_antennae"]), length(SSaccessories.moth_antennae_list)) if(features["moth_markings"]) - L[DNA_MOTH_MARKINGS_BLOCK] = construct_block(GLOB.moth_markings_list.Find(features["moth_markings"]), GLOB.moth_markings_list.len) + L[DNA_MOTH_MARKINGS_BLOCK] = construct_block(SSaccessories.moth_markings_list.Find(features["moth_markings"]), length(SSaccessories.moth_markings_list)) if(features["caps"]) - L[DNA_MUSHROOM_CAPS_BLOCK] = construct_block(GLOB.caps_list.Find(features["caps"]), GLOB.caps_list.len) + L[DNA_MUSHROOM_CAPS_BLOCK] = construct_block(SSaccessories.caps_list.Find(features["caps"]), length(SSaccessories.caps_list)) if(features["pod_hair"]) - L[DNA_POD_HAIR_BLOCK] = construct_block(GLOB.pod_hair_list.Find(features["pod_hair"]), GLOB.pod_hair_list.len) + L[DNA_POD_HAIR_BLOCK] = construct_block(SSaccessories.pod_hair_list.Find(features["pod_hair"]), length(SSaccessories.pod_hair_list)) for(var/blocknum in 1 to DNA_FEATURE_BLOCKS) . += L[blocknum] || random_string(GET_UI_BLOCK_LEN(blocknum), GLOB.hex_characters) @@ -369,9 +370,9 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) else set_uni_identity_block(blocknumber, construct_block(G_PLURAL, GENDERS)) if(DNA_FACIAL_HAIRSTYLE_BLOCK) - set_uni_identity_block(blocknumber, construct_block(GLOB.facial_hairstyles_list.Find(H.facial_hairstyle), GLOB.facial_hairstyles_list.len)) + set_uni_identity_block(blocknumber, construct_block(SSaccessories.facial_hairstyles_list.Find(H.facial_hairstyle), length(SSaccessories.facial_hairstyles_list))) if(DNA_HAIRSTYLE_BLOCK) - set_uni_identity_block(blocknumber, construct_block(GLOB.hairstyles_list.Find(H.hairstyle), GLOB.hairstyles_list.len)) + set_uni_identity_block(blocknumber, construct_block(SSaccessories.hairstyles_list.Find(H.hairstyle), length(SSaccessories.hairstyles_list))) //SKYRAT EDIT REMOVAL BEGIN - CUSTOMIZATION (moved to modular_skyrat/modules/customization/code/datums/dna.dm) /* @@ -386,31 +387,33 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) if(DNA_ETHEREAL_COLOR_BLOCK) set_uni_feature_block(blocknumber, sanitize_hexcolor(features["ethcolor"], include_crunch = FALSE)) if(DNA_LIZARD_MARKINGS_BLOCK) - set_uni_feature_block(blocknumber, construct_block(GLOB.body_markings_list.Find(features["body_markings"]), GLOB.body_markings_list.len)) + set_uni_feature_block(blocknumber, construct_block(SSaccessories.body_markings_list.Find(features["body_markings"]), length(SSaccessories.body_markings_list))) if(DNA_TAIL_BLOCK) - set_uni_feature_block(blocknumber, construct_block(GLOB.tails_list_human.Find(features["tail_cat"]), GLOB.tails_list_human.len)) + set_uni_feature_block(blocknumber, construct_block(SSaccessories.tails_list_human.Find(features["tail_cat"]), length(SSaccessories.tails_list_human))) if(DNA_LIZARD_TAIL_BLOCK) - set_uni_feature_block(blocknumber, construct_block(GLOB.tails_list_lizard.Find(features["tail_lizard"]), GLOB.tails_list_lizard.len)) + set_uni_feature_block(blocknumber, construct_block(SSaccessories.tails_list_lizard.Find(features["tail_lizard"]), length(SSaccessories.tails_list_lizard))) + if(DNA_MONKEY_TAIL_BLOCK) + set_uni_feature_block(blocknumber, construct_block(SSaccessories.tails_list_monkey.Find(features["tail_monkey"]), length(SSaccessories.tails_list_monkey))) if(DNA_SNOUT_BLOCK) - set_uni_feature_block(blocknumber, construct_block(GLOB.snouts_list.Find(features["snout"]), GLOB.snouts_list.len)) + set_uni_feature_block(blocknumber, construct_block(SSaccessories.snouts_list.Find(features["snout"]), length(SSaccessories.snouts_list))) if(DNA_HORNS_BLOCK) - set_uni_feature_block(blocknumber, construct_block(GLOB.horns_list.Find(features["horns"]), GLOB.horns_list.len)) + set_uni_feature_block(blocknumber, construct_block(SSaccessories.horns_list.Find(features["horns"]), length(SSaccessories.horns_list))) if(DNA_FRILLS_BLOCK) - set_uni_feature_block(blocknumber, construct_block(GLOB.frills_list.Find(features["frills"]), GLOB.frills_list.len)) + set_uni_feature_block(blocknumber, construct_block(SSaccessories.frills_list.Find(features["frills"]), length(SSaccessories.frills_list))) if(DNA_SPINES_BLOCK) - set_uni_feature_block(blocknumber, construct_block(GLOB.spines_list.Find(features["spines"]), GLOB.spines_list.len)) + set_uni_feature_block(blocknumber, construct_block(SSaccessories.spines_list.Find(features["spines"]), length(SSaccessories.spines_list))) if(DNA_EARS_BLOCK) - set_uni_feature_block(blocknumber, construct_block(GLOB.ears_list.Find(features["ears"]), GLOB.ears_list.len)) + set_uni_feature_block(blocknumber, construct_block(SSaccessories.ears_list.Find(features["ears"]), length(SSaccessories.ears_list))) if(DNA_MOTH_WINGS_BLOCK) - set_uni_feature_block(blocknumber, construct_block(GLOB.moth_wings_list.Find(features["moth_wings"]), GLOB.moth_wings_list.len)) + set_uni_feature_block(blocknumber, construct_block(SSaccessories.moth_wings_list.Find(features["moth_wings"]), length(SSaccessories.moth_wings_list))) if(DNA_MOTH_ANTENNAE_BLOCK) - set_uni_feature_block(blocknumber, construct_block(GLOB.moth_antennae_list.Find(features["moth_antennae"]), GLOB.moth_antennae_list.len)) + set_uni_feature_block(blocknumber, construct_block(SSaccessories.moth_antennae_list.Find(features["moth_antennae"]), length(SSaccessories.moth_antennae_list))) if(DNA_MOTH_MARKINGS_BLOCK) - set_uni_feature_block(blocknumber, construct_block(GLOB.moth_markings_list.Find(features["moth_markings"]), GLOB.moth_markings_list.len)) + set_uni_feature_block(blocknumber, construct_block(SSaccessories.moth_markings_list.Find(features["moth_markings"]), length(SSaccessories.moth_markings_list))) if(DNA_MUSHROOM_CAPS_BLOCK) - set_uni_feature_block(blocknumber, construct_block(GLOB.caps_list.Find(features["caps"]), GLOB.caps_list.len)) + set_uni_feature_block(blocknumber, construct_block(SSaccessories.caps_list.Find(features["caps"]), length(SSaccessories.caps_list))) if(DNA_POD_HAIR_BLOCK) - set_uni_feature_block(blocknumber, construct_block(GLOB.pod_hair_list.Find(features["pod_hair"]), GLOB.pod_hair_list.len)) + set_uni_feature_block(blocknumber, construct_block(SSaccessories.pod_hair_list.Find(features["pod_hair"]), length(SSaccessories.pod_hair_list))) */ //SKYRAT EDIT REMOVAL END @@ -699,12 +702,12 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) if(HAS_TRAIT(src, TRAIT_SHAVED)) set_facial_hairstyle("Shaved", update = FALSE) else - var/style = GLOB.facial_hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_FACIAL_HAIRSTYLE_BLOCK), GLOB.facial_hairstyles_list.len)] + var/style = SSaccessories.facial_hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_FACIAL_HAIRSTYLE_BLOCK), length(SSaccessories.facial_hairstyles_list))] set_facial_hairstyle(style, update = FALSE) if(HAS_TRAIT(src, TRAIT_BALD)) set_hairstyle("Bald", update = FALSE) else - var/style = GLOB.hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_HAIRSTYLE_BLOCK), GLOB.hairstyles_list.len)] + var/style = SSaccessories.hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_HAIRSTYLE_BLOCK), length(SSaccessories.hairstyles_list))] set_hairstyle(style, update = FALSE) var/features = dna.unique_features if(dna.features["mcolor"]) @@ -712,36 +715,38 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block()) if(dna.features["ethcolor"]) dna.features["ethcolor"] = sanitize_hexcolor(get_uni_feature_block(features, DNA_ETHEREAL_COLOR_BLOCK)) if(dna.features["body_markings"]) - dna.features["body_markings"] = GLOB.body_markings_list[deconstruct_block(get_uni_feature_block(features, DNA_LIZARD_MARKINGS_BLOCK), GLOB.body_markings_list.len)] + dna.features["body_markings"] = SSaccessories.body_markings_list[deconstruct_block(get_uni_feature_block(features, DNA_LIZARD_MARKINGS_BLOCK), length(SSaccessories.body_markings_list))] if(dna.features["snout"]) - dna.features["snout"] = GLOB.snouts_list[deconstruct_block(get_uni_feature_block(features, DNA_SNOUT_BLOCK), GLOB.snouts_list.len)] + dna.features["snout"] = SSaccessories.snouts_list[deconstruct_block(get_uni_feature_block(features, DNA_SNOUT_BLOCK), length(SSaccessories.snouts_list))] if(dna.features["horns"]) - dna.features["horns"] = GLOB.horns_list[deconstruct_block(get_uni_feature_block(features, DNA_HORNS_BLOCK), GLOB.horns_list.len)] + dna.features["horns"] = SSaccessories.horns_list[deconstruct_block(get_uni_feature_block(features, DNA_HORNS_BLOCK), length(SSaccessories.horns_list))] if(dna.features["frills"]) - dna.features["frills"] = GLOB.frills_list[deconstruct_block(get_uni_feature_block(features, DNA_FRILLS_BLOCK), GLOB.frills_list.len)] + dna.features["frills"] = SSaccessories.frills_list[deconstruct_block(get_uni_feature_block(features, DNA_FRILLS_BLOCK), length(SSaccessories.frills_list))] if(dna.features["spines"]) - dna.features["spines"] = GLOB.spines_list[deconstruct_block(get_uni_feature_block(features, DNA_SPINES_BLOCK), GLOB.spines_list.len)] + dna.features["spines"] = SSaccessories.spines_list[deconstruct_block(get_uni_feature_block(features, DNA_SPINES_BLOCK), length(SSaccessories.spines_list))] if(dna.features["tail_cat"]) - dna.features["tail_cat"] = GLOB.tails_list_human[deconstruct_block(get_uni_feature_block(features, DNA_TAIL_BLOCK), GLOB.tails_list_human.len)] + dna.features["tail_cat"] = SSaccessories.tails_list_human[deconstruct_block(get_uni_feature_block(features, DNA_TAIL_BLOCK), length(SSaccessories.tails_list_human))] if(dna.features["tail_lizard"]) - dna.features["tail_cat"] = GLOB.tails_list_lizard[deconstruct_block(get_uni_feature_block(features, DNA_LIZARD_TAIL_BLOCK), GLOB.tails_list_lizard.len)] + dna.features["tail_lizard"] = SSaccessories.tails_list_lizard[deconstruct_block(get_uni_feature_block(features, DNA_LIZARD_TAIL_BLOCK), length(SSaccessories.tails_list_lizard))] + if(dna.features["tail_monkey"]) + dna.features["tail_monkey"] = SSaccessories.tails_list_monkey[deconstruct_block(get_uni_feature_block(features, DNA_MONKEY_TAIL_BLOCK), length(SSaccessories.tails_list_monkey))] if(dna.features["ears"]) - dna.features["ears"] = GLOB.ears_list[deconstruct_block(get_uni_feature_block(features, DNA_EARS_BLOCK), GLOB.ears_list.len)] + dna.features["ears"] = SSaccessories.ears_list[deconstruct_block(get_uni_feature_block(features, DNA_EARS_BLOCK), length(SSaccessories.ears_list))] if(dna.features["moth_wings"]) - var/genetic_value = GLOB.moth_wings_list[deconstruct_block(get_uni_feature_block(features, DNA_MOTH_WINGS_BLOCK), GLOB.moth_wings_list.len)] + var/genetic_value = SSaccessories.moth_wings_list[deconstruct_block(get_uni_feature_block(features, DNA_MOTH_WINGS_BLOCK), length(SSaccessories.moth_wings_list))] dna.features["original_moth_wings"] = genetic_value dna.features["moth_wings"] = genetic_value if(dna.features["moth_antennae"]) - var/genetic_value = GLOB.moth_antennae_list[deconstruct_block(get_uni_feature_block(features, DNA_MOTH_ANTENNAE_BLOCK), GLOB.moth_antennae_list.len)] + var/genetic_value = SSaccessories.moth_antennae_list[deconstruct_block(get_uni_feature_block(features, DNA_MOTH_ANTENNAE_BLOCK), length(SSaccessories.moth_antennae_list))] dna.features["original_moth_antennae"] = genetic_value if(dna.features["moth_antennae"] != "Burnt Off") dna.features["moth_antennae"] = genetic_value if(dna.features["moth_markings"]) - dna.features["moth_markings"] = GLOB.moth_markings_list[deconstruct_block(get_uni_feature_block(features, DNA_MOTH_MARKINGS_BLOCK), GLOB.moth_markings_list.len)] + dna.features["moth_markings"] = SSaccessories.moth_markings_list[deconstruct_block(get_uni_feature_block(features, DNA_MOTH_MARKINGS_BLOCK), length(SSaccessories.moth_markings_list))] if(dna.features["caps"]) - dna.features["caps"] = GLOB.caps_list[deconstruct_block(get_uni_feature_block(features, DNA_MUSHROOM_CAPS_BLOCK), GLOB.caps_list.len)] + dna.features["caps"] = SSaccessories.caps_list[deconstruct_block(get_uni_feature_block(features, DNA_MUSHROOM_CAPS_BLOCK), length(SSaccessories.caps_list))] if(dna.features["pod_hair"]) - dna.features["pod_hair"] = GLOB.pod_hair_list[deconstruct_block(get_uni_feature_block(features, DNA_POD_HAIR_BLOCK), GLOB.pod_hair_list.len)] + dna.features["pod_hair"] = SSaccessories.pod_hair_list[deconstruct_block(get_uni_feature_block(features, DNA_POD_HAIR_BLOCK), length(SSaccessories.pod_hair_list))] for(var/obj/item/organ/external/external_organ in organs) diff --git a/code/datums/quirks/neutral_quirks/bald.dm b/code/datums/quirks/neutral_quirks/bald.dm index 8a760f6ceef..2844b790ddf 100644 --- a/code/datums/quirks/neutral_quirks/bald.dm +++ b/code/datums/quirks/neutral_quirks/bald.dm @@ -21,7 +21,7 @@ /datum/quirk/item_quirk/bald/add_unique(client/client_source) var/obj/item/clothing/head/wig/natural/baldie_wig = new(get_turf(quirk_holder)) if(old_hair == "Bald") - baldie_wig.hairstyle = pick(GLOB.hairstyles_list - "Bald") + baldie_wig.hairstyle = pick(SSaccessories.hairstyles_list - "Bald") else baldie_wig.hairstyle = old_hair diff --git a/code/datums/sprite_accessories.dm b/code/datums/sprite_accessories.dm index 202471d620f..855224fcb7b 100644 --- a/code/datums/sprite_accessories.dm +++ b/code/datums/sprite_accessories.dm @@ -16,35 +16,6 @@ * conversion in savefile.dm */ -/proc/init_sprite_accessory_subtypes(prototype, list/L, list/male, list/female, add_blank)//Roundstart argument builds a specific list for roundstart parts where some parts may be locked - if(!istype(L)) - L = list() - if(!istype(male)) - male = list() - if(!istype(female)) - female = list() - - for(var/path in subtypesof(prototype)) - var/datum/sprite_accessory/D = new path() - - if(D.icon_state) - L[D.name] = D - else - L += D.name - - switch(D.gender) - if(MALE) - male += D.name - if(FEMALE) - female += D.name - else - male += D.name - female += D.name - if(add_blank) - L[SPRITE_ACCESSORY_NONE] = new /datum/sprite_accessory/blank - - return L - /datum/sprite_accessory /// The icon file the accessory is located in. var/icon diff --git a/code/game/objects/items/cosmetics.dm b/code/game/objects/items/cosmetics.dm index 42402c88e10..a79a0430bb2 100644 --- a/code/game/objects/items/cosmetics.dm +++ b/code/game/objects/items/cosmetics.dm @@ -218,7 +218,7 @@ return if(!user.can_perform_action(src, FORBID_TELEKINESIS_REACH)) return - var/new_style = tgui_input_list(user, "Select a facial hairstyle", "Grooming", GLOB.facial_hairstyles_list) + var/new_style = tgui_input_list(user, "Select a facial hairstyle", "Grooming", SSaccessories.facial_hairstyles_list) if(isnull(new_style)) return if(!get_location_accessible(human_target, location)) @@ -271,7 +271,7 @@ return if(!user.can_perform_action(src, FORBID_TELEKINESIS_REACH)) return - var/new_style = tgui_input_list(user, "Select a hairstyle", "Grooming", GLOB.hairstyles_list) + var/new_style = tgui_input_list(user, "Select a hairstyle", "Grooming", SSaccessories.hairstyles_list) if(isnull(new_style)) return if(!get_location_accessible(human_target, location)) diff --git a/code/game/objects/items/dyespray.dm b/code/game/objects/items/dyespray.dm index 6852ac7b0e1..24fa7b80c81 100644 --- a/code/game/objects/items/dyespray.dm +++ b/code/game/objects/items/dyespray.dm @@ -33,7 +33,7 @@ if(!beard_or_hair || !user.can_perform_action(src, NEED_DEXTERITY)) return - var/list/choices = beard_or_hair == "Hair" ? GLOB.hair_gradients_list : GLOB.facial_hair_gradients_list + var/list/choices = beard_or_hair == "Hair" ? SSaccessories.hair_gradients_list : SSaccessories.facial_hair_gradients_list var/new_grad_style = tgui_input_list(user, "Choose a color pattern", "Character Preference", choices) if(isnull(new_grad_style)) return diff --git a/code/game/objects/structures/dresser.dm b/code/game/objects/structures/dresser.dm index 1f8f3a69903..feb9cff2f00 100644 --- a/code/game/objects/structures/dresser.dm +++ b/code/game/objects/structures/dresser.dm @@ -42,7 +42,7 @@ return switch(choice) if("Underwear") - var/new_undies = tgui_input_list(user, "Select your underwear", "Changing", GLOB.underwear_list) + var/new_undies = tgui_input_list(user, "Select your underwear", "Changing", SSaccessories.underwear_list) if(new_undies) dressing_human.underwear = new_undies if("Underwear Color") @@ -50,11 +50,11 @@ if(new_underwear_color) dressing_human.underwear_color = sanitize_hexcolor(new_underwear_color) if("Undershirt") - var/new_undershirt = tgui_input_list(user, "Select your undershirt", "Changing", GLOB.undershirt_list) + var/new_undershirt = tgui_input_list(user, "Select your undershirt", "Changing", SSaccessories.undershirt_list) if(new_undershirt) dressing_human.undershirt = new_undershirt if("Socks") - var/new_socks = tgui_input_list(user, "Select your socks", "Changing", GLOB.socks_list) + var/new_socks = tgui_input_list(user, "Select your socks", "Changing", SSaccessories.socks_list) if(new_socks) dressing_human.socks = new_socks //SKYRAT EDIT ADDITION BEGIN - Colorable Undershirt/Socks/Bras @@ -68,7 +68,7 @@ dressing_human.socks_color = sanitize_hexcolor(new_socks_color) if("Bra") - var/new_bra = tgui_input_list(user, "Select your Bra", "Changing", GLOB.bra_list) + var/new_bra = tgui_input_list(user, "Select your Bra", "Changing", SSaccessories.bra_list) if(new_bra) dressing_human.bra = new_bra diff --git a/code/game/objects/structures/mannequin.dm b/code/game/objects/structures/mannequin.dm index 6ee4d79f522..c5296883763 100644 --- a/code/game/objects/structures/mannequin.dm +++ b/code/game/objects/structures/mannequin.dm @@ -95,23 +95,23 @@ var/mutable_appearance/pedestal = mutable_appearance(icon, "pedestal_[material]") pedestal.pixel_y = -3 . += pedestal - var/datum/sprite_accessory/underwear/underwear = GLOB.underwear_list[underwear_name] + var/datum/sprite_accessory/underwear/underwear = SSaccessories.underwear_list[underwear_name] if(underwear) if(body_type == FEMALE && underwear.gender == MALE) . += wear_female_version(underwear.icon_state, underwear.icon, BODY_LAYER, FEMALE_UNIFORM_FULL) else . += mutable_appearance(underwear.icon, underwear.icon_state, -BODY_LAYER) - var/datum/sprite_accessory/undershirt/undershirt = GLOB.undershirt_list[undershirt_name] + var/datum/sprite_accessory/undershirt/undershirt = SSaccessories.undershirt_list[undershirt_name] if(undershirt) if(body_type == FEMALE) . += wear_female_version(undershirt.icon_state, undershirt.icon, BODY_LAYER) else . += mutable_appearance(undershirt.icon, undershirt.icon_state, -BODY_LAYER) - var/datum/sprite_accessory/socks/socks = GLOB.socks_list[socks_name] + var/datum/sprite_accessory/socks/socks = SSaccessories.socks_list[socks_name] if(socks) . += mutable_appearance(socks.icon, socks.icon_state, -BODY_LAYER) //SKYRAT EDIT ADDITION BEGIN - Underwear and Bra split - var/datum/sprite_accessory/bra/bra = GLOB.bra_list[bra_name] + var/datum/sprite_accessory/bra/bra = SSaccessories.bra_list[bra_name] if(bra) . += mutable_appearance(bra.icon, bra.icon_state, -BODY_LAYER) //SKYRAT EDIT END @@ -174,20 +174,20 @@ return switch(choice) if("Underwear") - var/new_undies = tgui_input_list(user, "Select the mannequin's underwear", "Changing", GLOB.underwear_list) + var/new_undies = tgui_input_list(user, "Select the mannequin's underwear", "Changing", SSaccessories.underwear_list) if(new_undies) underwear_name = new_undies if("Undershirt") - var/new_undershirt = tgui_input_list(user, "Select the mannequin's undershirt", "Changing", GLOB.undershirt_list) + var/new_undershirt = tgui_input_list(user, "Select the mannequin's undershirt", "Changing", SSaccessories.undershirt_list) if(new_undershirt) undershirt_name = new_undershirt if("Socks") - var/new_socks = tgui_input_list(user, "Select the mannequin's socks", "Changing", GLOB.socks_list) + var/new_socks = tgui_input_list(user, "Select the mannequin's socks", "Changing", SSaccessories.socks_list) if(new_socks) socks_name = new_socks //SKYRAT EDIT ADDITION BEGIN - Underwear and Bra split if("Bra") - var/new_bra = tgui_input_list(user, "Select the mannequin's bra", "Changing", GLOB.bra_list) + var/new_bra = tgui_input_list(user, "Select the mannequin's bra", "Changing", SSaccessories.bra_list) if(new_bra) bra_name = new_bra //SKYRAT EDIT END diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index 21452c0895d..8166671b6e8 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -118,7 +118,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror/broken, 28) beard_dresser.set_facial_hairstyle("Shaved", update = TRUE) return TRUE - var/new_style = tgui_input_list(beard_dresser, "Select a facial hairstyle", "Grooming", GLOB.facial_hairstyles_list) + var/new_style = tgui_input_list(beard_dresser, "Select a facial hairstyle", "Grooming", SSaccessories.facial_hairstyles_list) if(isnull(new_style)) return TRUE @@ -131,7 +131,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror/broken, 28) beard_dresser.set_facial_hairstyle(new_style, update = TRUE) /obj/structure/mirror/proc/change_hair(mob/living/carbon/human/hairdresser) - var/new_style = tgui_input_list(hairdresser, "Select a hairstyle", "Grooming", GLOB.hairstyles_list) + var/new_style = tgui_input_list(hairdresser, "Select a hairstyle", "Grooming", SSaccessories.hairstyles_list) if(isnull(new_style)) return TRUE if(HAS_TRAIT(hairdresser, TRAIT_BALD)) @@ -331,7 +331,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror/broken, 28) selectable_races = sort_list(selectable_races) /obj/structure/mirror/magic/change_beard(mob/living/carbon/human/beard_dresser) // magical mirrors do nothing but give you the damn beard - var/new_style = tgui_input_list(beard_dresser, "Select a facial hairstyle", "Grooming", GLOB.facial_hairstyles_list) + var/new_style = tgui_input_list(beard_dresser, "Select a facial hairstyle", "Grooming", SSaccessories.facial_hairstyles_list) if(isnull(new_style)) return TRUE beard_dresser.set_facial_hairstyle(new_style, update = TRUE) diff --git a/code/modules/client/preferences/clothing.dm b/code/modules/client/preferences/clothing.dm index 827b91c49c2..eacf31315c1 100644 --- a/code/modules/client/preferences/clothing.dm +++ b/code/modules/client/preferences/clothing.dm @@ -95,7 +95,7 @@ should_generate_icons = TRUE /datum/preference/choiced/socks/init_possible_values() - return assoc_to_keys_features(GLOB.socks_list) + return assoc_to_keys_features(SSaccessories.socks_list) /datum/preference/choiced/socks/icon_for(value) var/static/icon/lower_half @@ -105,7 +105,7 @@ lower_half.Blend(icon('icons/mob/human/bodyparts_greyscale.dmi', "human_r_leg"), ICON_OVERLAY) lower_half.Blend(icon('icons/mob/human/bodyparts_greyscale.dmi', "human_l_leg"), ICON_OVERLAY) - return generate_underwear_icon(GLOB.socks_list[value], lower_half) + return generate_underwear_icon(SSaccessories.socks_list[value], lower_half) /datum/preference/choiced/socks/apply_to_human(mob/living/carbon/human/target, value) target.socks = value @@ -119,7 +119,7 @@ should_generate_icons = TRUE /datum/preference/choiced/undershirt/init_possible_values() - return assoc_to_keys_features(GLOB.undershirt_list) + return assoc_to_keys_features(SSaccessories.undershirt_list) /datum/preference/choiced/undershirt/icon_for(value) var/static/icon/body @@ -135,8 +135,8 @@ var/icon/icon_with_undershirt = icon(body) if (value != "Nude") - var/datum/sprite_accessory/accessory = GLOB.undershirt_list[value] - icon_with_undershirt.Blend(icon(accessory.icon, accessory.icon_state), ICON_OVERLAY) // SKYRAT EDIT CHANGE: ORIGINAL - icon_with_undershirt.Blend(icon('icons/mob/clothing/underwear.dmi', accessory.icon_state), ICON_OVERLAY) + var/datum/sprite_accessory/accessory = SSaccessories.undershirt_list[value] + icon_with_undershirt.Blend(icon(accessory.icon, accessory.icon_state), ICON_OVERLAY)// SKYRAT EDIT CHANGE: ORIGINAL - icon_with_undershirt.Blend(icon('icons/mob/clothing/underwear.dmi', accessory.icon_state), ICON_OVERLAY) icon_with_undershirt.Crop(10, 11, 22, 23) // SKYRAT EDIT CHANGE : ORIGINAL - icon_with_undershirt.Crop(9, 9, 23, 23) icon_with_undershirt.Scale(32, 32) @@ -154,7 +154,7 @@ should_generate_icons = TRUE /datum/preference/choiced/underwear/init_possible_values() - return assoc_to_keys_features(GLOB.underwear_list) + return assoc_to_keys_features(SSaccessories.underwear_list) /datum/preference/choiced/underwear/icon_for(value) var/static/icon/lower_half @@ -165,7 +165,7 @@ lower_half.Blend(icon('icons/mob/human/bodyparts_greyscale.dmi', "human_r_leg"), ICON_OVERLAY) lower_half.Blend(icon('icons/mob/human/bodyparts_greyscale.dmi', "human_l_leg"), ICON_OVERLAY) - return generate_underwear_icon(GLOB.underwear_list[value], lower_half, COLOR_ALMOST_BLACK, icon_offset = 5) // SKYRAT EDIT CHANGE : ICON_OFFSET + return generate_underwear_icon(SSaccessories.underwear_list[value], lower_half, COLOR_ALMOST_BLACK) /datum/preference/choiced/underwear/apply_to_human(mob/living/carbon/human/target, value) target.underwear = value diff --git a/code/modules/client/preferences/species_features/basic.dm b/code/modules/client/preferences/species_features/basic.dm index abf4ea0e44e..3f101ad9e44 100644 --- a/code/modules/client/preferences/species_features/basic.dm +++ b/code/modules/client/preferences/species_features/basic.dm @@ -7,7 +7,7 @@ var/icon/final_icon = new(head_icon) if (!isnull(sprite_accessory)) ASSERT(istype(sprite_accessory)) - + var/icon/head_accessory_icon = icon(sprite_accessory.icon, sprite_accessory.icon_state) if(y_offset) head_accessory_icon.Shift(NORTH, y_offset) @@ -61,10 +61,10 @@ relevant_head_flag = HEAD_FACIAL_HAIR /datum/preference/choiced/facial_hairstyle/init_possible_values() - return assoc_to_keys_features(GLOB.facial_hairstyles_list) + return assoc_to_keys_features(SSaccessories.facial_hairstyles_list) /datum/preference/choiced/facial_hairstyle/icon_for(value) - return generate_icon_with_head_accessory(GLOB.facial_hairstyles_list[value]) + return generate_icon_with_head_accessory(SSaccessories.facial_hairstyles_list[value]) /datum/preference/choiced/facial_hairstyle/apply_to_human(mob/living/carbon/human/target, value) target.set_facial_hairstyle(value, update = FALSE) @@ -94,7 +94,7 @@ relevant_head_flag = HEAD_FACIAL_HAIR /datum/preference/choiced/facial_hair_gradient/init_possible_values() - return assoc_to_keys_features(GLOB.facial_hair_gradients_list) + return assoc_to_keys_features(SSaccessories.facial_hair_gradients_list) /datum/preference/choiced/facial_hair_gradient/apply_to_human(mob/living/carbon/human/target, value) target.set_facial_hair_gradient_style(new_style = value, update = FALSE) @@ -137,10 +137,10 @@ relevant_head_flag = HEAD_HAIR /datum/preference/choiced/hairstyle/init_possible_values() - return assoc_to_keys_features(GLOB.hairstyles_list) + return assoc_to_keys_features(SSaccessories.hairstyles_list) /datum/preference/choiced/hairstyle/icon_for(value) - var/datum/sprite_accessory/hair/hairstyle = GLOB.hairstyles_list[value] + var/datum/sprite_accessory/hair/hairstyle = SSaccessories.hairstyles_list[value] return generate_icon_with_head_accessory(hairstyle, hairstyle?.y_offset) /datum/preference/choiced/hairstyle/apply_to_human(mob/living/carbon/human/target, value) @@ -161,7 +161,7 @@ relevant_head_flag = HEAD_HAIR /datum/preference/choiced/hair_gradient/init_possible_values() - return assoc_to_keys_features(GLOB.hair_gradients_list) + return assoc_to_keys_features(SSaccessories.hair_gradients_list) /datum/preference/choiced/hair_gradient/apply_to_human(mob/living/carbon/human/target, value) target.set_hair_gradient_style(new_style = value, update = FALSE) diff --git a/code/modules/client/preferences/species_features/felinid.dm b/code/modules/client/preferences/species_features/felinid.dm index 037615ee809..6d4a06ff385 100644 --- a/code/modules/client/preferences/species_features/felinid.dm +++ b/code/modules/client/preferences/species_features/felinid.dm @@ -7,7 +7,7 @@ relevant_external_organ = /obj/item/organ/external/tail/cat /datum/preference/choiced/tail_human/init_possible_values() - return assoc_to_keys_features(GLOB.tails_list_human) + return assoc_to_keys_features(SSaccessories.tails_list_human) /datum/preference/choiced/tail_human/apply_to_human(mob/living/carbon/human/target, value) target.dna.features["tail_cat"] = value @@ -24,7 +24,7 @@ relevant_mutant_bodypart = "ears" /datum/preference/choiced/ears/init_possible_values() - return assoc_to_keys_features(GLOB.ears_list) + return assoc_to_keys_features(SSaccessories.ears_list) /datum/preference/choiced/ears/apply_to_human(mob/living/carbon/human/target, value) target.dna.features["ears"] = value diff --git a/code/modules/client/preferences/species_features/lizard.dm b/code/modules/client/preferences/species_features/lizard.dm index 2e0b3f3e513..4f459d8085f 100644 --- a/code/modules/client/preferences/species_features/lizard.dm +++ b/code/modules/client/preferences/species_features/lizard.dm @@ -33,10 +33,10 @@ relevant_mutant_bodypart = "body_markings" /datum/preference/choiced/lizard_body_markings/init_possible_values() - return assoc_to_keys_features(GLOB.body_markings_list) + return assoc_to_keys_features(SSaccessories.body_markings_list) /datum/preference/choiced/lizard_body_markings/icon_for(value) - var/datum/sprite_accessory/sprite_accessory = GLOB.body_markings_list[value] + var/datum/sprite_accessory/sprite_accessory = SSaccessories.body_markings_list[value] var/icon/final_icon = icon('icons/mob/human/species/lizard/bodyparts.dmi', "lizard_chest_m") @@ -66,10 +66,10 @@ should_generate_icons = TRUE /datum/preference/choiced/lizard_frills/init_possible_values() - return assoc_to_keys_features(GLOB.frills_list) + return assoc_to_keys_features(SSaccessories.frills_list) /datum/preference/choiced/lizard_frills/icon_for(value) - return generate_lizard_side_shot(GLOB.frills_list[value], "frills") + return generate_lizard_side_shot(SSaccessories.frills_list[value], "frills") /datum/preference/choiced/lizard_frills/apply_to_human(mob/living/carbon/human/target, value) target.dna.features["frills"] = value @@ -82,10 +82,10 @@ should_generate_icons = TRUE /datum/preference/choiced/lizard_horns/init_possible_values() - return assoc_to_keys_features(GLOB.horns_list) + return assoc_to_keys_features(SSaccessories.horns_list) /datum/preference/choiced/lizard_horns/icon_for(value) - return generate_lizard_side_shot(GLOB.horns_list[value], "horns") + return generate_lizard_side_shot(SSaccessories.horns_list[value], "horns") /datum/preference/choiced/lizard_horns/apply_to_human(mob/living/carbon/human/target, value) target.dna.features["horns"] = value @@ -97,7 +97,7 @@ relevant_mutant_bodypart = "legs" /datum/preference/choiced/lizard_legs/init_possible_values() - return assoc_to_keys_features(GLOB.legs_list) + return assoc_to_keys_features(SSaccessories.legs_list) /datum/preference/choiced/lizard_legs/apply_to_human(mob/living/carbon/human/target, value) target.dna.features["legs"] = value @@ -110,10 +110,10 @@ should_generate_icons = TRUE /datum/preference/choiced/lizard_snout/init_possible_values() - return assoc_to_keys_features(GLOB.snouts_list) + return assoc_to_keys_features(SSaccessories.snouts_list) /datum/preference/choiced/lizard_snout/icon_for(value) - return generate_lizard_side_shot(GLOB.snouts_list[value], "snout", include_snout = FALSE) + return generate_lizard_side_shot(SSaccessories.snouts_list[value], "snout", include_snout = FALSE) /datum/preference/choiced/lizard_snout/apply_to_human(mob/living/carbon/human/target, value) target.dna.features["snout"] = value @@ -125,7 +125,7 @@ relevant_mutant_bodypart = "spines" /datum/preference/choiced/lizard_spines/init_possible_values() - return assoc_to_keys_features(GLOB.spines_list) + return assoc_to_keys_features(SSaccessories.spines_list) /datum/preference/choiced/lizard_spines/apply_to_human(mob/living/carbon/human/target, value) target.dna.features["spines"] = value @@ -137,7 +137,7 @@ relevant_external_organ = /obj/item/organ/external/tail/lizard /datum/preference/choiced/lizard_tail/init_possible_values() - return assoc_to_keys_features(GLOB.tails_list_lizard) + return assoc_to_keys_features(SSaccessories.tails_list_lizard) /datum/preference/choiced/lizard_tail/apply_to_human(mob/living/carbon/human/target, value) target.dna.features["tail_lizard"] = value diff --git a/code/modules/client/preferences/species_features/monkey.dm b/code/modules/client/preferences/species_features/monkey.dm index 74d9343a695..8e469f3ab03 100644 --- a/code/modules/client/preferences/species_features/monkey.dm +++ b/code/modules/client/preferences/species_features/monkey.dm @@ -6,7 +6,7 @@ relevant_external_organ = /obj/item/organ/external/tail/monkey /datum/preference/choiced/monkey_tail/init_possible_values() - return assoc_to_keys_features(GLOB.tails_list_monkey) + return assoc_to_keys_features(SSaccessories.tails_list_monkey) /datum/preference/choiced/monkey_tail/apply_to_human(mob/living/carbon/human/target, value) target.dna.features["tail_monkey"] = value diff --git a/code/modules/client/preferences/species_features/moth.dm b/code/modules/client/preferences/species_features/moth.dm index 2879cfb8788..d377414b0bf 100644 --- a/code/modules/client/preferences/species_features/moth.dm +++ b/code/modules/client/preferences/species_features/moth.dm @@ -7,7 +7,7 @@ should_generate_icons = TRUE /datum/preference/choiced/moth_antennae/init_possible_values() - return assoc_to_keys_features(GLOB.moth_antennae_list) + return assoc_to_keys_features(SSaccessories.moth_antennae_list) /datum/preference/choiced/moth_antennae/icon_for(value) var/static/icon/moth_head @@ -17,7 +17,7 @@ moth_head.Blend(icon('icons/mob/human/human_face.dmi', "motheyes_l"), ICON_OVERLAY) moth_head.Blend(icon('icons/mob/human/human_face.dmi', "motheyes_r"), ICON_OVERLAY) - var/datum/sprite_accessory/antennae = GLOB.moth_antennae_list[value] + var/datum/sprite_accessory/antennae = SSaccessories.moth_antennae_list[value] var/icon/icon_with_antennae = new(moth_head) icon_with_antennae.Blend(icon(antennae.icon, "m_moth_antennae_[antennae.icon_state]_FRONT"), ICON_OVERLAY) @@ -38,7 +38,7 @@ relevant_mutant_bodypart = "moth_markings" /datum/preference/choiced/moth_markings/init_possible_values() - return assoc_to_keys_features(GLOB.moth_markings_list) + return assoc_to_keys_features(SSaccessories.moth_markings_list) /datum/preference/choiced/moth_markings/icon_for(value) var/static/list/body_parts = list( @@ -60,7 +60,7 @@ moth_body.Blend(icon('icons/mob/human/human_face.dmi', "motheyes_l"), ICON_OVERLAY) moth_body.Blend(icon('icons/mob/human/human_face.dmi', "motheyes_r"), ICON_OVERLAY) - var/datum/sprite_accessory/markings = GLOB.moth_markings_list[value] + var/datum/sprite_accessory/markings = SSaccessories.moth_markings_list[value] var/icon/icon_with_markings = new(moth_body) if (value != "None") @@ -89,10 +89,10 @@ should_generate_icons = TRUE /datum/preference/choiced/moth_wings/init_possible_values() - return assoc_to_keys_features(GLOB.moth_wings_list) + return assoc_to_keys_features(SSaccessories.moth_wings_list) /datum/preference/choiced/moth_wings/icon_for(value) - var/datum/sprite_accessory/moth_wings = GLOB.moth_wings_list[value] + var/datum/sprite_accessory/moth_wings = SSaccessories.moth_wings_list[value] var/icon/final_icon = icon(moth_wings.icon, "m_moth_wings_[moth_wings.icon_state]_BEHIND") final_icon.Blend(icon(moth_wings.icon, "m_moth_wings_[moth_wings.icon_state]_FRONT"), ICON_OVERLAY) return final_icon diff --git a/code/modules/client/preferences/species_features/pod.dm b/code/modules/client/preferences/species_features/pod.dm index 7f7746ea41d..22092f0cba9 100644 --- a/code/modules/client/preferences/species_features/pod.dm +++ b/code/modules/client/preferences/species_features/pod.dm @@ -8,10 +8,10 @@ should_generate_icons = TRUE /datum/preference/choiced/pod_hair/init_possible_values() - return assoc_to_keys_features(GLOB.pod_hair_list) + return assoc_to_keys_features(SSaccessories.pod_hair_list) /datum/preference/choiced/pod_hair/icon_for(value) - var/datum/sprite_accessory/pod_hair = GLOB.pod_hair_list[value] + var/datum/sprite_accessory/pod_hair = SSaccessories.pod_hair_list[value] var/icon/icon_with_hair = icon('icons/mob/human/bodyparts_greyscale.dmi', "pod_head_m") @@ -26,7 +26,7 @@ return icon_with_hair /datum/preference/choiced/pod_hair/create_default_value() - return pick(assoc_to_keys_features(GLOB.pod_hair_list)) + return pick(assoc_to_keys_features(SSaccessories.pod_hair_list)) /datum/preference/choiced/pod_hair/apply_to_human(mob/living/carbon/human/target, value) target.dna.features["pod_hair"] = value diff --git a/code/modules/clothing/head/wig.dm b/code/modules/clothing/head/wig.dm index 5ab2bcad214..ecd70742ba8 100644 --- a/code/modules/clothing/head/wig.dm +++ b/code/modules/clothing/head/wig.dm @@ -25,7 +25,7 @@ item_flags &= ~EXAMINE_SKIP /obj/item/clothing/head/wig/update_icon_state() - var/datum/sprite_accessory/hair/hair_style = GLOB.hairstyles_list[hairstyle] + var/datum/sprite_accessory/hair/hair_style = SSaccessories.hairstyles_list[hairstyle] if(hair_style) icon = hair_style.icon icon_state = hair_style.icon_state @@ -36,7 +36,7 @@ if(isinhands) return - var/datum/sprite_accessory/hair/hair = GLOB.hairstyles_list[hairstyle] + var/datum/sprite_accessory/hair/hair = SSaccessories.hairstyles_list[hairstyle] if(!hair) return @@ -49,7 +49,7 @@ hair_overlay.overlays += emissive_blocker(hair_overlay.icon, hair_overlay.icon_state, src, alpha = hair_overlay.alpha) /obj/item/clothing/head/wig/attack_self(mob/user) - var/new_style = tgui_input_list(user, "Select a hairstyle", "Wig Styling", GLOB.hairstyles_list - "Bald") + var/new_style = tgui_input_list(user, "Select a hairstyle", "Wig Styling", SSaccessories.hairstyles_list - "Bald") var/newcolor = adjustablecolor ? input(usr,"","Choose Color",color) as color|null : null if(!user.can_perform_action(src)) return @@ -92,7 +92,7 @@ update_appearance() /obj/item/clothing/head/wig/random/Initialize(mapload) - hairstyle = pick(GLOB.hairstyles_list - "Bald") //Don't want invisible wig + hairstyle = pick(SSaccessories.hairstyles_list - "Bald") //Don't want invisible wig add_atom_colour("#[random_short_color()]", FIXED_COLOUR_PRIORITY) . = ..() @@ -104,7 +104,7 @@ custom_price = PAYCHECK_COMMAND /obj/item/clothing/head/wig/natural/Initialize(mapload) - hairstyle = pick(GLOB.hairstyles_list - "Bald") + hairstyle = pick(SSaccessories.hairstyles_list - "Bald") . = ..() /obj/item/clothing/head/wig/natural/visual_equipped(mob/living/carbon/human/user, slot) diff --git a/code/modules/food_and_drinks/restaurant/customers/_customer.dm b/code/modules/food_and_drinks/restaurant/customers/_customer.dm index 3f13b526056..15e4659338d 100644 --- a/code/modules/food_and_drinks/restaurant/customers/_customer.dm +++ b/code/modules/food_and_drinks/restaurant/customers/_customer.dm @@ -306,7 +306,7 @@ /datum/customer_data/moth/proc/get_wings(mob/living/basic/robot_customer/customer) var/customer_ref = WEAKREF(customer) if (!LAZYACCESS(wings_chosen, customer_ref)) - LAZYSET(wings_chosen, customer_ref, pick(GLOB.sprite_accessories["wings"])) + LAZYSET(wings_chosen, customer_ref, SSaccessories.moth_wings_list[pick(SSaccessories.moth_wings_list)]) return wings_chosen[customer_ref] /datum/customer_data/moth/get_underlays(mob/living/basic/robot_customer/customer) diff --git a/code/modules/hydroponics/grown/replicapod.dm b/code/modules/hydroponics/grown/replicapod.dm index c1fd02bf9f0..6bbe433ce1f 100644 --- a/code/modules/hydroponics/grown/replicapod.dm +++ b/code/modules/hydroponics/grown/replicapod.dm @@ -197,7 +197,7 @@ if(!features["mcolor"]) features["mcolor"] = "#59CE00" /*if(!features["pod_hair"]) - features["pod_hair"] = pick(GLOB.pod_hair_list)*/ //SKYRAT EDIT - Tricolor Pod Hair + features["pod_hair"] = pick(SSaccessories.pod_hair_list)*/ //SKYRAT EDIT - Tricolor Pod Hair for(var/V in quirks) new V(podman) diff --git a/code/modules/mining/lavaland/tendril_loot.dm b/code/modules/mining/lavaland/tendril_loot.dm index 40a3a3384d0..d2233602c06 100644 --- a/code/modules/mining/lavaland/tendril_loot.dm +++ b/code/modules/mining/lavaland/tendril_loot.dm @@ -566,7 +566,7 @@ var/list/name2type = list() for(var/obj/item/organ/external/wings/functional/possible_type as anything in wing_types) var/datum/sprite_accessory/accessory = initial(possible_type.sprite_accessory_override) //get the type - accessory = GLOB.sprite_accessories[initial(accessory.key)][initial(accessory.name)] //SKYRAT EDIT CHANGE - ORIGINAL: accessory = GLOB.wings_list[initial(accessory.name)] //get the singleton instance + accessory = SSaccessories.sprite_accessories["wings"][initial(accessory.name)] //get the singleton instance // SKYRAT EDIT - Original SSaccessories.wings_list[initial(accessory.name)] var/image/img = image(icon = accessory.icon, icon_state = "m_wingsopen_[accessory.icon_state]_BEHIND") //Process the HUD elements img.transform *= 0.5 img.pixel_x = -32 diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 519220bc754..096a6e64834 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -224,7 +224,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) if(ghost_accs == GHOST_ACCS_FULL && (icon_state in GLOB.ghost_forms_with_accessories_list)) //check if this form supports accessories and if the client wants to show them if(facial_hairstyle) - var/datum/sprite_accessory/S = GLOB.facial_hairstyles_list[facial_hairstyle] + var/datum/sprite_accessory/S = SSaccessories.facial_hairstyles_list[facial_hairstyle] if(S) facial_hair_overlay = mutable_appearance(S.icon, "[S.icon_state]", -HAIR_LAYER) if(facial_hair_color) @@ -232,7 +232,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) facial_hair_overlay.alpha = 200 add_overlay(facial_hair_overlay) if(hairstyle) - var/datum/sprite_accessory/hair/S = GLOB.hairstyles_list[hairstyle] + var/datum/sprite_accessory/hair/S = SSaccessories.hairstyles_list[hairstyle] if(S) hair_overlay = mutable_appearance(S.icon, "[S.icon_state]", -HAIR_LAYER) if(hair_color) diff --git a/code/modules/mob/living/basic/space_fauna/ghost.dm b/code/modules/mob/living/basic/space_fauna/ghost.dm index 7545f9cfea3..728c5ead9f4 100644 --- a/code/modules/mob/living/basic/space_fauna/ghost.dm +++ b/code/modules/mob/living/basic/space_fauna/ghost.dm @@ -71,7 +71,7 @@ ghost_facial_hair_color = ghost_hair_color if(!isnull(ghost_hairstyle) && ghost_hairstyle != "Bald") //Bald hairstyle and the Shaved facial hairstyle lack an associated sprite and will not properly generate hair, and just cause runtimes. - var/datum/sprite_accessory/hair/hair_style = GLOB.hairstyles_list[ghost_hairstyle] //We use the hairstyle name to get the sprite accessory, which we copy the icon_state from. + var/datum/sprite_accessory/hair/hair_style = SSaccessories.hairstyles_list[ghost_hairstyle] //We use the hairstyle name to get the sprite accessory, which we copy the icon_state from. ghost_hair = mutable_appearance('icons/mob/human/human_face.dmi', "[hair_style.icon_state]", -HAIR_LAYER) ghost_hair.alpha = 200 ghost_hair.color = ghost_hair_color @@ -79,7 +79,7 @@ add_overlay(ghost_hair) if(!isnull(ghost_facial_hairstyle) && ghost_facial_hairstyle != "Shaved") - var/datum/sprite_accessory/facial_hair_style = GLOB.facial_hairstyles_list[ghost_facial_hairstyle] + var/datum/sprite_accessory/facial_hair_style = SSaccessories.facial_hairstyles_list[ghost_facial_hairstyle] ghost_facial_hair = mutable_appearance('icons/mob/human/human_face.dmi', "[facial_hair_style.icon_state]", -HAIR_LAYER) ghost_facial_hair.alpha = 200 ghost_facial_hair.color = ghost_facial_hair_color diff --git a/code/modules/mob/living/carbon/human/_species.dm b/code/modules/mob/living/carbon/human/_species.dm index 76523925a28..eba0b32704e 100644 --- a/code/modules/mob/living/carbon/human/_species.dm +++ b/code/modules/mob/living/carbon/human/_species.dm @@ -2171,7 +2171,7 @@ GLOBAL_LIST_EMPTY(features_by_species) if(issynthetic(target)) var/list/chassis = target.dna.mutant_bodyparts[MUTANT_SYNTH_CHASSIS] if(chassis) - var/list/chassis_accessory = GLOB.sprite_accessories[MUTANT_SYNTH_CHASSIS] + var/list/chassis_accessory = SSaccessories.sprite_accessories[MUTANT_SYNTH_CHASSIS] var/datum/sprite_accessory/synth_chassis/body_choice if(chassis_accessory) body_choice = chassis_accessory[chassis[MUTANT_INDEX_NAME]] diff --git a/code/modules/mob/living/carbon/human/dummy.dm b/code/modules/mob/living/carbon/human/dummy.dm index d5f83163822..c8e0ad4d0b3 100644 --- a/code/modules/mob/living/carbon/human/dummy.dm +++ b/code/modules/mob/living/carbon/human/dummy.dm @@ -104,18 +104,18 @@ INITIALIZE_IMMEDIATE(/mob/living/carbon/human/dummy) /* SKYRAT EDIT START - Customization - ORIGINAL: target.dna.features["mcolor"] = COLOR_VIBRANT_LIME target.dna.features["ethcolor"] = COLOR_WHITE - target.dna.features["body_markings"] = get_consistent_feature_entry(GLOB.body_markings_list) - target.dna.features["ears"] = get_consistent_feature_entry(GLOB.ears_list) - target.dna.features["frills"] = get_consistent_feature_entry(GLOB.frills_list) - target.dna.features["horns"] = get_consistent_feature_entry(GLOB.horns_list) - target.dna.features["moth_antennae"] = get_consistent_feature_entry(GLOB.moth_antennae_list) - target.dna.features["moth_markings"] = get_consistent_feature_entry(GLOB.moth_markings_list) - target.dna.features["moth_wings"] = get_consistent_feature_entry(GLOB.moth_wings_list) - target.dna.features["snout"] = get_consistent_feature_entry(GLOB.snouts_list) - target.dna.features["spines"] = get_consistent_feature_entry(GLOB.spines_list) - target.dna.features["tail_cat"] = get_consistent_feature_entry(GLOB.tails_list_human) // it's a lie - target.dna.features["tail_lizard"] = get_consistent_feature_entry(GLOB.tails_list_lizard) - target.dna.features["pod_hair"] = get_consistent_feature_entry(GLOB.pod_hair_list) + target.dna.features["body_markings"] = get_consistent_feature_entry(SSaccessories.body_markings_list) + target.dna.features["ears"] = get_consistent_feature_entry(SSaccessories.ears_list) + target.dna.features["frills"] = get_consistent_feature_entry(SSaccessories.frills_list) + target.dna.features["horns"] = get_consistent_feature_entry(SSaccessories.horns_list) + target.dna.features["moth_antennae"] = get_consistent_feature_entry(SSaccessories.moth_antennae_list) + target.dna.features["moth_markings"] = get_consistent_feature_entry(SSaccessories.moth_markings_list) + target.dna.features["moth_wings"] = get_consistent_feature_entry(SSaccessories.moth_wings_list) + target.dna.features["snout"] = get_consistent_feature_entry(SSaccessories.snouts_list) + target.dna.features["spines"] = get_consistent_feature_entry(SSaccessories.spines_list) + target.dna.features["tail_cat"] = get_consistent_feature_entry(SSaccessories.tails_list_human) // it's a lie + target.dna.features["tail_lizard"] = get_consistent_feature_entry(SSaccessories.tails_list_lizard) + target.dna.features["pod_hair"] = get_consistent_feature_entry(SSaccessories.pod_hair_list) */ // ORIGINAL END - SKYRAT EDIT START target.dna.features["mcolor"] = COLOR_VIBRANT_LIME target.dna.features["ethcolor"] = COLOR_WHITE diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 07995aeec2b..996c94fa871 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -482,7 +482,7 @@ //SKYRAT EDIT ADDITION BEGIN - CUSTOMIZATION for(var/genital in GLOB.possible_genitals) if(dna.species.mutant_bodyparts[genital]) - var/datum/sprite_accessory/genital/G = GLOB.sprite_accessories[genital][dna.species.mutant_bodyparts[genital][MUTANT_INDEX_NAME]] + var/datum/sprite_accessory/genital/G = SSaccessories.sprite_accessories[genital][dna.species.mutant_bodyparts[genital][MUTANT_INDEX_NAME]] if(G) if(!(G.is_hidden(src))) . += "[t_He] [t_has] exposed genitals... \[Look closer...\]" diff --git a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm index 439dd8b42e9..86fdb990626 100644 --- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm @@ -62,7 +62,7 @@ /* /datum/species/lizard/randomize_features(mob/living/carbon/human/human_mob) var/list/features = ..() - features["body_markings"] = pick(GLOB.body_markings_list) + features["body_markings"] = pick(SSaccessories.body_markings_list) return features */ //SKYRAT EDIT REMOVAL END diff --git a/code/modules/mob/living/carbon/human/species_types/mothmen.dm b/code/modules/mob/living/carbon/human/species_types/mothmen.dm index 4c0430352a8..c560ebda782 100644 --- a/code/modules/mob/living/carbon/human/species_types/mothmen.dm +++ b/code/modules/mob/living/carbon/human/species_types/mothmen.dm @@ -61,7 +61,7 @@ /datum/species/moth/randomize_features() var/list/features = ..() - features["moth_markings"] = pick(GLOB.moth_wings_list) // SKYRAT EDIT CHANGE - ORIGINAL: features["moth_markings"] = pick(GLOB.moth_markings_list) + features["moth_markings"] = pick(SSaccessories.moth_wings_list) // SKYRAT EDIT CHANGE - ORIGINAL: features["moth_markings"] = pick(SSaccessories.moth_markings_list) return features /datum/species/moth/get_scream_sound(mob/living/carbon/human) diff --git a/code/modules/mob/living/carbon/human/species_types/mushpeople.dm b/code/modules/mob/living/carbon/human/species_types/mushpeople.dm index 61383bc55c1..9c1649d0edd 100644 --- a/code/modules/mob/living/carbon/human/species_types/mushpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/mushpeople.dm @@ -81,7 +81,7 @@ feature_key = "caps" /datum/bodypart_overlay/mutant/mushroom_cap/get_global_feature_list() - return GLOB.caps_list + return SSaccessories.caps_list /datum/bodypart_overlay/mutant/mushroom_cap/can_draw_on_bodypart(mob/living/carbon/human/human) if((human.head?.flags_inv & HIDEHAIR) || (human.wear_mask?.flags_inv & HIDEHAIR)) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index c45a9ae8c8b..be14771d6e0 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -2222,10 +2222,10 @@ var/mob/living/carbon/human/exposed_human = exposed_mob if(!HAS_TRAIT(exposed_human, TRAIT_SHAVED)) - var/datum/sprite_accessory/facial_hair/picked_beard = pick(GLOB.facial_hairstyles_list) + var/datum/sprite_accessory/facial_hair/picked_beard = pick(SSaccessories.facial_hairstyles_list) exposed_human.set_facial_hairstyle(picked_beard, update = FALSE) if(!HAS_TRAIT(exposed_human, TRAIT_BALD)) - var/datum/sprite_accessory/hair/picked_hair = pick(GLOB.hairstyles_list) + var/datum/sprite_accessory/hair/picked_hair = pick(SSaccessories.hairstyles_list) exposed_human.set_hairstyle(picked_hair, update = TRUE) to_chat(exposed_human, span_notice("Hair starts sprouting from your [HAS_TRAIT(exposed_human, TRAIT_BALD) ? "face" : "scalp"].")) diff --git a/code/modules/surgery/bodyparts/head_hair_and_lips.dm b/code/modules/surgery/bodyparts/head_hair_and_lips.dm index b5db462294f..a386554b597 100644 --- a/code/modules/surgery/bodyparts/head_hair_and_lips.dm +++ b/code/modules/surgery/bodyparts/head_hair_and_lips.dm @@ -84,7 +84,7 @@ var/image/facial_hair_overlay if(!facial_hair_hidden && facial_hairstyle && (head_flags & HEAD_FACIAL_HAIR)) - sprite_accessory = GLOB.facial_hairstyles_list[facial_hairstyle] + sprite_accessory = SSaccessories.facial_hairstyles_list[facial_hairstyle] if(sprite_accessory) //Overlay facial_hair_overlay = image(sprite_accessory.icon, sprite_accessory.icon_state, -HAIR_LAYER, image_dir) @@ -99,12 +99,12 @@ var/facial_hair_gradient_style = LAZYACCESS(gradient_styles, GRADIENT_FACIAL_HAIR_KEY) if(facial_hair_gradient_style) var/facial_hair_gradient_color = LAZYACCESS(gradient_colors, GRADIENT_FACIAL_HAIR_KEY) - var/image/facial_hair_gradient_overlay = get_gradient_overlay(sprite_accessory.icon, sprite_accessory.icon_state, -HAIR_LAYER, GLOB.facial_hair_gradients_list[facial_hair_gradient_style], facial_hair_gradient_color, image_dir) + var/image/facial_hair_gradient_overlay = get_gradient_overlay(sprite_accessory.icon, sprite_accessory.icon_state, -HAIR_LAYER, SSaccessories.facial_hair_gradients_list[facial_hair_gradient_style], facial_hair_gradient_color, image_dir) . += facial_hair_gradient_overlay var/image/hair_overlay if(!(show_debrained && (head_flags & HEAD_DEBRAIN)) && !hair_hidden && hairstyle && (head_flags & HEAD_HAIR)) - var/datum/sprite_accessory/hair/hair_sprite_accessory = GLOB.hairstyles_list[hairstyle] + var/datum/sprite_accessory/hair/hair_sprite_accessory = SSaccessories.hairstyles_list[hairstyle] if(hair_sprite_accessory) //Overlay hair_overlay = image(hair_sprite_accessory.icon, hair_sprite_accessory.icon_state, -HAIR_LAYER, image_dir) @@ -125,7 +125,7 @@ var/hair_gradient_style = LAZYACCESS(gradient_styles, GRADIENT_HAIR_KEY) if(hair_gradient_style) var/hair_gradient_color = LAZYACCESS(gradient_colors, GRADIENT_HAIR_KEY) - var/image/hair_gradient_overlay = get_gradient_overlay(hair_sprite_accessory.icon, hair_sprite_accessory.icon_state, -HAIR_LAYER, GLOB.hair_gradients_list[hair_gradient_style], hair_gradient_color, image_dir) + var/image/hair_gradient_overlay = get_gradient_overlay(hair_sprite_accessory.icon, hair_sprite_accessory.icon_state, -HAIR_LAYER, SSaccessories.hair_gradients_list[hair_gradient_style], hair_gradient_color, image_dir) hair_gradient_overlay.pixel_y = hair_sprite_accessory.y_offset // SKYRAT EDIT ADDITION - Species hair offset if(LAZYFIND(owner?.dna?.species?.offset_features, OFFSET_HAIR)) diff --git a/code/modules/surgery/organs/external/_external_organ.dm b/code/modules/surgery/organs/external/_external_organ.dm index a29d69af19e..b81942a380c 100644 --- a/code/modules/surgery/organs/external/_external_organ.dm +++ b/code/modules/surgery/organs/external/_external_organ.dm @@ -198,7 +198,7 @@ return TRUE /datum/bodypart_overlay/mutant/horns/get_global_feature_list() - return GLOB.sprite_accessories["horns"] // SKYRAT EDIT - Customization - ORIGINAL: return GLOB.horns_list + return SSaccessories.sprite_accessories["horns"] // SKYRAT EDIT - Customization - ORIGINAL: return SSaccessories.horns_list ///The frills of a lizard (like weird fin ears) /obj/item/organ/external/frills @@ -225,7 +225,7 @@ return FALSE /datum/bodypart_overlay/mutant/frills/get_global_feature_list() - return GLOB.sprite_accessories["frills"] // SKYRAT EDIT - Customization - ORIGINAL: return GLOB.frills_list + return SSaccessories.sprite_accessories["frills"] // SKYRAT EDIT - Customization - ORIGINAL: return SSaccessories.frills_list ///Guess what part of the lizard this is? /obj/item/organ/external/snout @@ -254,7 +254,7 @@ return FALSE /datum/bodypart_overlay/mutant/snout/get_global_feature_list() - return GLOB.sprite_accessories["snout"] // SKYRAT EDIT - Customization - ORIGINAL : return GLOB.snouts_list + return SSaccessories.sprite_accessories["snout"] // SKYRAT EDIT - Customization - ORIGINAL : return SSaccessories.snouts_list ///A moth's antennae /obj/item/organ/external/antennae @@ -331,7 +331,7 @@ burn_datum = fetch_sprite_datum(burn_datum) //turn the path into the singleton instance /datum/bodypart_overlay/mutant/antennae/get_global_feature_list() - return GLOB.sprite_accessories["moth_antennae"] // SKYRAT EDIT - Customization - ORIGINAL: return GLOB.moth_antennae_list + return SSaccessories.sprite_accessories["moth_antennae"] // SKYRAT EDIT - Customization - ORIGINAL: return SSaccessories.moth_antennae_list /datum/bodypart_overlay/mutant/antennae/get_base_icon_state() return burnt ? burn_datum.icon_state : sprite_datum.icon_state @@ -363,7 +363,7 @@ var/color_inverse_base = 255 /datum/bodypart_overlay/mutant/pod_hair/get_global_feature_list() - return GLOB.pod_hair_list + return SSaccessories.pod_hair_list /datum/bodypart_overlay/mutant/pod_hair/color_image(image/overlay, draw_layer, obj/item/bodypart/limb) if(draw_layer != bitflag_to_layer(color_swapped_layer)) diff --git a/code/modules/surgery/organs/external/spines.dm b/code/modules/surgery/organs/external/spines.dm index 099bc291283..ade081030d0 100644 --- a/code/modules/surgery/organs/external/spines.dm +++ b/code/modules/surgery/organs/external/spines.dm @@ -32,7 +32,7 @@ feature_key = "spines" /datum/bodypart_overlay/mutant/spines/get_global_feature_list() - return GLOB.sprite_accessories["spines"] // SKYRAT EDIT - Customization - ORIGINAL: return GLOB.spines_list + return SSaccessories.sprite_accessories["spines"] // SKYRAT EDIT - Customization - ORIGINAL: return SSaccessories.spines_list /datum/bodypart_overlay/mutant/spines/can_draw_on_bodypart(mob/living/carbon/human/human) . = ..() diff --git a/code/modules/surgery/organs/external/tails.dm b/code/modules/surgery/organs/external/tails.dm index d9dfbf7b9dd..a70db9c950f 100644 --- a/code/modules/surgery/organs/external/tails.dm +++ b/code/modules/surgery/organs/external/tails.dm @@ -144,7 +144,7 @@ // SKYRAT EDIT ADDITION - CUSTOMIZATION /datum/bodypart_overlay/mutant/tail/get_global_feature_list() - return GLOB.sprite_accessories["tail"] + return SSaccessories.sprite_accessories["tail"] // SKYRAT EDIT ADDITION END /datum/bodypart_overlay/mutant/tail/can_draw_on_bodypart(mob/living/carbon/human/human) @@ -160,6 +160,9 @@ wag_flags = WAG_ABLE +/datum/bodypart_overlay/mutant/tail/get_global_feature_list() + return SSaccessories.sprite_accessories["tail"] // SKYRAT EDIT - Customization - ORIGINAL: return SSaccessories.tails_list_human + /obj/item/organ/external/tail/cat/get_butt_sprite() return BUTT_SPRITE_CAT @@ -177,7 +180,7 @@ feature_key = "tail" // SKYRAT EDIT - Customization - ORIGINAL: feature_key = "tail_monkey" /datum/bodypart_overlay/mutant/tail/monkey/get_global_feature_list() - return GLOB.tails_list_monkey + return SSaccessories.tails_list_monkey /obj/item/organ/external/tail/lizard name = "lizard tail" @@ -194,7 +197,7 @@ feature_key = "tail" // SKYRAT EDIT - Customization - ORIGINAL: feature_key = "tail_lizard" /datum/bodypart_overlay/mutant/tail/lizard/get_global_feature_list() - return GLOB.sprite_accessories["tail"] // SKYRAT EDIT - Customization - ORIGINAL: return GLOB.tails_list_lizard + return SSaccessories.sprite_accessories["tail"] // SKYRAT EDIT - Customization - ORIGINAL: return SSaccessories.tails_list_lizard /obj/item/organ/external/tail/lizard/fake name = "fabricated lizard tail" @@ -210,7 +213,7 @@ var/tail_spine_key = NONE /datum/bodypart_overlay/mutant/tail_spines/get_global_feature_list() - return GLOB.sprite_accessories["tailspines"] // SKYRAT EDIT CHANGE - ORIGINAL: return GLOB.tail_spines_list + return SSaccessories.sprite_accessories["tailspines"] // SKYRAT EDIT CHANGE - ORIGINAL: return SSaccessories.tail_spines_list /datum/bodypart_overlay/mutant/tail_spines/get_base_icon_state() return (!isnull(tail_spine_key) ? "[tail_spine_key]_" : "") + (wagging ? "wagging_" : "") + sprite_datum.icon_state // Select the wagging state if appropriate diff --git a/code/modules/surgery/organs/external/wings/functional_wings.dm b/code/modules/surgery/organs/external/wings/functional_wings.dm index 6f527bc4c6a..c2310ba8e5a 100644 --- a/code/modules/surgery/organs/external/wings/functional_wings.dm +++ b/code/modules/surgery/organs/external/wings/functional_wings.dm @@ -146,14 +146,14 @@ /datum/bodypart_overlay/mutant/wings/functional/get_global_feature_list() /* SKYRAT EDIT - CUSTOMIZATION - ORIGINAL: if(wings_open) - return GLOB.wings_open_list + return SSaccessories.wings_open_list else - return GLOB.wings_list + return SSaccessories.wings_list */ // ORIGINAL END - SKYRAT EDIT START - CUSTOMIZATION - TODO: Add support for wings_open if(wings_open) - return GLOB.sprite_accessories["wings_open"] + return SSaccessories.sprite_accessories["wings_open"] - return GLOB.sprite_accessories["wings"] + return SSaccessories.sprite_accessories["wings"] // SKYRAT EDIT END ///Update our wingsprite to the open wings variant diff --git a/code/modules/surgery/organs/external/wings/moth_wings.dm b/code/modules/surgery/organs/external/wings/moth_wings.dm index a8365a30fae..3ddf98ee17b 100644 --- a/code/modules/surgery/organs/external/wings/moth_wings.dm +++ b/code/modules/surgery/organs/external/wings/moth_wings.dm @@ -87,7 +87,7 @@ burn_datum = fetch_sprite_datum(burn_datum) /datum/bodypart_overlay/mutant/wings/moth/get_global_feature_list() - return GLOB.sprite_accessories["wings"] // SKYRAT EDIT - Customization - ORIGINAL: return GLOB.moth_wings_list + return SSaccessories.sprite_accessories["wings"] // SKYRAT EDIT - Customization - ORIGINAL: return SSaccessories.moth_wings_list /datum/bodypart_overlay/mutant/wings/moth/can_draw_on_bodypart(mob/living/carbon/human/human) if(!(human.wear_suit?.flags_inv & HIDEMUTWINGS)) diff --git a/modular_skyrat/master_files/code/game/objects/items/dyekit.dm b/modular_skyrat/master_files/code/game/objects/items/dyekit.dm index b324b8286fe..37645e35828 100644 --- a/modular_skyrat/master_files/code/game/objects/items/dyekit.dm +++ b/modular_skyrat/master_files/code/game/objects/items/dyekit.dm @@ -43,7 +43,7 @@ if(!beard_or_hair || !user.can_perform_action(src, NEED_DEXTERITY)) return - var/list/choices = beard_or_hair == "Hair" ? GLOB.hair_gradients_list : GLOB.facial_hair_gradients_list + var/list/choices = beard_or_hair == "Hair" ? SSaccessories.hair_gradients_list : SSaccessories.facial_hair_gradients_list var/new_grad_style = tgui_input_list(usr, "Choose a color pattern:", "Dye Spray", choices) if(!new_grad_style || !user.can_perform_action(src, NEED_DEXTERITY)) return diff --git a/modular_skyrat/master_files/code/modules/client/preferences.dm b/modular_skyrat/master_files/code/modules/client/preferences.dm index 52a22840192..da1f0e282de 100644 --- a/modular_skyrat/master_files/code/modules/client/preferences.dm +++ b/modular_skyrat/master_files/code/modules/client/preferences.dm @@ -66,7 +66,7 @@ /datum/preferences/proc/print_bodypart_change_line(key) var/acc_name = mutant_bodyparts[key][MUTANT_INDEX_NAME] var/shown_colors = 0 - var/datum/sprite_accessory/SA = GLOB.sprite_accessories[key][acc_name] + var/datum/sprite_accessory/SA = SSaccessories.sprite_accessories[key][acc_name] var/dat = "" if(SA.color_src == USE_MATRIXED_COLORS) shown_colors = 3 @@ -85,7 +85,7 @@ /datum/preferences/proc/reset_colors() for(var/key in mutant_bodyparts) - var/datum/sprite_accessory/SA = GLOB.sprite_accessories[key][mutant_bodyparts[key][MUTANT_INDEX_NAME]] + var/datum/sprite_accessory/SA = SSaccessories.sprite_accessories[key][mutant_bodyparts[key][MUTANT_INDEX_NAME]] if(SA.always_color_customizable) continue mutant_bodyparts[key][MUTANT_INDEX_COLOR_LIST] = SA.get_default_color(features, pref_species) @@ -120,13 +120,13 @@ // Remove all "extra" accessories for(var/key in mutant_bodyparts) - if(!GLOB.sprite_accessories[key]) // That accessory no longer exists, remove it + if(!SSaccessories.sprite_accessories[key]) // That accessory no longer exists, remove it mutant_bodyparts -= key continue if(!GLOB.default_mutant_bodyparts[pref_species.name][key]) mutant_bodyparts -= key continue - if(!GLOB.sprite_accessories[key][mutant_bodyparts[key][MUTANT_INDEX_NAME]]) // The individual accessory no longer exists + if(!SSaccessories.sprite_accessories[key][mutant_bodyparts[key][MUTANT_INDEX_NAME]]) // The individual accessory no longer exists mutant_bodyparts[key][MUTANT_INDEX_NAME] = GLOB.default_mutant_bodyparts[pref_species.name[key][MUTANTPART_NAME]] validate_color_keys_for_part(key) // Validate the color count of each accessory that wasnt removed @@ -137,7 +137,7 @@ if(target_bodyparts[key][MUTANTPART_CAN_RANDOMIZE]) SA = random_accessory_of_key_for_species(key, pref_species) else - SA = GLOB.sprite_accessories[key][target_bodyparts[key][MUTANTPART_NAME]] + SA = SSaccessories.sprite_accessories[key][target_bodyparts[key][MUTANTPART_NAME]] var/final_list = list() final_list[MUTANT_INDEX_NAME] = SA.name final_list[MUTANT_INDEX_COLOR_LIST] = SA.get_default_color(features, pref_species) @@ -147,7 +147,7 @@ reset_colors() /datum/preferences/proc/validate_color_keys_for_part(key) - var/datum/sprite_accessory/SA = GLOB.sprite_accessories[key][mutant_bodyparts[key][MUTANT_INDEX_NAME]] + var/datum/sprite_accessory/SA = SSaccessories.sprite_accessories[key][mutant_bodyparts[key][MUTANT_INDEX_NAME]] var/list/colorlist = mutant_bodyparts[key][MUTANT_INDEX_COLOR_LIST] if(SA.color_src == USE_MATRIXED_COLORS && colorlist.len != 3) mutant_bodyparts[key][MUTANT_INDEX_COLOR_LIST] = SA.get_default_color(features, pref_species) diff --git a/modular_skyrat/master_files/code/modules/client/preferences/_preference.dm b/modular_skyrat/master_files/code/modules/client/preferences/_preference.dm index 19cec000446..83872abb64f 100644 --- a/modular_skyrat/master_files/code/modules/client/preferences/_preference.dm +++ b/modular_skyrat/master_files/code/modules/client/preferences/_preference.dm @@ -159,11 +159,11 @@ /datum/preference/choiced/mutant_choice/init_possible_values() if(!initial(generate_icons)) - return assoc_to_keys_features(GLOB.sprite_accessories[relevant_mutant_bodypart]) + return assoc_to_keys_features(SSaccessories.sprite_accessories[relevant_mutant_bodypart]) var/list/list_of_accessories = list() - for(var/sprite_accessory_name as anything in GLOB.sprite_accessories[relevant_mutant_bodypart]) - var/datum/sprite_accessory/sprite_accessory = GLOB.sprite_accessories[relevant_mutant_bodypart][sprite_accessory_name] + for(var/sprite_accessory_name as anything in SSaccessories.sprite_accessories[relevant_mutant_bodypart]) + var/datum/sprite_accessory/sprite_accessory = SSaccessories.sprite_accessories[relevant_mutant_bodypart][sprite_accessory_name] list_of_accessories += list("[sprite_accessory.name]" = generate_icon(sprite_accessory)) return list_of_accessories diff --git a/modular_skyrat/master_files/code/modules/client/preferences/clothing.dm b/modular_skyrat/master_files/code/modules/client/preferences/clothing.dm index f542e867fc6..827ec90b6ac 100644 --- a/modular_skyrat/master_files/code/modules/client/preferences/clothing.dm +++ b/modular_skyrat/master_files/code/modules/client/preferences/clothing.dm @@ -44,7 +44,7 @@ should_generate_icons = TRUE /datum/preference/choiced/bra/init_possible_values() - return assoc_to_keys_features(GLOB.bra_list) + return assoc_to_keys_features(SSaccessories.bra_list) /datum/preference/choiced/bra/icon_for(value) var/static/icon/body @@ -58,7 +58,7 @@ var/icon/icon_with_bra = icon(body) if (value != "Nude") - var/datum/sprite_accessory/accessory = GLOB.bra_list[value] + var/datum/sprite_accessory/accessory = SSaccessories.bra_list[value] icon_with_bra.Blend(icon(accessory.icon, accessory.icon_state), ICON_OVERLAY) icon_with_bra.Crop(10, 11, 22, 23) // SKYRAT EDIT CHANGE : ORIGINAL - icon_with_undershirt.Crop(9, 9, 23, 23) diff --git a/modular_skyrat/master_files/code/modules/client/preferences/genitals.dm b/modular_skyrat/master_files/code/modules/client/preferences/genitals.dm index 3612f27243c..9f7926b9795 100644 --- a/modular_skyrat/master_files/code/modules/client/preferences/genitals.dm +++ b/modular_skyrat/master_files/code/modules/client/preferences/genitals.dm @@ -71,7 +71,7 @@ return initial(default_accessory_type.name) /datum/preference/choiced/genital/init_possible_values() - return assoc_to_keys_features(GLOB.sprite_accessories[relevant_mutant_bodypart]) + return assoc_to_keys_features(SSaccessories.sprite_accessories[relevant_mutant_bodypart]) /datum/preference/toggle/genital_skin_tone category = PREFERENCE_CATEGORY_SECONDARY_FEATURES @@ -83,7 +83,7 @@ /datum/preference/toggle/genital_skin_tone/is_accessible(datum/preferences/preferences) var/passed_initial_check = ..(preferences) var/part_name = preferences.read_preference(genital_pref_type) - var/datum/sprite_accessory/genital/accessory = GLOB.sprite_accessories[relevant_mutant_bodypart]?[part_name] + var/datum/sprite_accessory/genital/accessory = SSaccessories.sprite_accessories[relevant_mutant_bodypart]?[part_name] if(!accessory?.factual || !accessory.has_skintone_shading) return FALSE var/allowed = preferences.read_preference(/datum/preference/toggle/allow_mismatched_parts) diff --git a/modular_skyrat/master_files/code/modules/client/preferences/mutant_parts.dm b/modular_skyrat/master_files/code/modules/client/preferences/mutant_parts.dm index 36ebdea6486..906a27fe61a 100644 --- a/modular_skyrat/master_files/code/modules/client/preferences/mutant_parts.dm +++ b/modular_skyrat/master_files/code/modules/client/preferences/mutant_parts.dm @@ -834,8 +834,8 @@ var/icon/pod_head = icon('icons/mob/human/bodyparts_greyscale.dmi', "pod_head_m") pod_head.Blend(COLOR_GREEN, ICON_MULTIPLY) - for (var/pod_name in GLOB.pod_hair_list) - var/datum/sprite_accessory/pod_hair/pod_hair = GLOB.pod_hair_list[pod_name] + for (var/pod_name in SSaccessories.pod_hair_list) + var/datum/sprite_accessory/pod_hair/pod_hair = SSaccessories.pod_hair_list[pod_name] if(pod_hair.locked) continue diff --git a/modular_skyrat/master_files/code/modules/client/preferences/scream.dm b/modular_skyrat/master_files/code/modules/client/preferences/scream.dm index 1c1413318aa..93d7361a168 100644 --- a/modular_skyrat/master_files/code/modules/client/preferences/scream.dm +++ b/modular_skyrat/master_files/code/modules/client/preferences/scream.dm @@ -4,10 +4,10 @@ savefile_key = "character_scream" /datum/preference/choiced/scream/init_possible_values() - return assoc_to_keys(GLOB.scream_types) + return assoc_to_keys(SSaccessories.scream_types) /datum/preference/choiced/scream/apply_to_human(mob/living/carbon/human/target, value) - var/scream_id = GLOB.scream_types[value] + var/scream_id = SSaccessories.scream_types[value] if(scream_id) var/datum/scream_type/scream_type = new scream_id target.selected_scream = scream_type diff --git a/modular_skyrat/master_files/code/modules/client/preferences/species_features/digitigrade_legs.dm b/modular_skyrat/master_files/code/modules/client/preferences/species_features/digitigrade_legs.dm index cc88bc9fe56..0dd2daddc10 100644 --- a/modular_skyrat/master_files/code/modules/client/preferences/species_features/digitigrade_legs.dm +++ b/modular_skyrat/master_files/code/modules/client/preferences/species_features/digitigrade_legs.dm @@ -11,7 +11,7 @@ /datum/preference/choiced/digitigrade_legs/init_possible_values() - return assoc_to_keys_features(GLOB.sprite_accessories["legs"]) + return assoc_to_keys_features(SSaccessories.sprite_accessories["legs"]) /datum/preference/choiced/digitigrade_legs/is_accessible(datum/preferences/preferences) return ..() && is_usable(preferences) diff --git a/modular_skyrat/modules/customization/__DEFINES/lists.dm b/modular_skyrat/modules/customization/__DEFINES/lists.dm index 6c5d6bf496b..7f101acb08a 100644 --- a/modular_skyrat/modules/customization/__DEFINES/lists.dm +++ b/modular_skyrat/modules/customization/__DEFINES/lists.dm @@ -1,4 +1,3 @@ -GLOBAL_LIST_EMPTY(sprite_accessories) GLOBAL_LIST_EMPTY(generic_accessories) GLOBAL_LIST_EMPTY(genetic_accessories) diff --git a/modular_skyrat/modules/customization/__HELPERS/global_lists.dm b/modular_skyrat/modules/customization/__HELPERS/global_lists.dm index d203c1ea805..d913736249a 100644 --- a/modular_skyrat/modules/customization/__HELPERS/global_lists.dm +++ b/modular_skyrat/modules/customization/__HELPERS/global_lists.dm @@ -1,5 +1,6 @@ /proc/make_skyrat_datum_references() make_sprite_accessory_references() + make_laugh_datum_references() make_default_mutant_bodypart_references() make_body_marking_references() make_body_marking_set_references() @@ -9,14 +10,16 @@ make_augment_references() /proc/make_sprite_accessory_references() + if(isnull(SSaccessories.sprite_accessories)) + SSaccessories.sprite_accessories = list() // Here we build the global list for all accessories for(var/path in subtypesof(/datum/sprite_accessory)) var/datum/sprite_accessory/P = path if(initial(P.key) && initial(P.name)) P = new path() - if(!GLOB.sprite_accessories[P.key]) - GLOB.sprite_accessories[P.key] = list() - GLOB.sprite_accessories[P.key][P.name] = P + if(isnull(SSaccessories.sprite_accessories[P.key])) + SSaccessories.sprite_accessories[P.key] = list() + SSaccessories.sprite_accessories[P.key][P.name] = P if(P.genetic) if(!GLOB.dna_mutant_bodypart_blocks[P.key]) GLOB.dna_mutant_bodypart_blocks[P.key] = GLOB.dna_total_feature_blocks+1 @@ -31,6 +34,15 @@ if(P.generic && !GLOB.generic_accessories[P.key]) GLOB.generic_accessories[P.key] = P.generic +/proc/make_laugh_datum_references() + //Laugh types + GLOB.laugh_types = list() + for(var/spath in subtypesof(/datum/laugh_type)) + var/datum/laugh_type/L = new spath() + GLOB.laugh_types[L.name] = spath + sort_list(GLOB.laugh_types, GLOBAL_PROC_REF(cmp_typepaths_asc)) + + /proc/make_default_mutant_bodypart_references() // Build the global list for default species' mutant_bodyparts for(var/path in subtypesof(/datum/species)) @@ -129,62 +141,62 @@ loadout_list -= loadout_typepath // Underwear - for(var/sprite_name in GLOB.underwear_list) - var/datum/sprite_accessory/sprite_datum = GLOB.underwear_list[sprite_name] + for(var/sprite_name in SSaccessories.underwear_list) + var/datum/sprite_accessory/sprite_datum = SSaccessories.underwear_list[sprite_name] if(!sprite_datum?.erp_accessory) continue - GLOB.underwear_list -= sprite_name + SSaccessories.underwear_list -= sprite_name - for(var/sprite_name in GLOB.underwear_f) - var/datum/sprite_accessory/sprite_datum = GLOB.underwear_f[sprite_name] + for(var/sprite_name in SSaccessories.underwear_f) + var/datum/sprite_accessory/sprite_datum = SSaccessories.underwear_f[sprite_name] if(!sprite_datum?.erp_accessory) continue - GLOB.underwear_f -= sprite_name + SSaccessories.underwear_f -= sprite_name - for(var/sprite_name in GLOB.underwear_m) - var/datum/sprite_accessory/sprite_datum = GLOB.underwear_m[sprite_name] + for(var/sprite_name in SSaccessories.underwear_m) + var/datum/sprite_accessory/sprite_datum = SSaccessories.underwear_m[sprite_name] if(!sprite_datum?.erp_accessory) continue - GLOB.underwear_m -= sprite_name + SSaccessories.underwear_m -= sprite_name // Undershirts - for(var/sprite_name in GLOB.undershirt_list) - var/datum/sprite_accessory/sprite_datum = GLOB.undershirt_list[sprite_name] + for(var/sprite_name in SSaccessories.undershirt_list) + var/datum/sprite_accessory/sprite_datum = SSaccessories.undershirt_list[sprite_name] if(!sprite_datum?.erp_accessory) continue - GLOB.undershirt_list -= sprite_name + SSaccessories.undershirt_list -= sprite_name - for(var/sprite_name in GLOB.undershirt_f) - var/datum/sprite_accessory/sprite_datum = GLOB.undershirt_f[sprite_name] + for(var/sprite_name in SSaccessories.undershirt_f) + var/datum/sprite_accessory/sprite_datum = SSaccessories.undershirt_f[sprite_name] if(!sprite_datum?.erp_accessory) continue - GLOB.undershirt_f -= sprite_name + SSaccessories.undershirt_f -= sprite_name - for(var/sprite_name in GLOB.undershirt_m) - var/datum/sprite_accessory/sprite_datum = GLOB.undershirt_m[sprite_name] + for(var/sprite_name in SSaccessories.undershirt_m) + var/datum/sprite_accessory/sprite_datum = SSaccessories.undershirt_m[sprite_name] if(!sprite_datum?.erp_accessory) continue - GLOB.undershirt_m -= sprite_name + SSaccessories.undershirt_m -= sprite_name // Bras - for(var/sprite_name in GLOB.bra_list) - var/datum/sprite_accessory/sprite_datum = GLOB.bra_list[sprite_name] + for(var/sprite_name in SSaccessories.bra_list) + var/datum/sprite_accessory/sprite_datum = SSaccessories.bra_list[sprite_name] if(!sprite_datum?.erp_accessory) continue - GLOB.bra_list -= sprite_name + SSaccessories.bra_list -= sprite_name - for(var/sprite_name in GLOB.bra_f) - var/datum/sprite_accessory/sprite_datum = GLOB.bra_f[sprite_name] + for(var/sprite_name in SSaccessories.bra_f) + var/datum/sprite_accessory/sprite_datum = SSaccessories.bra_f[sprite_name] if(!sprite_datum?.erp_accessory) continue - GLOB.bra_f -= sprite_name + SSaccessories.bra_f -= sprite_name - for(var/sprite_name in GLOB.bra_m) - var/datum/sprite_accessory/sprite_datum = GLOB.bra_m[sprite_name] + for(var/sprite_name in SSaccessories.bra_m) + var/datum/sprite_accessory/sprite_datum = SSaccessories.bra_m[sprite_name] if(!sprite_datum?.erp_accessory) continue - GLOB.bra_m -= sprite_name + SSaccessories.bra_m -= sprite_name diff --git a/modular_skyrat/modules/customization/__HELPERS/mobs.dm b/modular_skyrat/modules/customization/__HELPERS/mobs.dm index 2707a172fe4..e280ce44ae9 100644 --- a/modular_skyrat/modules/customization/__HELPERS/mobs.dm +++ b/modular_skyrat/modules/customization/__HELPERS/mobs.dm @@ -1,7 +1,7 @@ /proc/accessory_list_of_key_for_species(key, datum/species/S, mismatched, ckey) var/list/accessory_list = list() - for(var/name in GLOB.sprite_accessories[key]) - var/datum/sprite_accessory/SP = GLOB.sprite_accessories[key][name] + for(var/name in SSaccessories.sprite_accessories[key]) + var/datum/sprite_accessory/SP = SSaccessories.sprite_accessories[key][name] if(!mismatched && SP.recommended_species && !(S.id in SP.recommended_species)) continue if(SP.ckey_whitelist && !SP.ckey_whitelist[ckey]) @@ -12,7 +12,7 @@ /proc/random_accessory_of_key_for_species(key, datum/species/S, mismatched=FALSE, ckey) var/list/accessory_list = accessory_list_of_key_for_species(key, S, mismatched, ckey) - var/datum/sprite_accessory/SP = GLOB.sprite_accessories[key][pick(accessory_list)] + var/datum/sprite_accessory/SP = SSaccessories.sprite_accessories[key][pick(accessory_list)] if(!SP) CRASH("Cant find random accessory of [key] key, for species [S.id]") return SP @@ -44,13 +44,13 @@ return body_markings /proc/random_bra(gender) - if(!length(GLOB.bra_list)) - init_sprite_accessory_subtypes(/datum/sprite_accessory/bra, GLOB.bra_list, GLOB.bra_m, GLOB.bra_f) + if(!length(SSaccessories.bra_list)) + SSaccessories.init_sprite_accessory_subtypes(/datum/sprite_accessory/bra, SSaccessories.bra_list, SSaccessories.bra_m, SSaccessories.bra_f) switch(gender) if(MALE) - return pick(GLOB.bra_m) + return pick(SSaccessories.bra_m) if(FEMALE) - return pick(GLOB.bra_f) + return pick(SSaccessories.bra_f) else - return pick(GLOB.bra_list) + return pick(SSaccessories.bra_list) diff --git a/modular_skyrat/modules/customization/_globalvars/lists.dm b/modular_skyrat/modules/customization/_globalvars/lists.dm index 86586e3f4d7..2eb4e0e6bda 100644 --- a/modular_skyrat/modules/customization/_globalvars/lists.dm +++ b/modular_skyrat/modules/customization/_globalvars/lists.dm @@ -105,9 +105,3 @@ GLOBAL_LIST_INIT(color_list_ghoul, list( \ )) //Bras -/// Stores all /datum/sprite_accessory/bra indexed by name. -GLOBAL_LIST_EMPTY(bra_list) -/// Stores only the bra names for male-compatible bras. -GLOBAL_LIST_EMPTY(bra_m) -/// Stores only the bra names for female-compatible bras. -GLOBAL_LIST_EMPTY(bra_f) diff --git a/modular_skyrat/modules/customization/datums/dna.dm b/modular_skyrat/modules/customization/datums/dna.dm index e29e403e97b..c10b8abf27d 100644 --- a/modular_skyrat/modules/customization/datums/dna.dm +++ b/modular_skyrat/modules/customization/datums/dna.dm @@ -182,8 +182,8 @@ GLOBAL_LIST_EMPTY(total_uf_len_by_block) dna.species.body_markings = dna.body_markings.Copy() var/list/bodyparts_to_add = dna.mutant_bodyparts.Copy() for(var/key in bodyparts_to_add) - if(GLOB.sprite_accessories[key] && bodyparts_to_add[key] && bodyparts_to_add[key][MUTANT_INDEX_NAME]) - var/datum/sprite_accessory/SP = GLOB.sprite_accessories[key][bodyparts_to_add[key][MUTANT_INDEX_NAME]] + if(SSaccessories.sprite_accessories[key] && bodyparts_to_add[key] && bodyparts_to_add[key][MUTANT_INDEX_NAME]) + var/datum/sprite_accessory/SP = SSaccessories.sprite_accessories[key][bodyparts_to_add[key][MUTANT_INDEX_NAME]] if(!SP?.factual) bodyparts_to_add -= key continue @@ -210,13 +210,13 @@ GLOBAL_LIST_EMPTY(total_uf_len_by_block) if(HAS_TRAIT(src, TRAIT_SHAVED)) set_facial_hairstyle("Shaved", update = FALSE) else - var/style = GLOB.facial_hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_FACIAL_HAIRSTYLE_BLOCK), GLOB.facial_hairstyles_list.len)] + var/style = SSaccessories.facial_hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_FACIAL_HAIRSTYLE_BLOCK), SSaccessories.facial_hairstyles_list.len)] set_facial_hairstyle(style, update = FALSE) if(HAS_TRAIT(src, TRAIT_BALD)) set_hairstyle("Bald", update = FALSE) else - var/style = GLOB.hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_HAIRSTYLE_BLOCK), GLOB.hairstyles_list.len)] + var/style = SSaccessories.hairstyles_list[deconstruct_block(get_uni_identity_block(structure, DNA_HAIRSTYLE_BLOCK), SSaccessories.hairstyles_list.len)] set_hairstyle(style, update = FALSE) var/features = dna.unique_features diff --git a/modular_skyrat/modules/customization/modules/mob/dead/new_player/preferences_setup.dm b/modular_skyrat/modules/customization/modules/mob/dead/new_player/preferences_setup.dm index 7246999236c..2bbb5c2c3db 100644 --- a/modular_skyrat/modules/customization/modules/mob/dead/new_player/preferences_setup.dm +++ b/modular_skyrat/modules/customization/modules/mob/dead/new_player/preferences_setup.dm @@ -123,13 +123,13 @@ //Remove all "extra" accessories for(var/key in mutant_bodyparts) - if(!GLOB.sprite_accessories[key]) //That accessory no longer exists, remove it + if(!SSaccessories.sprite_accessories[key]) //That accessory no longer exists, remove it mutant_bodyparts -= key continue if(!pref_species.default_mutant_bodyparts[key]) mutant_bodyparts -= key continue - if(!GLOB.sprite_accessories[key][mutant_bodyparts[key][MUTANT_INDEX_NAME]]) //The individual accessory no longer exists + if(!SSaccessories.sprite_accessories[key][mutant_bodyparts[key][MUTANT_INDEX_NAME]]) //The individual accessory no longer exists mutant_bodyparts[key][MUTANT_INDEX_NAME] = pref_species.default_mutant_bodyparts[key] validate_color_keys_for_part(key) //Validate the color count of each accessory that wasnt removed @@ -140,7 +140,7 @@ if(target_bodyparts[key] == ACC_RANDOM) SA = random_accessory_of_key_for_species(key, pref_species) else - SA = GLOB.sprite_accessories[key][target_bodyparts[key]] + SA = SSaccessories.sprite_accessories[key][target_bodyparts[key]] var/final_list = list() final_list[MUTANT_INDEX_NAME] = SA.name final_list[MUTANT_INDEX_COLOR_LIST] = SA.get_default_color(features, pref_species) @@ -150,7 +150,7 @@ reset_colors() /datum/preferences/proc/validate_color_keys_for_part(key) - var/datum/sprite_accessory/SA = GLOB.sprite_accessories[key][mutant_bodyparts[key][MUTANT_INDEX_NAME]] + var/datum/sprite_accessory/SA = SSaccessories.sprite_accessories[key][mutant_bodyparts[key][MUTANT_INDEX_NAME]] var/list/colorlist = mutant_bodyparts[key][MUTANT_INDEX_COLOR_LIST] if(SA.color_src == USE_MATRIXED_COLORS && colorlist.len != 3) mutant_bodyparts[key][MUTANT_INDEX_COLOR_LIST] = SA.get_default_color(features, pref_species) @@ -179,7 +179,7 @@ /datum/preferences/proc/reset_colors() for(var/key in mutant_bodyparts) - var/datum/sprite_accessory/SA = GLOB.sprite_accessories[key][mutant_bodyparts[key][MUTANT_INDEX_NAME]] + var/datum/sprite_accessory/SA = SSaccessories.sprite_accessories[key][mutant_bodyparts[key][MUTANT_INDEX_NAME]] if(SA.always_color_customizable) continue mutant_bodyparts[key][MUTANT_INDEX_COLOR_LIST] = SA.get_default_color(features, pref_species) diff --git a/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/genitals.dm b/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/genitals.dm index 9c080a96621..090af1bbaaa 100644 --- a/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/genitals.dm +++ b/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/genitals.dm @@ -25,7 +25,7 @@ //Are they wearing an Undershirt? if(target_mob.undershirt != "Nude" && !(target_mob.underwear_visibility & UNDERWEAR_HIDE_SHIRT)) - var/datum/sprite_accessory/undershirt/worn_undershirt = GLOB.undershirt_list[target_mob.undershirt] + var/datum/sprite_accessory/undershirt/worn_undershirt = SSaccessories.undershirt_list[target_mob.undershirt] //Does this Undershirt cover a relevant slot? if(genital_location == CHEST) //(Undershirt always covers chest) return TRUE @@ -35,7 +35,7 @@ //Undershirt didn't cover them, are they wearing Underwear? if(target_mob.underwear != "Nude" && !(target_mob.underwear_visibility & UNDERWEAR_HIDE_UNDIES)) - var/datum/sprite_accessory/underwear/worn_underwear = GLOB.underwear_list[target_mob.underwear] + var/datum/sprite_accessory/underwear/worn_underwear = SSaccessories.underwear_list[target_mob.underwear] //Does this Underwear cover a relevant slot? if(genital_location == GROIN) //(Underwear always covers groin) return TRUE diff --git a/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/taur_types.dm b/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/taur_types.dm index 7944dc08604..502428d2138 100644 --- a/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/taur_types.dm +++ b/modular_skyrat/modules/customization/modules/mob/dead/new_player/sprite_accessories/taur_types.dm @@ -9,7 +9,7 @@ return NONE var/bodypart_name = taur_mutant_bodypart[MUTANT_INDEX_NAME] - var/datum/sprite_accessory/taur/taur = GLOB.sprite_accessories["taur"][bodypart_name] + var/datum/sprite_accessory/taur/taur = SSaccessories.sprite_accessories["taur"][bodypart_name] if(!taur) return NONE diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/human.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/human.dm index a8499e2fcdb..4fd30c3335d 100644 --- a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/human.dm +++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/human.dm @@ -11,7 +11,7 @@ for(var/genital in GLOB.possible_genitals) if(!dna.species.mutant_bodyparts[genital]) continue - var/datum/sprite_accessory/genital/G = GLOB.sprite_accessories[genital][dna.species.mutant_bodyparts[genital][MUTANT_INDEX_NAME]] + var/datum/sprite_accessory/genital/G = SSaccessories.sprite_accessories[genital][dna.species.mutant_bodyparts[genital][MUTANT_INDEX_NAME]] if(!G) continue if(G.is_hidden(src)) diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species.dm index 98bda575348..b9e01fe1202 100644 --- a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species.dm +++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species.dm @@ -110,7 +110,7 @@ GLOBAL_LIST_EMPTY(customizable_races) if(default_bodypart_data[key][MUTANTPART_CAN_RANDOMIZE]) SP = random_accessory_of_key_for_species(key, src) else - SP = GLOB.sprite_accessories[key][bodyparts_to_add[key][MUTANTPART_NAME]] + SP = SSaccessories.sprite_accessories[key][bodyparts_to_add[key][MUTANTPART_NAME]] if(!SP) CRASH("Cant find accessory of [key] key, [bodyparts_to_add[key]] name, for species [id]") var/list/color_list = SP.get_default_color(features, src) @@ -142,7 +142,7 @@ GLOBAL_LIST_EMPTY(customizable_races) //Underwear, Undershirts & Socks if(!HAS_TRAIT(species_human, TRAIT_NO_UNDERWEAR)) if(species_human.underwear && !(species_human.underwear_visibility & UNDERWEAR_HIDE_UNDIES)) - var/datum/sprite_accessory/underwear/underwear = GLOB.underwear_list[species_human.underwear] + var/datum/sprite_accessory/underwear/underwear = SSaccessories.underwear_list[species_human.underwear] var/mutable_appearance/underwear_overlay var/female_sprite_flags = FEMALE_UNIFORM_FULL // the default gender shaping if(underwear) @@ -160,7 +160,7 @@ GLOBAL_LIST_EMPTY(customizable_races) standing += underwear_overlay if(species_human.bra && !(species_human.underwear_visibility & UNDERWEAR_HIDE_BRA)) - var/datum/sprite_accessory/bra/bra = GLOB.bra_list[species_human.bra] + var/datum/sprite_accessory/bra/bra = SSaccessories.bra_list[species_human.bra] if(bra) var/mutable_appearance/bra_overlay @@ -172,7 +172,7 @@ GLOBAL_LIST_EMPTY(customizable_races) standing += bra_overlay if(species_human.undershirt && !(species_human.underwear_visibility & UNDERWEAR_HIDE_SHIRT)) - var/datum/sprite_accessory/undershirt/undershirt = GLOB.undershirt_list[species_human.undershirt] + var/datum/sprite_accessory/undershirt/undershirt = SSaccessories.undershirt_list[species_human.undershirt] if(undershirt) var/mutable_appearance/undershirt_overlay if(species_human.dna.species.sexes && species_human.physique == FEMALE) @@ -185,7 +185,7 @@ GLOBAL_LIST_EMPTY(customizable_races) standing += undershirt_overlay if(species_human.socks && species_human.num_legs >= 2 && !(mutant_bodyparts["taur"]) && !(species_human.underwear_visibility & UNDERWEAR_HIDE_SOCKS)) - var/datum/sprite_accessory/socks/socks = GLOB.socks_list[species_human.socks] + var/datum/sprite_accessory/socks/socks = SSaccessories.socks_list[species_human.socks] if(socks) var/mutable_appearance/socks_overlay var/icon_state = socks.icon_state @@ -213,10 +213,10 @@ GLOBAL_LIST_EMPTY(customizable_races) var/robot_organs = HAS_TRAIT(target, TRAIT_ROBOTIC_DNA_ORGANS) for(var/key in target.dna.mutant_bodyparts) - if(!islist(target.dna.mutant_bodyparts[key]) || !(target.dna.mutant_bodyparts[key][MUTANT_INDEX_NAME] in GLOB.sprite_accessories[key])) + if(!islist(target.dna.mutant_bodyparts[key]) || !(target.dna.mutant_bodyparts[key][MUTANT_INDEX_NAME] in SSaccessories.sprite_accessories[key])) continue - var/datum/sprite_accessory/mutant_accessory = GLOB.sprite_accessories[key][target.dna.mutant_bodyparts[key][MUTANT_INDEX_NAME]] + var/datum/sprite_accessory/mutant_accessory = SSaccessories.sprite_accessories[key][target.dna.mutant_bodyparts[key][MUTANT_INDEX_NAME]] if(mutant_accessory?.factual && mutant_accessory.organ_type) var/obj/item/organ/current_organ = target.get_organ_by_type(mutant_accessory.organ_type) diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/monkey.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/monkey.dm index 7054f8aedde..f5098076694 100644 --- a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/monkey.dm +++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/monkey.dm @@ -5,7 +5,7 @@ /datum/species/monkey/randomize_features() var/list/features = ..() - features["tail"] = pick(GLOB.tails_list_monkey - list("None")) // No tail-less monkeys. + features["tail"] = pick(SSaccessories.tails_list_monkey - list("None")) // No tail-less monkeys. return features /datum/species/monkey/prepare_human_for_preview(mob/living/carbon/human/monke) diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/mushpeople.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/mushpeople.dm index f0a2570ba4c..c35edf303a4 100644 --- a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/mushpeople.dm +++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/mushpeople.dm @@ -5,7 +5,7 @@ /datum/species/mush/randomize_features() var/list/features = ..() - features["caps"] = pick(GLOB.caps_list - list("None")) // No tail-less monkeys. // No cap-less mushpeople. + features["caps"] = pick(SSaccessories.caps_list - list("None")) // No tail-less monkeys. // No cap-less mushpeople. return features /datum/species/mush/prepare_human_for_preview(mob/living/carbon/human/shrooman) diff --git a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/roundstartslime.dm b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/roundstartslime.dm index 4d6fc47331d..d80f1cf9cf9 100644 --- a/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/roundstartslime.dm +++ b/modular_skyrat/modules/customization/modules/mob/living/carbon/human/species/roundstartslime.dm @@ -83,7 +83,7 @@ if(length(available_choices)) return - available_choices = deep_copy_list(GLOB.sprite_accessories) + available_choices = deep_copy_list(SSaccessories.sprite_accessories) for(var/parts_list in available_choices) for(var/parts in available_choices[parts_list]) var/datum/sprite_accessory/part = available_choices[parts_list][parts] @@ -216,7 +216,7 @@ alterer.mutant_renderkey = "" //Just in case for(var/mutant_key in alterer.dna.species.mutant_bodyparts) var/mutant_list = alterer.dna.species.mutant_bodyparts[mutant_key] - var/datum/sprite_accessory/changed_accessory = GLOB.sprite_accessories[mutant_key][mutant_list[MUTANT_INDEX_NAME]] + var/datum/sprite_accessory/changed_accessory = SSaccessories.sprite_accessories[mutant_key][mutant_list[MUTANT_INDEX_NAME]] mutant_list[MUTANT_INDEX_COLOR_LIST] = changed_accessory.get_default_color(alterer.dna.features, alterer.dna.species) if(hair_reset) @@ -253,11 +253,11 @@ return switch(target_hair) if("Hair") - var/new_style = tgui_input_list(owner, "Select a hair style", "Hair Alterations", GLOB.hairstyles_list) + var/new_style = tgui_input_list(owner, "Select a hair style", "Hair Alterations", SSaccessories.hairstyles_list) if(new_style) alterer.set_hairstyle(new_style, update = TRUE) if("Facial Hair") - var/new_style = tgui_input_list(alterer, "Select a facial hair style", "Hair Alterations", GLOB.facial_hairstyles_list) + var/new_style = tgui_input_list(alterer, "Select a facial hair style", "Hair Alterations", SSaccessories.facial_hairstyles_list) if(new_style) alterer.set_facial_hairstyle(new_style, update = TRUE) if("Hair Color") @@ -357,7 +357,7 @@ if(!chosen_name_key) return - var/datum/sprite_accessory/selected_sprite_accessory = GLOB.sprite_accessories[chosen_key][chosen_name_key] + var/datum/sprite_accessory/selected_sprite_accessory = SSaccessories.sprite_accessories[chosen_key][chosen_name_key] alterer.mutant_renderkey = "" //Just in case if(!selected_sprite_accessory.factual) if(selected_sprite_accessory.organ_type) diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/cap.dm b/modular_skyrat/modules/customization/modules/surgery/organs/cap.dm index 664334aee03..64dc6dda493 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/cap.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/cap.dm @@ -26,5 +26,8 @@ randomize_cap_color() return draw_color +/datum/bodypart_overlay/mutant/mushroom_cap/get_global_feature_list() + return SSaccessories.sprite_accessories["caps"] + /datum/bodypart_overlay/mutant/mushroom_cap/can_draw_on_bodypart(mob/living/carbon/human/human) return !sprite_datum.is_hidden(human) diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/ears.dm b/modular_skyrat/modules/customization/modules/surgery/organs/ears.dm index db653ddae8f..9bfa8f9df0e 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/ears.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/ears.dm @@ -28,4 +28,4 @@ return draw_color /datum/bodypart_overlay/mutant/ears/get_global_feature_list() - return GLOB.sprite_accessories["ears"] + return SSaccessories.sprite_accessories["ears"] diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/fluff.dm b/modular_skyrat/modules/customization/modules/surgery/organs/fluff.dm index 101d1d741a3..0dab3106c26 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/fluff.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/fluff.dm @@ -23,4 +23,4 @@ return draw_color /datum/bodypart_overlay/mutant/fluff/get_global_feature_list() - return GLOB.sprite_accessories["fluff"] + return SSaccessories.sprite_accessories["fluff"] diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/frills.dm b/modular_skyrat/modules/customization/modules/surgery/organs/frills.dm index 0ed1f9ff6c7..0dacf38e09f 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/frills.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/frills.dm @@ -13,4 +13,4 @@ return !sprite_datum.is_hidden(human) /datum/bodypart_overlay/mutant/frills/get_global_feature_list() - return GLOB.sprite_accessories["frills"] + return SSaccessories.sprite_accessories["frills"] diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/genitals.dm b/modular_skyrat/modules/customization/modules/surgery/organs/genitals.dm index ad72df50bac..2ee87aa4064 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/genitals.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/genitals.dm @@ -61,7 +61,7 @@ /obj/item/organ/external/genital/build_from_dna(datum/dna/DNA, associated_key) . = ..() - var/datum/sprite_accessory/genital/accessory = GLOB.sprite_accessories[associated_key][DNA.mutant_bodyparts[associated_key][MUTANT_INDEX_NAME]] + var/datum/sprite_accessory/genital/accessory = SSaccessories.sprite_accessories[associated_key][DNA.mutant_bodyparts[associated_key][MUTANT_INDEX_NAME]] genital_name = accessory.name genital_type = accessory.icon_state build_from_accessory(accessory, DNA) @@ -237,7 +237,7 @@ uses_skintones = accessory.has_skintone_shading /datum/bodypart_overlay/mutant/genital/penis/get_global_feature_list() - return GLOB.sprite_accessories[ORGAN_SLOT_PENIS] + return SSaccessories.sprite_accessories[ORGAN_SLOT_PENIS] /obj/item/organ/external/genital/testicles @@ -290,7 +290,7 @@ return passed_string /datum/bodypart_overlay/mutant/genital/testicles/get_global_feature_list() - return GLOB.sprite_accessories[ORGAN_SLOT_TESTICLES] + return SSaccessories.sprite_accessories[ORGAN_SLOT_TESTICLES] /obj/item/organ/external/genital/testicles/proc/balls_size_to_description(number) @@ -353,7 +353,7 @@ uses_skintones = accessory.has_skintone_shading /datum/bodypart_overlay/mutant/genital/vagina/get_global_feature_list() - return GLOB.sprite_accessories[ORGAN_SLOT_VAGINA] + return SSaccessories.sprite_accessories[ORGAN_SLOT_VAGINA] /obj/item/organ/external/genital/womb @@ -376,7 +376,7 @@ layers = NONE /datum/bodypart_overlay/mutant/genital/womb/get_global_feature_list() - return GLOB.sprite_accessories[ORGAN_SLOT_WOMB] + return SSaccessories.sprite_accessories[ORGAN_SLOT_WOMB] /obj/item/organ/external/genital/anus @@ -405,7 +405,7 @@ return returned_string /datum/bodypart_overlay/mutant/genital/anus/get_global_feature_list() - return GLOB.sprite_accessories[ORGAN_SLOT_ANUS] + return SSaccessories.sprite_accessories[ORGAN_SLOT_ANUS] /obj/item/organ/external/genital/breasts @@ -484,7 +484,7 @@ uses_skintones = accessory.has_skintone_shading /datum/bodypart_overlay/mutant/genital/breasts/get_global_feature_list() - return GLOB.sprite_accessories[ORGAN_SLOT_BREASTS] + return SSaccessories.sprite_accessories[ORGAN_SLOT_BREASTS] /obj/item/organ/external/genital/breasts/proc/breasts_size_to_cup(number) if(number < 0) diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/head_accessory.dm b/modular_skyrat/modules/customization/modules/surgery/organs/head_accessory.dm index 23af3bff9f0..973b3d8e5a6 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/head_accessory.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/head_accessory.dm @@ -23,4 +23,4 @@ return draw_color /datum/bodypart_overlay/mutant/head_accessory/get_global_feature_list() - return GLOB.sprite_accessories["head_accessory"] + return SSaccessories.sprite_accessories["head_accessory"] diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/moth_markings.dm b/modular_skyrat/modules/customization/modules/surgery/organs/moth_markings.dm index 38b5c369946..4863ab2f55e 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/moth_markings.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/moth_markings.dm @@ -23,4 +23,4 @@ return draw_color /datum/bodypart_overlay/mutant/moth_markings/get_global_feature_list() - return GLOB.sprite_accessories["moth_markings"] + return SSaccessories.sprite_accessories["moth_markings"] diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/neck_accessory.dm b/modular_skyrat/modules/customization/modules/surgery/organs/neck_accessory.dm index 5c9d8cd1426..51f97f36097 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/neck_accessory.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/neck_accessory.dm @@ -23,4 +23,4 @@ return draw_color /datum/bodypart_overlay/mutant/neck_accessory/get_global_feature_list() - return GLOB.sprite_accessories["neck_accessory"] + return SSaccessories.sprite_accessories["neck_accessory"] diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/skrell_hair.dm b/modular_skyrat/modules/customization/modules/surgery/organs/skrell_hair.dm index a2f129d8292..9bd71abe4c3 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/skrell_hair.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/skrell_hair.dm @@ -23,4 +23,4 @@ return draw_color /datum/bodypart_overlay/mutant/skrell_hair/get_global_feature_list() - return GLOB.sprite_accessories["skrell_hair"] + return SSaccessories.sprite_accessories["skrell_hair"] diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/synth_antenna.dm b/modular_skyrat/modules/customization/modules/surgery/organs/synth_antenna.dm index be9aaa92ecc..c9ff539dec6 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/synth_antenna.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/synth_antenna.dm @@ -23,4 +23,4 @@ return draw_color /datum/bodypart_overlay/mutant/synth_antenna/get_global_feature_list() - return GLOB.sprite_accessories[MUTANT_SYNTH_ANTENNA] + return SSaccessories.sprite_accessories[MUTANT_SYNTH_ANTENNA] diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/synth_screen.dm b/modular_skyrat/modules/customization/modules/surgery/organs/synth_screen.dm index 367bf91e923..7339229ffc5 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/synth_screen.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/synth_screen.dm @@ -23,4 +23,4 @@ return draw_color /datum/bodypart_overlay/mutant/synth_screen/get_global_feature_list() - return GLOB.sprite_accessories[MUTANT_SYNTH_SCREEN] + return SSaccessories.sprite_accessories[MUTANT_SYNTH_SCREEN] diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/taur_body.dm b/modular_skyrat/modules/customization/modules/surgery/organs/taur_body.dm index 709ac6f5a1f..116f1d8f9a8 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/taur_body.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/taur_body.dm @@ -28,7 +28,7 @@ /datum/bodypart_overlay/mutant/taur_body/get_global_feature_list() - return GLOB.sprite_accessories["taur"] + return SSaccessories.sprite_accessories["taur"] /obj/item/organ/external/taur_body/Insert(mob/living/carbon/receiver, special, movement_flags) diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/wings.dm b/modular_skyrat/modules/customization/modules/surgery/organs/wings.dm index 0aaf219dce4..59719b12395 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/wings.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/wings.dm @@ -20,7 +20,7 @@ color_source = ORGAN_COLOR_OVERRIDE /datum/bodypart_overlay/mutant/wings/get_global_feature_list() - return GLOB.sprite_accessories["wings"] + return SSaccessories.sprite_accessories["wings"] //TODO: Well you know what this flight stuff is a bit complicated and hardcoded, this is enough for now @@ -66,9 +66,9 @@ /datum/bodypart_overlay/mutant/wings/functional/locked/get_global_feature_list() if(wings_open) - return GLOB.sprite_accessories["wings_open"] + return SSaccessories.sprite_accessories["wings_open"] - return GLOB.sprite_accessories["wings_functional"] + return SSaccessories.sprite_accessories["wings_functional"] // We need to overwrite this because all of these wings are locked. diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/xenodorsal.dm b/modular_skyrat/modules/customization/modules/surgery/organs/xenodorsal.dm index 1aaf4f750d2..5725cc1a9a2 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/xenodorsal.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/xenodorsal.dm @@ -22,4 +22,4 @@ return draw_color /datum/bodypart_overlay/mutant/xenodorsal/get_global_feature_list() - return GLOB.sprite_accessories["xenodorsal"] + return SSaccessories.sprite_accessories["xenodorsal"] diff --git a/modular_skyrat/modules/customization/modules/surgery/organs/xenohead.dm b/modular_skyrat/modules/customization/modules/surgery/organs/xenohead.dm index a38c542261c..c08af5cb985 100644 --- a/modular_skyrat/modules/customization/modules/surgery/organs/xenohead.dm +++ b/modular_skyrat/modules/customization/modules/surgery/organs/xenohead.dm @@ -23,4 +23,4 @@ return draw_color /datum/bodypart_overlay/mutant/xenohead/get_global_feature_list() - return GLOB.sprite_accessories["xenohead"] + return SSaccessories.sprite_accessories["xenohead"] diff --git a/modular_skyrat/modules/emotes/code/additionalemotes/turf_emote.dm b/modular_skyrat/modules/emotes/code/additionalemotes/turf_emote.dm index 4dc5a36ecea..07c7ddc7b3f 100644 --- a/modular_skyrat/modules/emotes/code/additionalemotes/turf_emote.dm +++ b/modular_skyrat/modules/emotes/code/additionalemotes/turf_emote.dm @@ -58,7 +58,7 @@ //body parts if(istype(user.get_organ_slot(ORGAN_SLOT_EXTERNAL_TAIL), /obj/item/organ/external/tail)) var/name = human_user.dna.species.mutant_bodyparts["tail"][MUTANT_INDEX_NAME] - var/datum/sprite_accessory/tails/tail = GLOB.sprite_accessories["tail"][name] + var/datum/sprite_accessory/tails/tail = SSaccessories.sprite_accessories["tail"][name] if(tail.fluffy) user.allowed_turfs += "tails" @@ -127,7 +127,7 @@ //coloring var/list/finished_list = list() var/list/color_list = human_user.dna.species.mutant_bodyparts[key][MUTANT_INDEX_COLOR_LIST] //identify color - var/datum/sprite_accessory/sprite_type = GLOB.sprite_accessories[key][human_user.dna.species.mutant_bodyparts[key][MUTANT_INDEX_NAME]] //identify type + var/datum/sprite_accessory/sprite_type = SSaccessories.sprite_accessories[key][human_user.dna.species.mutant_bodyparts[key][MUTANT_INDEX_NAME]] //identify type switch(sprite_type.color_src) if(USE_MATRIXED_COLORS) diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_items/_masturbation_item.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_items/_masturbation_item.dm index 2f1c9db384e..4407a304c3f 100644 --- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_items/_masturbation_item.dm +++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_items/_masturbation_item.dm @@ -21,7 +21,7 @@ var/mob/living/carbon/human/affected_human = user var/obj/item/organ/external/genital/testicles/testicles = affected_human.get_organ_slot(ORGAN_SLOT_TESTICLES) var/obj/item/organ/external/genital/penis/penis = affected_human.get_organ_slot(ORGAN_SLOT_PENIS) - var/datum/sprite_accessory/genital/penis_sprite = GLOB.sprite_accessories[ORGAN_SLOT_PENIS][affected_human.dna.species.mutant_bodyparts[ORGAN_SLOT_PENIS][MUTANT_INDEX_NAME]] + var/datum/sprite_accessory/genital/penis_sprite = SSaccessories.sprite_accessories[ORGAN_SLOT_PENIS][affected_human.dna.species.mutant_bodyparts[ORGAN_SLOT_PENIS][MUTANT_INDEX_NAME]] if(penis_sprite.is_hidden(affected_human)) to_chat(user, span_notice("You need to expose yourself in order to masturbate.")) return diff --git a/modular_skyrat/modules/moretraitoritems/code/syndiemirror.dm b/modular_skyrat/modules/moretraitoritems/code/syndiemirror.dm index 013ec5950f0..ea74b42a971 100644 --- a/modular_skyrat/modules/moretraitoritems/code/syndiemirror.dm +++ b/modular_skyrat/modules/moretraitoritems/code/syndiemirror.dm @@ -33,7 +33,7 @@ if(selected_part == "Hair") - var/hair_id = tgui_input_list(user, "Please select what hairstyle you'd like to sculpt!", "Select masterpiece", GLOB.hairstyles_list) + var/hair_id = tgui_input_list(user, "Please select what hairstyle you'd like to sculpt!", "Select masterpiece", SSaccessories.hairstyles_list) if(!hair_id) return @@ -47,7 +47,7 @@ target_human.set_hairstyle(hair_id, update = TRUE) user.visible_message(span_notice("[target_human]'s hair changes!"), span_notice("The nanites successfully alter [target_human]'s hair!")) else - var/facial_hair_id = tgui_input_list(user, "Please select what facial hairstyle you'd like to sculpt!", "Select masterpiece", GLOB.facial_hairstyles_list) + var/facial_hair_id = tgui_input_list(user, "Please select what facial hairstyle you'd like to sculpt!", "Select masterpiece", SSaccessories.facial_hairstyles_list) if(!facial_hair_id) return diff --git a/modular_skyrat/modules/salon/code/hair_tie.dm b/modular_skyrat/modules/salon/code/hair_tie.dm index 73b1a28d93b..a7140bc09b7 100644 --- a/modular_skyrat/modules/salon/code/hair_tie.dm +++ b/modular_skyrat/modules/salon/code/hair_tie.dm @@ -53,7 +53,7 @@ return ..() /obj/item/clothing/head/hair_tie/attack_self(mob/user) - var/hair_id = tgui_input_list(user, "How does your hair look when its up?", "Pick!", GLOB.hairstyles_list) + var/hair_id = tgui_input_list(user, "How does your hair look when its up?", "Pick!", SSaccessories.hairstyles_list) if(!hair_id || hair_id == "Bald") balloon_alert(user, "error!") return diff --git a/modular_skyrat/modules/salon/code/scissors.dm b/modular_skyrat/modules/salon/code/scissors.dm index fa3dea70c4f..b286a791303 100644 --- a/modular_skyrat/modules/salon/code/scissors.dm +++ b/modular_skyrat/modules/salon/code/scissors.dm @@ -38,7 +38,7 @@ balloon_alert(user, "They have no hair to cut!") return - var/hair_id = tgui_input_list(user, "Please select what hairstyle you'd like to sculpt!", "Select masterpiece", GLOB.hairstyles_list) + var/hair_id = tgui_input_list(user, "Please select what hairstyle you'd like to sculpt!", "Select masterpiece", SSaccessories.hairstyles_list) if(!hair_id) return @@ -58,7 +58,7 @@ balloon_alert(user, "They have no facial hair to cut!") return - var/facial_hair_id = tgui_input_list(user, "Please select what facial hairstyle you'd like to sculpt!", "Select masterpiece", GLOB.facial_hairstyles_list) + var/facial_hair_id = tgui_input_list(user, "Please select what facial hairstyle you'd like to sculpt!", "Select masterpiece", SSaccessories.facial_hairstyles_list) if(!facial_hair_id) return diff --git a/modular_skyrat/modules/synths/code/species/screen.dm b/modular_skyrat/modules/synths/code/species/screen.dm index f65143b99a1..728532c0ea3 100644 --- a/modular_skyrat/modules/synths/code/species/screen.dm +++ b/modular_skyrat/modules/synths/code/species/screen.dm @@ -10,7 +10,7 @@ if(!istype(synth_species)) return - var/new_ipc_screen = tgui_input_list(usr, "Choose your character's screen:", "Monitor Display", GLOB.sprite_accessories[MUTANT_SYNTH_SCREEN]) + var/new_ipc_screen = tgui_input_list(usr, "Choose your character's screen:", "Monitor Display", SSaccessories.sprite_accessories[MUTANT_SYNTH_SCREEN]) if(!new_ipc_screen) return diff --git a/modular_skyrat/modules/synths/code/species/synthetic.dm b/modular_skyrat/modules/synths/code/species/synthetic.dm index 4d035c7dfad..9f146de2c67 100644 --- a/modular_skyrat/modules/synths/code/species/synthetic.dm +++ b/modular_skyrat/modules/synths/code/species/synthetic.dm @@ -110,8 +110,8 @@ if(!chassis && !head) return - var/datum/sprite_accessory/synth_chassis/chassis_of_choice = GLOB.sprite_accessories[MUTANT_SYNTH_CHASSIS][chassis[MUTANT_INDEX_NAME]] - var/datum/sprite_accessory/synth_head/head_of_choice = GLOB.sprite_accessories[MUTANT_SYNTH_HEAD][head[MUTANT_INDEX_NAME]] + var/datum/sprite_accessory/synth_chassis/chassis_of_choice = SSaccessories.sprite_accessories[MUTANT_SYNTH_CHASSIS][chassis[MUTANT_INDEX_NAME]] + var/datum/sprite_accessory/synth_head/head_of_choice = SSaccessories.sprite_accessories[MUTANT_SYNTH_HEAD][head[MUTANT_INDEX_NAME]] if(!chassis_of_choice && !head_of_choice) return diff --git a/tgstation.dme b/tgstation.dme index 7bc1124b3d9..68d2b2becff 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -783,6 +783,7 @@ #include "code\controllers\subsystem\sounds.dm" #include "code\controllers\subsystem\spatial_gridmap.dm" #include "code\controllers\subsystem\speech_controller.dm" +#include "code\controllers\subsystem\sprite_accessories.dm" #include "code\controllers\subsystem\statpanel.dm" #include "code\controllers\subsystem\stickyban.dm" #include "code\controllers\subsystem\stock_market.dm"