Accentuate the positive with **Personality**: A (soft) mood rework (#92941)

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
This commit is contained in:
MrMelbert
2025-10-02 19:00:13 +00:00
committed by GitHub
co-authored by SmArtKar
parent 0124adacc7
commit 3ea7b03369
110 changed files with 2557 additions and 314 deletions
@@ -0,0 +1,16 @@
/**
* Replace a quirk with a personality
*
* If this is accompanied with removal of a quirk,
* you don't need to worry about handling that here -
* quirk sanitization happens AFTER migration
*/
/datum/preferences/proc/migrate_quirk_to_personality(quirk_to_migrate, datum/personality/new_typepath)
ASSERT(istext(quirk_to_migrate) && ispath(new_typepath, /datum/personality))
if(!(quirk_to_migrate in all_quirks))
return
var/list/personalities = read_preference(/datum/preference/personality)
if(LAZYLEN(personalities) >= CONFIG_GET(number/max_personalities))
return
LAZYADD(personalities, initial(new_typepath.savefile_key))
write_preference(GLOB.preference_entries[/datum/preference/personality], personalities)