mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 02:25:06 +01:00
Fix multiple pref issues (#18083)
* fix tail alyering pref * . * . * . * . * - * return * fix that * write needs save after * urg * ban slot change mid round * - * . * properly save * . * queue to ss * read current * performance * . * . * bit better optimized * no resetsploit * this works at least but is it proper (#13) * this works at least but is it proper * Update changeling.dm * this too... * dont be private * fix asset ss --------- Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
/mob/living/carbon/human/proc/birthday(var/birthday = 0)
|
||||
var/msg
|
||||
var/lastyear = read_preference(/datum/preference/numeric/human/last_bday_note)
|
||||
write_preference_directly(/datum/preference/numeric/human/last_bday_note, GLOB.world_time_year) //We only want to ask once a year per character, this persists, update early in case of shenanigans
|
||||
write_preference_directly(/datum/preference/numeric/human/last_bday_note, GLOB.world_time_year, WRITE_PREF_MANUAL) //We only want to ask once a year per character, this persists, update early in case of shenanigans
|
||||
if(birthday) //woo
|
||||
msg = "Today is your birthday! Do you want to increase your character's listed age?"
|
||||
if(read_preference(/datum/preference/toggle/human/bday_announce))
|
||||
@@ -34,6 +34,6 @@
|
||||
var/howmuch = GLOB.world_time_year - lastyear
|
||||
age += howmuch
|
||||
to_chat(src, span_notice("You are now [age]! Happy birthday!"))
|
||||
write_preference_directly(/datum/preference/numeric/human/age, age) //Set the age on the character sheet
|
||||
write_preference_directly(/datum/preference/numeric/human/age, age, WRITE_PREF_MANUAL) //Set the age on the character sheet
|
||||
|
||||
client?.prefs.save_character() //Save the info
|
||||
SScharacter_setup.queue_preferences_save(client?.prefs)
|
||||
|
||||
Reference in New Issue
Block a user