mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 03:59:59 +01:00
[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:
co-authored by
nikothedude
Giz
parent
13a4ec8654
commit
a856e05b35
@@ -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,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,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,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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user