Files
Bubberstation/code/modules/client/preferences/glasses.dm
SkyratBot 52a70b1df4 [MIRROR] Adds informed default values for a bunch of preferences (to produce less outlandish random characters) (#28688)
* Adds informed default values for a bunch of preferences (to produce less outlandish random characters)

* Update felinid.dm

* Update lizard.dm

* Update monkey.dm

* [READY] the unfuckening of clothing rendering (#79784)

refactors clothing visors to use the same system, including masks being
toggled and stuff like riot helmets toggling using the same system and
welding helmets and such
adds a handler that updates all visuals in slots that an item has
obscured, each visual proc calls that so you no longer have weird shit
happening like having to hardcode a proc for heads where you need to
also update hair, mask, glasses everytime you put on an item

one thing here i could also do is make check_obscured_slots return the
HIDEX flags instead of item slots, because in 99% of cases its hardcoded
to be ran against specific slots (like eye code running it against the
glasses slot), but maintainers didnt seem to like that :/

fuck this 2003 bullshit

theres like several bugs here i fixed but i forgot them all and they are
small

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
2024-07-20 17:46:17 +05:30

27 lines
867 B
Plaintext

/datum/preference/choiced/glasses
category = PREFERENCE_CATEGORY_MANUALLY_RENDERED
savefile_key = "glasses"
savefile_identifier = PREFERENCE_CHARACTER
should_generate_icons = TRUE
/datum/preference/choiced/glasses/create_default_value()
return "Random"
/datum/preference/choiced/glasses/init_possible_values()
return assoc_to_keys(GLOB.nearsighted_glasses) + "Random"
/datum/preference/choiced/glasses/icon_for(value)
if (value == "Random")
return icon('icons/effects/random_spawners.dmi', "questionmark")
else
return icon('icons/obj/clothing/glasses.dmi', "glasses_[LOWER_TEXT(value)]")
/datum/preference/choiced/glasses/is_accessible(datum/preferences/preferences)
if (!..(preferences))
return FALSE
return "Nearsighted" in preferences.all_quirks
/datum/preference/choiced/glasses/apply_to_human(mob/living/carbon/human/target, value)
return