diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index a11b0229e1..bcd71399b9 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -565,9 +565,9 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/datum/sprite_accessory/accessory = find_part_list[find_part] if(accessory) if(accessory.color_src == MATRIXED || accessory.color_src == MUTCOLORS || accessory.color_src == MUTCOLORS2 || accessory.color_src == MUTCOLORS3) //mutcolors1-3 are deprecated now, please don't rely on these in the future - var/primary_feature = "[mutant_part]_primary" - var/secondary_feature = "[mutant_part]_secondary" - var/tertiary_feature = "[mutant_part]_tertiary" + var/primary_feature = "[accessory.mutant_part_string]_primary" + var/secondary_feature = "[accessory.mutant_part_string]_secondary" + var/tertiary_feature = "[accessory.mutant_part_string]_tertiary" var/matrixed_sections = accessory.matrixed_sections if(accessory.color_src == MATRIXED && !matrixed_sections) message_admins("Sprite Accessory Failure (customization): Accessory [accessory.type] is a matrixed item without any matrixed sections set!") diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index af0b062686..2fa936e72e 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -5,7 +5,7 @@ // You do not need to raise this if you are adding new values that have sane defaults. // Only raise this value when changing the meaning/format/name/layout of an existing value // where you would want the updater procs below to run -#define SAVEFILE_VERSION_MAX 40 +#define SAVEFILE_VERSION_MAX 41 /* SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn @@ -226,7 +226,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car left_eye_color = "#BAB99E" right_eye_color = "#BAB99E" - if(current_version < 40) //extreme changes to how things are coloured (the introduction of the advanced coloring system) + if(current_version < 41) //extreme changes to how things are coloured (the introduction of the advanced coloring system) features["color_scheme"] = OLD_CHARACTER_COLORING //disable advanced coloring system by default for(var/feature in features) var/feature_value = features[feature] @@ -235,9 +235,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if(ref_list) var/datum/sprite_accessory/accessory = ref_list[feature_value] if(accessory) - var/primary_string = "[feature]_primary" - var/secondary_string = "[feature]_secondary]" - var/tertiary_string = "[feature]_tertiary]" + var/primary_string = "[accessory.mutant_part_string]_primary" + var/secondary_string = "[accessory.mutant_part_string]_secondary]" + var/tertiary_string = "[accessory.mutant_part_string]_tertiary]" if(accessory.color_src == MATRIXED && !accessory.matrixed_sections && feature_value != "None") message_admins("Sprite Accessory Failure (migration from [current_version] to 39): Accessory [accessory.type] is a matrixed item without any matrixed sections set!") continue @@ -842,9 +842,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if(ref_list) var/datum/sprite_accessory/accessory = ref_list[feature_value] if(accessory) - var/primary_string = "[feature]_primary" - var/secondary_string = "[feature]_secondary]" - var/tertiary_string = "[feature]_tertiary]" + var/primary_string = "[accessory.mutant_part_string]_primary" + var/secondary_string = "[accessory.mutant_part_string]_secondary]" + var/tertiary_string = "[accessory.mutant_part_string]_tertiary]" if(accessory.color_src == MATRIXED && !accessory.matrixed_sections && feature_value != "None") message_admins("Sprite Accessory Failure (loading data): Accessory [accessory.type] is a matrixed item without any matrixed sections set!") continue @@ -988,9 +988,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car if(ref_list) var/datum/sprite_accessory/accessory = ref_list[feature_value] if(accessory) - var/primary_string = "[feature]_primary" - var/secondary_string = "[feature]_secondary]" - var/tertiary_string = "[feature]_tertiary]" + var/primary_string = "[accessory.mutant_part_string]_primary" + var/secondary_string = "[accessory.mutant_part_string]_secondary]" + var/tertiary_string = "[accessory.mutant_part_string]_tertiary]" if(accessory.color_src == MATRIXED && !accessory.matrixed_sections && feature_value != "None") message_admins("Sprite Accessory Failure (saving data): Accessory [accessory.type] is a matrixed item without any matrixed sections set!") continue diff --git a/code/modules/mob/dead/new_player/sprite_accessories/alienpeople.dm b/code/modules/mob/dead/new_player/sprite_accessories/alienpeople.dm index 3972bdc2c3..4b0962e710 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/alienpeople.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/alienpeople.dm @@ -27,7 +27,7 @@ *******************************************/ /datum/sprite_accessory/xeno_tail icon = 'modular_citadel/icons/mob/xeno_parts_greyscale.dmi' - mutant_part_string = "tail" + mutant_part_string = "xenotail" relevant_layers = list(BODY_BEHIND_LAYER, BODY_FRONT_LAYER) /datum/sprite_accessory/xeno_tail/is_not_visible(var/mob/living/carbon/human/H, var/tauric) @@ -46,7 +46,7 @@ *******************************************/ /datum/sprite_accessory/xeno_head icon = 'modular_citadel/icons/mob/xeno_parts_greyscale.dmi' - mutant_part_string = "xhead" + mutant_part_string = "xenohead" relevant_layers = list(BODY_ADJ_LAYER) /datum/sprite_accessory/xeno_head/is_not_visible(var/mob/living/carbon/human/H, var/tauric) diff --git a/code/modules/mob/dead/new_player/sprite_accessories/body_markings.dm b/code/modules/mob/dead/new_player/sprite_accessories/body_markings.dm index 3fb73ce80e..383bdf4b7c 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/body_markings.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/body_markings.dm @@ -5,7 +5,7 @@ /datum/sprite_accessory/body_markings icon = 'icons/mob/mutant_bodyparts.dmi' relevant_layers = list(BODY_ADJ_LAYER) - mutant_part_string = "bodymarkings" + mutant_part_string = "body_markings" /datum/sprite_accessory/body_markings/none name = "None" @@ -49,7 +49,7 @@ gender_specific = 0 icon = 'modular_citadel/icons/mob/mam_markings.dmi' recommended_species = list("mammal", "xeno", "slimeperson", "podweak") - mutant_part_string = "bodymarkings" + mutant_part_string = "mam_body_markings" matrixed_sections = MATRIX_ALL /datum/sprite_accessory/mam_body_markings/none @@ -234,6 +234,7 @@ icon = 'icons/mob/wings.dmi' color_src = 0 relevant_layers = list(BODY_FRONT_LAYER) + mutant_part_string = "insect_fluff" /datum/sprite_accessory/insect_fluff/is_not_visible(var/mob/living/carbon/human/H, var/tauric) return (!H.dna.features["insect_fluff"] || H.dna.features["insect_fluff"] == "None" || H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT)) diff --git a/code/modules/mob/dead/new_player/sprite_accessories/ears.dm b/code/modules/mob/dead/new_player/sprite_accessories/ears.dm index d5db676b73..c4045d9afc 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/ears.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/ears.dm @@ -203,7 +203,7 @@ /datum/sprite_accessory/ears/mam_ears icon = 'modular_citadel/icons/mob/mam_ears.dmi' color_src = MATRIXED - mutant_part_string = "ears" + mutant_part_string = "mam_ears" relevant_layers = list(BODY_BEHIND_LAYER, BODY_ADJ_LAYER, BODY_FRONT_LAYER) /datum/sprite_accessory/ears/mam_ears/is_not_visible(var/mob/living/carbon/human/H, var/tauric) diff --git a/code/modules/mob/dead/new_player/sprite_accessories/snouts.dm b/code/modules/mob/dead/new_player/sprite_accessories/snouts.dm index 6c04e27783..084e06dd93 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/snouts.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/snouts.dm @@ -1,6 +1,6 @@ /datum/sprite_accessory/snouts icon = 'icons/mob/mutant_bodyparts.dmi' - mutant_part_string = "snout" + mutant_part_string = "snouts" relevant_layers = list(BODY_ADJ_LAYER, BODY_FRONT_LAYER) /datum/sprite_accessory/snouts/is_not_visible(var/mob/living/carbon/human/H, var/tauric) @@ -153,7 +153,7 @@ color_src = MATRIXED icon = 'modular_citadel/icons/mob/mam_snouts.dmi' recommended_species = list("mammal", "slimeperson", "insect", "podweak", "lizard") - mutant_part_string = "snout" + mutant_part_string = "mam_snouts" relevant_layers = list(BODY_ADJ_LAYER, BODY_FRONT_LAYER) /datum/sprite_accessory/snouts/mam_snouts/is_not_visible(var/mob/living/carbon/human/H, var/tauric) diff --git a/code/modules/mob/dead/new_player/sprite_accessories/tails.dm b/code/modules/mob/dead/new_player/sprite_accessories/tails.dm index b3a89d9115..97c6114e8d 100644 --- a/code/modules/mob/dead/new_player/sprite_accessories/tails.dm +++ b/code/modules/mob/dead/new_player/sprite_accessories/tails.dm @@ -1,6 +1,6 @@ /datum/sprite_accessory/tails icon = 'icons/mob/mutant_bodyparts.dmi' - mutant_part_string = "tail" + mutant_part_string = "tails" relevant_layers = list(BODY_BEHIND_LAYER, BODY_FRONT_LAYER) /datum/sprite_accessory/tails/is_not_visible(var/mob/living/carbon/human/H, var/tauric) @@ -8,7 +8,7 @@ /datum/sprite_accessory/tails_animated icon = 'icons/mob/mutant_bodyparts.dmi' - mutant_part_string = "tail" //keep this the same, ALWAYS, this is incredibly important for colouring! + mutant_part_string = "tails" //keep this the same, ALWAYS, this is incredibly important for colouring! relevant_layers = list(BODY_BEHIND_LAYER, BODY_FRONT_LAYER) /****************************************** diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 2ce5e74c56..bfd3b2873a 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -773,6 +773,13 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) var/primary_string = advanced_color_system ? "[S.mutant_part_string]_primary" : "mcolor" var/secondary_string = advanced_color_system ? "[S.mutant_part_string]_secondary" : "mcolor2" var/tertiary_string = advanced_color_system ? "[S.mutant_part_string]_tertiary" : "mcolor3" + //failsafe: if there's no value for any of these, set it to white + if(!H.dna.features[primary_string]) + H.dna.features[primary_string] = "FFFFFF" + if(!H.dna.features[secondary_string]) + H.dna.features[secondary_string] = "FFFFFF" + if(!H.dna.features[tertiary_string]) + H.dna.features[tertiary_string] = "FFFFFF" if(!husk) if(!forced_colour) @@ -797,9 +804,18 @@ GLOBAL_LIST_EMPTY(roundstart_race_names) if(MATRIXED) var/list/accessory_colorlist = list() - accessory_colorlist += husk ? ReadRGB("#a3a3a3") : ReadRGB("[H.dna.features[primary_string]]00") - accessory_colorlist += husk ? ReadRGB("#a3a3a3") : ReadRGB("[H.dna.features[secondary_string]]00") - accessory_colorlist += husk ? ReadRGB("#a3a3a3") : ReadRGB("[H.dna.features[tertiary_string]]00") + if(S.matrixed_sections == MATRIX_RED || S.matrixed_sections == MATRIX_RED_GREEN || S.matrixed_sections == MATRIX_RED_BLUE || S.matrixed_sections == MATRIX_ALL) + accessory_colorlist += husk ? ReadRGB("#a3a3a3") : ReadRGB("[H.dna.features[primary_string]]00") + else + accessory_colorlist += husk ? ReadRGB("#a3a3a3") : ReadRGB("00000000") + if(S.matrixed_sections == MATRIX_GREEN || S.matrixed_sections == MATRIX_RED_GREEN || S.matrixed_sections == MATRIX_GREEN_BLUE || S.matrixed_sections == MATRIX_ALL) + accessory_colorlist += husk ? ReadRGB("#a3a3a3") : ReadRGB("[H.dna.features[secondary_string]]00") + else + accessory_colorlist += husk ? ReadRGB("#a3a3a3") : ReadRGB("00000000") + if(S.matrixed_sections == MATRIX_BLUE || S.matrixed_sections == MATRIX_RED_BLUE || S.matrixed_sections == MATRIX_GREEN_BLUE || S.matrixed_sections == MATRIX_ALL) + accessory_colorlist += husk ? ReadRGB("#a3a3a3") : ReadRGB("[H.dna.features[tertiary_string]]00") + else + accessory_colorlist += husk ? ReadRGB("#a3a3a3") : ReadRGB("00000000") accessory_colorlist += husk ? list(0, 0, 0) : list(0, 0, 0, hair_alpha) for(var/index in 1 to accessory_colorlist.len) accessory_colorlist[index] /= 255