diff --git a/code/datums/quirks/negative_quirks/blindness.dm b/code/datums/quirks/negative_quirks/blindness.dm index ce57e946fe9..d0af915dc32 100644 --- a/code/datums/quirks/negative_quirks/blindness.dm +++ b/code/datums/quirks/negative_quirks/blindness.dm @@ -10,8 +10,15 @@ quirk_flags = QUIRK_HUMAN_ONLY|QUIRK_CHANGES_APPEARANCE mail_goodies = list(/obj/item/clothing/glasses/sunglasses, /obj/item/cane/white) +/datum/quirk_constant_data/blindfoldcolor + associated_typepath = /datum/quirk/item_quirk/blindness + customization_options = list(/datum/preference/color/blindfold_color) + /datum/quirk/item_quirk/blindness/add_unique(client/client_source) - give_item_to_holder(/obj/item/clothing/glasses/blindfold/white, list(LOCATION_EYES = ITEM_SLOT_EYES, LOCATION_BACKPACK = ITEM_SLOT_BACKPACK, LOCATION_HANDS = ITEM_SLOT_HANDS)) + var/obj/item/clothing/glasses/blindfold/white/blindfold = new + blindfold.add_atom_colour(client_source?.prefs.read_preference(/datum/preference/color/blindfold_color), FIXED_COLOUR_PRIORITY) + blindfold.colored_before = TRUE + give_item_to_holder(blindfold, list(LOCATION_EYES = ITEM_SLOT_EYES, LOCATION_BACKPACK = ITEM_SLOT_BACKPACK, LOCATION_HANDS = ITEM_SLOT_HANDS)) /datum/quirk/item_quirk/blindness/add(client/client_source) quirk_holder.become_blind(QUIRK_TRAIT) diff --git a/code/modules/client/preferences/blindfold_color.dm b/code/modules/client/preferences/blindfold_color.dm new file mode 100644 index 00000000000..9e6504579ac --- /dev/null +++ b/code/modules/client/preferences/blindfold_color.dm @@ -0,0 +1,14 @@ +/// Preference for the roundstart color of the blindfold given by the Blindness quirk. +/datum/preference/color/blindfold_color + category = PREFERENCE_CATEGORY_MANUALLY_RENDERED + savefile_key = "blindfold_color" + savefile_identifier = PREFERENCE_CHARACTER + +/datum/preference/color/blindfold_color/is_accessible(datum/preferences/preferences) + if (!..(preferences)) + return FALSE + + return /datum/quirk/item_quirk/blindness::name in preferences.all_quirks + +/datum/preference/color/blindfold_color/apply_to_human(mob/living/carbon/human/target, value) + return diff --git a/tgstation.dme b/tgstation.dme index 803e8fadfaa..2d6dbda22bc 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3664,6 +3664,7 @@ #include "code\modules\client\preferences\ambient_occlusion.dm" #include "code\modules\client\preferences\assets.dm" #include "code\modules\client\preferences\auto_fit_viewport.dm" +#include "code\modules\client\preferences\blindfold_color.dm" #include "code\modules\client\preferences\body_type.dm" #include "code\modules\client\preferences\broadcast_login_logout.dm" #include "code\modules\client\preferences\clothing.dm" diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/blindfold_color.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/blindfold_color.tsx new file mode 100644 index 00000000000..8a59ced57a8 --- /dev/null +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/blindfold_color.tsx @@ -0,0 +1,6 @@ +import { Feature, FeatureColorInput } from '../base'; + +export const blindfold_color: Feature = { + name: 'Blindfold color', + component: FeatureColorInput, +};