From ffbea795184c7f2a9683f91e81f06f09f6959db0 Mon Sep 17 00:00:00 2001 From: desert-mote Date: Fri, 5 Jun 2026 20:02:09 +0200 Subject: [PATCH 1/2] initial --- code/__DEFINES/DNA.dm | 1 + .../holosynth/code/holosynth_effects.dm | 2 +- .../android/holosynth/code/holosynth_prefs.dm | 20 +++++++++++++++++++ tgstation.dme | 1 + .../dopplershift_preferences/holo_color.tsx | 6 ++++++ 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 modular_doppler/modular_species/species_types/android/holosynth/code/holosynth_prefs.dm create mode 100644 tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/dopplershift_preferences/holo_color.tsx 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..af70b69442de17 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 @@ -23,7 +23,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], HOLOSYNTH_OPACITY * 255)) var/atom/movable/scanline = new(null) scanline.icon = 'icons/effects/effects.dmi' scanline.icon_state = "scanline" 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..50fa54a1d4cc07 --- /dev/null +++ b/modular_doppler/modular_species/species_types/android/holosynth/code/holosynth_prefs.dm @@ -0,0 +1,20 @@ +/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]) + +/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 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, +}; From 28a8997345b709c2ed7e7b1d3c6cd6ffdb7ae0d4 Mon Sep 17 00:00:00 2001 From: desert-mote Date: Fri, 5 Jun 2026 20:14:34 +0200 Subject: [PATCH 2/2] alpha --- .../android/holosynth/code/holosynth_effects.dm | 7 +------ .../android/holosynth/code/holosynth_prefs.dm | 7 ++++++- 2 files changed, 7 insertions(+), 7 deletions(-) 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 af70b69442de17..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_HOLO_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 index 50fa54a1d4cc07..d9eb1848da24ba 100644 --- 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 @@ -1,3 +1,6 @@ +/// 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 @@ -7,7 +10,7 @@ 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]) + 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")]") @@ -18,3 +21,5 @@ if(ispath(species, /datum/species/android/holosynth)) return TRUE return FALSE + +#undef HOLOSYNTH_OPACITY