Skip to content

Commit

Permalink
Lets roundstart slimes have hair colors again (#2385)
Browse files Browse the repository at this point in the history
* Lets roundstart slimes have hair colors again

* Adds new pref for it

* Update mutant_parts.dm

* Some final fixes
  • Loading branch information
vinylspiders authored and StealsThePRs committed May 9, 2024
1 parent 3863b4b commit 4dea600
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
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 @@ -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

Check failure on line 62 in modular_nova/modules/customization/modules/mob/living/carbon/human/species/roundstartslime.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined field: "hair_color_mode" on /datum/species

/**
* 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

0 comments on commit 4dea600

Please sign in to comment.