diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index dcf6d772c3f4..71f307bee939 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -159,6 +159,7 @@ #define BODYPART_ID_PSYKER "psyker" #define BODYPART_ID_MEAT "meat" #define BODYPART_ID_PEG "peg" +#define BODYPART_ID_MUTANT "mutant" // Preferences for leg types diff --git a/icons/mob/human/bodyparts_greyscale.dmi b/icons/mob/human/bodyparts_greyscale.dmi index b87182b258b4..31f764e80fca 100644 Binary files a/icons/mob/human/bodyparts_greyscale.dmi and b/icons/mob/human/bodyparts_greyscale.dmi differ diff --git a/maplestation_modules/code/modules/mob/living/carbon/human/species_types/animid/animid.dm b/maplestation_modules/code/modules/mob/living/carbon/human/species_types/animid/animid.dm index e65f24844ec8..be71f820605b 100644 --- a/maplestation_modules/code/modules/mob/living/carbon/human/species_types/animid/animid.dm +++ b/maplestation_modules/code/modules/mob/living/carbon/human/species_types/animid/animid.dm @@ -108,6 +108,7 @@ GLOBAL_LIST_INIT_TYPED(animid_singletons, /datum/animid_type, init_animid_single . = ..() for(var/animalid_id in GLOB.animid_singletons) . |= GLOB.animid_singletons[animalid_id].get_feature_keys() + . += /datum/preference/color/mutant_color::savefile_key // Filters out features from other animid types, to declutter the prefs screen /datum/species/human/animid/filter_features_per_prefs(list/to_filter, datum/preferences/prefs) @@ -118,6 +119,9 @@ GLOBAL_LIST_INIT_TYPED(animid_singletons, /datum/animid_type, init_animid_single // re-add features that we may have filtered from our selected animid type to_filter |= GLOB.animid_singletons[selected_animid_id].get_feature_keys() + if(prefs.read_preference(/datum/preference/toggle/enable_mutant_colors)) + to_filter -= /datum/preference/choiced/skin_tone::savefile_key + // Shows all organs from all animid types /datum/species/human/animid/get_mut_organs(include_brain = TRUE) . = ..() diff --git a/maplestation_modules/code/modules/mob/living/carbon/human/species_types/animid/animid_prefs.dm b/maplestation_modules/code/modules/mob/living/carbon/human/species_types/animid/animid_prefs.dm index 92178dbd06c9..32e2b3f9567d 100644 --- a/maplestation_modules/code/modules/mob/living/carbon/human/species_types/animid/animid_prefs.dm +++ b/maplestation_modules/code/modules/mob/living/carbon/human/species_types/animid/animid_prefs.dm @@ -40,6 +40,35 @@ ) return data +/datum/preference/toggle/enable_mutant_colors + savefile_key = "enable_mutant_colors" + savefile_identifier = PREFERENCE_CHARACTER + priority = PREFERENCE_PRIORITY_BODYPARTS + category = PREFERENCE_CATEGORY_SECONDARY_FEATURES + can_randomize = FALSE + default_value = FALSE + +/datum/preference/toggle/enable_mutant_colors/is_accessible(datum/preferences/preferences) + return ..() && ispath(preferences.read_preference(/datum/preference/choiced/species), /datum/species/human/animid) + +/datum/preference/toggle/enable_mutant_colors/apply_to_human(mob/living/carbon/human/target, value) + if(!isanimid(target)) + return + if(value) + REMOVE_TRAIT(target, TRAIT_USES_SKINTONES, SPECIES_TRAIT) + ADD_TRAIT(target, TRAIT_MUTANT_COLORS, SPECIES_TRAIT) + for(var/obj/item/bodypart/limb in target.get_bodyparts()) + if(limb.limb_id == SPECIES_HUMAN) + limb.limb_id = BODYPART_ID_MUTANT + target.update_body_parts() + else + REMOVE_TRAIT(target, TRAIT_MUTANT_COLORS, SPECIES_TRAIT) + ADD_TRAIT(target, TRAIT_USES_SKINTONES, SPECIES_TRAIT) + for(var/obj/item/bodypart/limb in target.get_bodyparts()) + if(limb.limb_id == BODYPART_ID_MUTANT) + limb.limb_id = SPECIES_HUMAN + target.update_body_parts() + /proc/generate_tail_icon(datum/sprite_accessory/tail_accessory, feature_key, tail_color = COLOR_BROWNER_BROWN) var/datum/universal_icon/body = generate_body_icon( bodyparts = list( diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/_modular_species_features.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/_modular_species_features.tsx index a63593dadfe1..d09bd2baf579 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/_modular_species_features.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/_modular_species_features.tsx @@ -270,3 +270,8 @@ export const feature_android_laws: FeatureChoiced = { `, component: AndroidLaws, }; + +export const enable_mutant_colors: FeatureToggle = { + name: 'Enable Mutant Colors', + component: CheckboxInput, +};