[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>
This commit is contained in:
SkyratBot
2021-11-23 18:36:22 +00:00
committed by GitHub
parent d5d8269ba6
commit 6ac6dae856
6 changed files with 33 additions and 8 deletions
+2 -1
View File
@@ -129,7 +129,8 @@ GLOBAL_DATUM(current_anonymous_theme, /datum/anonymous_theme)
* * target - mob for preferences and gender
*/
/datum/anonymous_theme/proc/anonymous_name(mob/target)
var/species_type = target.client.prefs.read_preference(/datum/preference/choiced/species)
var/datum/client_interface/client = GET_CLIENT(target)
var/species_type = client.prefs.read_preference(/datum/preference/choiced/species)
var/datum/species/species = new species_type
return species.random_name(target.gender,1)