[MIRROR] Adds a little button to quirks that allows for relatively easy customization [MDB IGNORE] (#24953)

* Adds a little button to quirks that allows for relatively easy customization

* Fixing diffs

---------

Co-authored-by: nikothedude <59709059+nikothedude@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-11-13 07:37:09 -05:00
committed by GitHub
co-authored by nikothedude Giz
parent 13a4ec8654
commit a856e05b35
20 changed files with 294 additions and 45 deletions
+2 -2
View File
@@ -409,13 +409,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if (!preference.is_accessible(src))
continue
LAZYINITLIST(preferences[preference.category])
var/value = read_preference(preference.type)
var/data = preference.compile_ui_data(user, value)
LAZYINITLIST(preferences[preference.category])
preferences[preference.category][preference.savefile_key] = data
for (var/datum/preference_middleware/preference_middleware as anything in middleware)
var/list/append_character_preferences = preference_middleware.get_character_preferences(user)
if (isnull(append_character_preferences))
@@ -1,5 +1,5 @@
/datum/preference/choiced/food_allergy
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
savefile_key = "food_allergy"
savefile_identifier = PREFERENCE_CHARACTER
can_randomize = FALSE
+1 -1
View File
@@ -1,5 +1,5 @@
/datum/preference/choiced/glasses
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
savefile_key = "glasses"
savefile_identifier = PREFERENCE_CHARACTER
should_generate_icons = TRUE
+1 -1
View File
@@ -1,5 +1,5 @@
/datum/preference/choiced/language
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
savefile_key = "language"
savefile_identifier = PREFERENCE_CHARACTER
@@ -33,11 +33,16 @@
for (var/quirk_name in quirks)
var/datum/quirk/quirk = quirks[quirk_name]
var/datum/quirk_constant_data/constant_data = GLOB.all_quirk_constant_data[quirk]
var/list/datum/preference/customization_options = constant_data?.get_customization_data()
quirk_info[sanitize_css_class_name(quirk_name)] = list(
"description" = initial(quirk.desc),
"icon" = initial(quirk.icon),
"name" = quirk_name,
"value" = initial(quirk.value),
"customizable" = constant_data?.is_customizable(),
"customization_options" = customization_options,
"veteran_only" = initial(quirk.veteran_only), // SKYRAT EDIT - Veteran quirks
)
@@ -2,7 +2,7 @@
/datum/preference/color/paint_color
savefile_key = "paint_color"
savefile_identifier = PREFERENCE_CHARACTER
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
/datum/preference/color/paint_color/is_accessible(datum/preferences/preferences)
if (!..(preferences))
+1 -1
View File
@@ -1,5 +1,5 @@
/datum/preference/choiced/phobia
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
savefile_key = "phobia"
savefile_identifier = PREFERENCE_CHARACTER
@@ -1,5 +1,5 @@
/datum/preference/choiced/prosthetic
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
savefile_key = "prosthetic"
savefile_identifier = PREFERENCE_CHARACTER