diff --git a/modular_nova/master_files/code/modules/client/preferences/mutant_parts.dm b/modular_nova/master_files/code/modules/client/preferences/mutant_parts.dm index 5017204bbab..1fdec65c61e 100644 --- a/modular_nova/master_files/code/modules/client/preferences/mutant_parts.dm +++ b/modular_nova/master_files/code/modules/client/preferences/mutant_parts.dm @@ -8,17 +8,32 @@ default_value = FALSE /datum/preference/toggle/allow_mismatched_parts/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences) - return TRUE // we dont actually want this to do anything + return // we dont actually want this to do anything /datum/preference/toggle/allow_mismatched_parts/is_accessible(datum/preferences/preferences) if(CONFIG_GET(flag/disable_mismatched_parts)) return FALSE - . = ..() + return ..() -/datum/preference/toggle/allow_mismatched_parts/deserialize(input, datum/preferences/preferences) +/datum/preference/toggle/allow_mismatched_parts/deserialize(input) if(CONFIG_GET(flag/disable_mismatched_parts)) return FALSE - . = ..() + return ..() + +/datum/preference/toggle/allow_mismatched_hair_color + category = PREFERENCE_CATEGORY_SECONDARY_FEATURES + savefile_identifier = PREFERENCE_CHARACTER + savefile_key = "allow_mismatched_hair_color_toggle" + default_value = TRUE + +/datum/preference/toggle/allow_mismatched_hair_color/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences) + return // applied in apply_supplementary_body_changes() + +/datum/preference/toggle/allow_mismatched_hair_color/is_accessible(datum/preferences/preferences) + var/datum/species/species = preferences.read_preference(/datum/preference/choiced/species) + if(!ispath(species, /datum/species/jelly)) // only slimes can see this pref + return FALSE + return ..() /datum/preference/toggle/allow_emissives category = PREFERENCE_CATEGORY_SECONDARY_FEATURES diff --git a/modular_nova/modules/customization/modules/mob/living/carbon/human/species/roundstartslime.dm b/modular_nova/modules/customization/modules/mob/living/carbon/human/species/roundstartslime.dm index 0877222dbdf..1e9b02d9722 100644 --- a/modular_nova/modules/customization/modules/mob/living/carbon/human/species/roundstartslime.dm +++ b/modular_nova/modules/customization/modules/mob/living/carbon/human/species/roundstartslime.dm @@ -57,6 +57,10 @@ return perk_descriptions +/datum/species/jelly/roundstartslime/apply_supplementary_body_changes(mob/living/carbon/human/target, datum/preferences/preferences, visuals_only = FALSE) + if(preferences.read_preference(/datum/preference/toggle/allow_mismatched_hair_color)) + target.dna.species.hair_color_mode = null + /** * Alter Form is the ability of slimes to edit many of their character attributes at will * This covers most thing about their character, from body size or colour, to adding new wings, tails, ears, etc, to changing the presence of their genitalia diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/nova/species_features.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/nova/species_features.tsx index 6c89d1a9963..f13e41a36b0 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/nova/species_features.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/nova/species_features.tsx @@ -116,6 +116,13 @@ export const allow_mismatched_parts_toggle: FeatureToggle = { component: CheckboxInput, }; +export const allow_mismatched_hair_color_toggle: FeatureToggle = { + name: 'Allow Mismatched Hair Color', + description: + 'Allows species who normally have a fixed hair color to have different hair colors. This includes in-round sources such as dyeing hair, alter form, etc. Currently only applicable to slimes.', + component: CheckboxInput, +}; + export const allow_genitals_toggle: FeatureToggle = { name: 'Allow Genital Parts', description: 'Enables if you want to have genitals on your character.',