diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm index 34a165ccf6db..3e7154b8e1fa 100644 --- a/code/__DEFINES/DNA.dm +++ b/code/__DEFINES/DNA.dm @@ -80,24 +80,25 @@ #define SKINTONES 12 #define ANIME 13 #define MUTCOLORS_SECONDARY 14 +#define SPECIES_FUR 15 /// Use this if you want to change the race's color without the player being able to pick their own color. AKA special color shifting -#define DYNCOLORS 15 -#define AGENDER 16 +#define DYNCOLORS 16 +#define AGENDER 17 /// Do not draw eyes or eyeless overlay -#define NOEYESPRITES 17 +#define NOEYESPRITES 18 ///If we have a limb-specific overlay sprite -#define HAS_MARKINGS 18 +#define HAS_MARKINGS 19 /// Do not draw blood overlay -#define NOBLOODOVERLAY 19 +#define NOBLOODOVERLAY 20 ///No augments, for monkeys in specific because they will turn into fucking freakazoids https://cdn.discordapp.com/attachments/326831214667235328/791313258912153640/102707682-fa7cad80-4294-11eb-8f13-8c689468aeb0.png -#define NOAUGMENTS 20 +#define NOAUGMENTS 21 ///will be assigned a universal vampire themed last name shared by their department. this is preferenced! -#define BLOOD_CLANS 21 +#define BLOOD_CLANS 22 -#define REVIVESBYHEALING 22 -#define NOHUSK 23 -#define NOMOUTH 24 +#define REVIVESBYHEALING 23 +#define NOHUSK 24 +#define NOMOUTH 25 //organ slots #define ORGAN_SLOT_ADAMANTINE_RESONATOR "adamantine_resonator" diff --git a/code/modules/client/preferences/species.dm b/code/modules/client/preferences/species.dm index a590a3334b78..1aae0e58dbbc 100644 --- a/code/modules/client/preferences/species.dm +++ b/code/modules/client/preferences/species.dm @@ -41,7 +41,6 @@ data[species_id]["desc"] = species.get_species_description() data[species_id]["icon"] = sanitize_css_class_name(species.name) data[species_id]["use_skintones"] = species.use_skintones - data[species_id]["use_fur"] = species.use_fur data[species_id]["sexes"] = species.sexes data[species_id]["enabled_features"] = species.get_features() data[species_id]["perks"] = species.get_species_perks() diff --git a/code/modules/mob/living/carbon/human/_species.dm b/code/modules/mob/living/carbon/human/_species.dm index 6506195f1acb..9949cfccbc0a 100644 --- a/code/modules/mob/living/carbon/human/_species.dm +++ b/code/modules/mob/living/carbon/human/_species.dm @@ -163,7 +163,8 @@ GLOBAL_LIST_EMPTY(features_by_species) ///What gas does this species breathe? Used by suffocation screen alerts, most of actual gas breathing is handled by mutantlungs. See [life.dm][code/modules/mob/living/carbon/human/life.dm] var/breathid = "o2" - + ///are we a furry little guy? + var/uses_fur = FALSE ///What anim to use for dusting var/dust_anim = "dust-h" ///What anim to use for gibbing @@ -241,8 +242,6 @@ GLOBAL_LIST_EMPTY(features_by_species) ///A list containing outfits that will be overridden in the species_equip_outfit proc. [Key = Typepath passed in] [Value = Typepath of outfit you want to equip for this specific species instead]. var/list/outfit_override_registry = list() - ///are we furry little creatures - var/use_fur = FALSE ///health mod of a species var/maxhealthmod = 1 ///Path to BODYTYPE_CUSTOM species worn icons. An assoc list of ITEM_SLOT_X => /icon diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 1736ea531837..f893404cab6f 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -237,7 +237,7 @@ msg += "[t_He] look[p_s()] extremely disgusted.\n" var/apparent_blood_volume = blood_volume - if((dna.species.use_skintones || dna.species.use_fur)&& skin_tone == "albino") + if((dna.species.use_skintones)&& skin_tone == "albino") apparent_blood_volume -= 150 // enough to knock you down one tier switch(apparent_blood_volume) if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE) diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm index 2eec7eb2285b..ca2cff40edb5 100644 --- a/code/modules/surgery/bodyparts/_bodyparts.dm +++ b/code/modules/surgery/bodyparts/_bodyparts.dm @@ -772,12 +772,12 @@ species_flags_list = owner_species.species_traits limb_gender = (human_owner.physique == MALE) ? "m" : "f" - if(owner_species.use_skintones || owner_species.use_fur) + if(owner_species.use_skintones) skin_tone = human_owner.skin_tone else skin_tone = "" - if(((MUTCOLORS in owner_species.species_traits) || (DYNCOLORS in owner_species.species_traits))) //Ethereal code. Motherfuckers. + if(((MUTCOLORS in owner_species.species_traits) || (DYNCOLORS in owner_species.species_traits) || (SPECIES_FUR in owner_species.species_traits))) //Ethereal code. Motherfuckers. if(owner_species.fixed_mut_color) species_color = owner_species.fixed_mut_color else diff --git a/monkestation/code/__HELPERS/mobs.dm b/monkestation/code/__HELPERS/mobs.dm deleted file mode 100644 index cf7a6bba7065..000000000000 --- a/monkestation/code/__HELPERS/mobs.dm +++ /dev/null @@ -1,19 +0,0 @@ -GLOBAL_LIST_INIT(fur_tone_names, list( - "ffffff" = "Albino", - "ffb089" = "Chimp", - "aeafb3" = "Grey", - "bfd0ca" = "Snow", - "ce7d54" = "Orange", - "c47373" = "Red", - "f4e2d5" = "Cream" - )) - -GLOBAL_LIST_INIT(fur_tones, sort_list(list( - "ffffff", - "ffb089", - "aeafb3", - "bfd0ca", - "ce7d54", - "c47373", - "f4e2d5", - ))) diff --git a/monkestation/code/modules/client/preferences/species_features/simians.dm b/monkestation/code/modules/client/preferences/species_features/simians.dm index 2c131cd44835..a4f27e181827 100644 --- a/monkestation/code/modules/client/preferences/species_features/simians.dm +++ b/monkestation/code/modules/client/preferences/species_features/simians.dm @@ -1,39 +1,14 @@ -/datum/preference/choiced/fur_color +/datum/preference/color/fur_color category = PREFERENCE_CATEGORY_SECONDARY_FEATURES savefile_identifier = PREFERENCE_CHARACTER savefile_key = "fur" + relevant_species_trait = SPECIES_FUR -/datum/preference/choiced/fur_color/init_possible_values() - return GLOB.fur_tones - -/datum/preference/choiced/fur_color/compile_constant_data() - var/list/data = ..() - - data[CHOICED_PREFERENCE_DISPLAY_NAMES] = GLOB.fur_tone_names - - var/list/to_hex = list() - for (var/choice in get_choices()) - var/list/hsl = rgb2num("#[choice]", COLORSPACE_HSL) - - to_hex[choice] = list( - "lightness" = hsl[3], - "value" = "#[choice]", - ) - - data["to_hex"] = to_hex - - return data - -/datum/preference/choiced/fur_color/apply_to_human(mob/living/carbon/human/target, value) - if(target.dna.species.use_fur) - target.skin_tone = value - -/datum/preference/choiced/fur_color/is_accessible(datum/preferences/preferences) - if (!..(preferences)) - return FALSE - - var/datum/species/species_type = preferences.read_preference(/datum/preference/choiced/species) - return initial(species_type.use_fur) +/datum/preference/color/fur_color/apply_to_human(mob/living/carbon/human/target, value) + var/mob/user = usr + var/datum/species/species_type = user?.client.prefs.read_preference(/datum/preference/choiced/species) + if(initial(species_type.uses_fur)) + target.dna.features["mcolor"] = value /datum/preference/choiced/simian_tail savefile_key = "feature_tail_monkey" diff --git a/monkestation/code/modules/mob/living/carbon/human/species_type/simian.dm b/monkestation/code/modules/mob/living/carbon/human/species_type/simian.dm index 41a83238d5c8..5f4a06feda33 100644 --- a/monkestation/code/modules/mob/living/carbon/human/species_type/simian.dm +++ b/monkestation/code/modules/mob/living/carbon/human/species_type/simian.dm @@ -8,7 +8,8 @@ species_traits = list( EYECOLOR, LIPS, - NO_UNDERWEAR + NO_UNDERWEAR, + SPECIES_FUR, ) inherent_traits = list( TRAIT_VAULTING, @@ -17,7 +18,6 @@ ) use_skintones = FALSE - use_fur = TRUE inherent_biotypes = list( MOB_ORGANIC, @@ -30,6 +30,7 @@ skinned_type = /obj/item/stack/sheet/animalhide/monkey disliked_food = GROSS liked_food = FRUIT | MEAT + uses_fur = TRUE //deathsound = 'monkestation/sound/voice/simian/deathsound.ogg' species_language_holder = /datum/language_holder/monkey maxhealthmod = 0.85 //small = weak diff --git a/tgstation.dme b/tgstation.dme index f57484e2fda8..8516085b13f7 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -5469,7 +5469,6 @@ #include "interface\skin.dmf" #include "monkestation\code\__DEFINES\projectile.dm" #include "monkestation\code\__HELPERS\_lists.dm" -#include "monkestation\code\__HELPERS\mobs.dm" #include "monkestation\code\__HELPERS\reagents.dm" #include "monkestation\code\__HELPERS\turfs.dm" #include "monkestation\code\_onclick\hud\alert.dm" diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/data.ts b/tgui/packages/tgui/interfaces/PreferencesMenu/data.ts index 5e9dcb01ab15..b648b8054644 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/data.ts +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/data.ts @@ -43,7 +43,6 @@ export type Species = { icon: string; use_skintones: BooleanLike; - use_fur: BooleanLike; sexes: BooleanLike; enabled_features: string[]; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/monkestation/fur.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/monkestation/fur.tsx index d896df9f2195..6b0458613f7b 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/monkestation/fur.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/monkestation/fur.tsx @@ -1,60 +1,34 @@ -import { sortBy } from 'common/collections'; -import { Box, Stack } from '../../../../../../components'; -import { Feature, FeatureChoicedServerData, FeatureValueProps, StandardizedDropdown } from '../../base'; - -type HexValue = { - lightness: number; - value: string; -}; - -type FurServerData = FeatureChoicedServerData & { - display_names: NonNullable; - to_hex: Record; +import { Feature, FeatureValueProps, StandardizedPalette } from '../../base'; + +const furPresets = { + // these need to be short color (3 byte) compatible + '#ffffff': 'Albino', + '#ffb089': 'Chimp', + '#aeafb3': 'Grey', + '#bfd0ca': 'Snow', + '#ce7d54': 'Orange', + '#c47373': 'Red', + '#f4e2d5': 'Cream', }; -const sortHexValues = sortBy<[string, HexValue]>( - ([_, hexValue]) => -hexValue.lightness -); - -export const fur: Feature = { - name: 'Fur coloring', - component: (props: FeatureValueProps) => { - const { handleSetValue, serverData, value } = props; - - if (!serverData) { - return null; - } +export const fur: Feature = { + name: 'Fur Color', + small_supplemental: false, + predictable: false, + component: (props: FeatureValueProps) => { + const { handleSetValue, value, featureId, act } = props; return ( - key - )} - displayNames={Object.fromEntries( - Object.entries(serverData.display_names).map(([key, displayName]) => { - const hexColor = serverData.to_hex[key]; - - return [ - key, - - - - - - {displayName} - , - ]; - }) - )} + ); },