diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm index cc51f9d3e87352..82c0729dfd488c 100644 --- a/code/__DEFINES/DNA.dm +++ b/code/__DEFINES/DNA.dm @@ -120,6 +120,7 @@ #define FEATURE_FLUFF_COLORS "fluff_colors" #define FEATURE_POD_HAIR_COLORS "pod_hair_colors" #define FEATURE_SYNTHETIC_CHARGING_METHOD "synthetic_charging_method" +#define FEATURE_HOLO_COLOR "holo_color" // DOPPLER FEATURES END // Other diff --git a/modular_doppler/modular_species/species_types/android/holosynth/code/holosynth_effects.dm b/modular_doppler/modular_species/species_types/android/holosynth/code/holosynth_effects.dm index e762d00bdbea2b..d2e921fc394ed1 100644 --- a/modular_doppler/modular_species/species_types/android/holosynth/code/holosynth_effects.dm +++ b/modular_doppler/modular_species/species_types/android/holosynth/code/holosynth_effects.dm @@ -1,6 +1,3 @@ -/// How opaque vs. see-through holosynths are -#define HOLOSYNTH_OPACITY 0.6 - /datum/component/holosynth_effects /// Tracks the emissive overlay glow for later deletion var/mutable_appearance/glow @@ -23,7 +20,7 @@ /datum/component/holosynth_effects/proc/make_hologram_glowless() - parent_as_human.add_filter("HOLO: Color and Transparent", 1, color_matrix_filter(parent_as_human.dna.features[FEATURE_MUTANT_COLOR], HOLOSYNTH_OPACITY * 255)) + parent_as_human.add_filter("HOLO: Color and Transparent", 1, color_matrix_filter(parent_as_human.dna.features[FEATURE_HOLO_COLOR])) var/atom/movable/scanline = new(null) scanline.icon = 'icons/effects/effects.dmi' scanline.icon_state = "scanline" @@ -49,5 +46,3 @@ parent_as_human.add_overlay(glow_appearance) LAZYADD(parent_as_human.update_overlays_on_z, glow_appearance) return glow_appearance - -#undef HOLOSYNTH_OPACITY diff --git a/modular_doppler/modular_species/species_types/android/holosynth/code/holosynth_prefs.dm b/modular_doppler/modular_species/species_types/android/holosynth/code/holosynth_prefs.dm new file mode 100644 index 00000000000000..d9eb1848da24ba --- /dev/null +++ b/modular_doppler/modular_species/species_types/android/holosynth/code/holosynth_prefs.dm @@ -0,0 +1,25 @@ +/// How opaque vs. see-through holosynths are +#define HOLOSYNTH_OPACITY 0.6 + +/datum/preference/color/holosynth_color + savefile_key = "feature_holo_color" + savefile_identifier = PREFERENCE_CHARACTER + category = PREFERENCE_CATEGORY_SECONDARY_FEATURES + +/datum/preference/color/holosynth_color/apply_to_human(mob/living/carbon/human/target, value) + if(isnull(value)) + return + var/list/rbg_value = rgb2num(value) + target.dna.features[FEATURE_HOLO_COLOR] = rgb(rbg_value[1], rbg_value[2], rbg_value[3], (HOLOSYNTH_OPACITY * 255)) + +/datum/preference/color/holosynth_color/create_default_value() + return sanitize_hexcolor("[pick("7F", "FF")][pick("7F", "FF")][pick("7F", "FF")]") + +/datum/preference/color/holosynth_color/is_accessible(datum/preferences/preferences) + . = ..() + var/species = preferences.read_preference(/datum/preference/choiced/species) + if(ispath(species, /datum/species/android/holosynth)) + return TRUE + return FALSE + +#undef HOLOSYNTH_OPACITY diff --git a/tgstation.dme b/tgstation.dme index 10c377675b762d..8687f44d6045c0 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -7597,6 +7597,7 @@ #include "modular_doppler\modular_species\species_types\android\holosynth\code\holopassthrough.dm" #include "modular_doppler\modular_species\species_types\android\holosynth\code\holosynth.dm" #include "modular_doppler\modular_species\species_types\android\holosynth\code\holosynth_effects.dm" +#include "modular_doppler\modular_species\species_types\android\holosynth\code\holosynth_prefs.dm" #include "modular_doppler\modular_species\species_types\android\holosynth\code\holosynth_projector.dm" #include "modular_doppler\modular_species\species_types\anthromorph\anthromorph.dm" #include "modular_doppler\modular_species\species_types\anthromorph\anthromorph_bodyparts.dm" diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/dopplershift_preferences/holo_color.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/dopplershift_preferences/holo_color.tsx new file mode 100644 index 00000000000000..efad38c9b9b1a4 --- /dev/null +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/dopplershift_preferences/holo_color.tsx @@ -0,0 +1,6 @@ +import { type Feature, FeatureColorInput } from '../base'; + +export const feature_holo_color: Feature = { + name: 'Holo color', + component: FeatureColorInput, +};