Files
Bubberstation/code/modules/client/preferences/random.dm
SkyratBot 6ac6dae856 [MIRROR] Fix random names breaking preferences [MDB IGNORE] (#9370)
* Fix random names breaking preferences (#62668)

The randomization (specifically from the random names secret) overrode your preferences, this fixes that.

* Fix random names breaking preferences

* Should fix the issue with that damn unit test.

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2021-11-23 13:36:22 -05:00

54 lines
1.6 KiB
Plaintext

/datum/preference/choiced/random_body
category = PREFERENCE_CATEGORY_NON_CONTEXTUAL
savefile_key = "random_body"
savefile_identifier = PREFERENCE_CHARACTER
can_randomize = FALSE
/datum/preference/choiced/random_body/apply_to_human(mob/living/carbon/human/target, value)
return
/datum/preference/choiced/random_body/init_possible_values()
return list(
RANDOM_ANTAG_ONLY,
RANDOM_DISABLED,
RANDOM_ENABLED,
)
/datum/preference/choiced/random_body/create_default_value()
return RANDOM_DISABLED
/datum/preference/toggle/random_hardcore
category = PREFERENCE_CATEGORY_NON_CONTEXTUAL
savefile_key = "random_hardcore"
savefile_identifier = PREFERENCE_CHARACTER
can_randomize = FALSE
default_value = FALSE
/datum/preference/toggle/random_hardcore/apply_to_human(mob/living/carbon/human/target, value)
return
/datum/preference/toggle/random_hardcore/is_accessible(datum/preferences/preferences)
if (!..(preferences))
return FALSE
return preferences.parent?.get_exp_living(pure_numeric = TRUE) >= PLAYTIME_HARDCORE_RANDOM // SKYRAT EDIT - ORIGINAL: return preferences.parent.get_exp_living(pure_numeric = TRUE) >= PLAYTIME_HARDCORE_RANDOM
/datum/preference/choiced/random_name
category = PREFERENCE_CATEGORY_NON_CONTEXTUAL
savefile_key = "random_name"
savefile_identifier = PREFERENCE_CHARACTER
can_randomize = FALSE
/datum/preference/choiced/random_name/apply_to_human(mob/living/carbon/human/target, value)
return
/datum/preference/choiced/random_name/init_possible_values()
return list(
RANDOM_ANTAG_ONLY,
RANDOM_DISABLED,
RANDOM_ENABLED,
)
/datum/preference/choiced/random_name/create_default_value()
return RANDOM_DISABLED