Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Lets roundstart slimes have hair colors again #3265

Merged
merged 2 commits into from
May 9, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.',
Expand Down
Loading