Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file modified icons/mob/human/bodyparts_greyscale.dmi
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
. = ..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,8 @@ export const feature_android_laws: FeatureChoiced = {
`,
component: AndroidLaws,
};

export const enable_mutant_colors: FeatureToggle = {
name: 'Enable Mutant Colors',
component: CheckboxInput,
};
Loading