diff --git a/code/game/birthday.dm b/code/game/birthday.dm index 933d9f020d3..465675a8c94 100644 --- a/code/game/birthday.dm +++ b/code/game/birthday.dm @@ -1,7 +1,7 @@ /mob/living/carbon/human/proc/consider_birthday() if(!bday_month || !bday_day) //If we don't have one of these set, don't worry about it return - if(!real_name == client.prefs.real_name) //let's not celebrate the birthday of that weird mob we got dropped into + if(real_name != client.prefs.real_name) //let's not celebrate the birthday of that weird mob we got dropped into return if(!(client.prefs.last_birthday_notification < world_time_year)) //you only get notified once a year return @@ -14,18 +14,24 @@ /mob/living/carbon/human/proc/birthday(var/birthday = 0) var/msg + var/lastyear = client.prefs.last_birthday_notification + client.prefs.last_birthday_notification = world_time_year //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(client.prefs.bday_announce) + var/list/sounds = list('sound/voice/BIRTH1.ogg','sound/voice/BIRTH2.ogg') + var/oursound = pickweight(sounds) + command_announcement.Announce("Confirmed presence of BIRTHDAY aboard the station! It is [src.real_name]'s birthday or similar sort of celebration, name day, hatchday, WHATEVER! We encourage you to go find [src.real_name] and show them how we celebrate around here! Have a secure day!", "BIRTHDAY!", oursound) + to_world("We did it") else msg = "Your birthday has passed! Do you want to increase your character's listed age?" //sad, but thus is the life of an adult if(tgui_alert(src, msg,"BIRTHDAY! ([bday_month]/[bday_day])",list("Level me up, baby","No way, I'mma stay young forever")) == "Level me up, baby") - if(client.prefs.last_birthday_notification == 0) //We've never been asked, so let's just assume you were keeping track before now and only add 1 + if(lastyear == 0) //We've never been asked, so let's just assume you were keeping track before now and only add 1 age += 1 else - var/howmuch = world_time_year - client.prefs.last_birthday_notification + var/howmuch = world_time_year - lastyear age += howmuch to_chat(src, "You are now [age]! Happy birthday!") client.prefs.age = age //Set the age on the character sheet - client.prefs.last_birthday_notification = world_time_year //We only want to ask once a year per character, this persists client.prefs.save_character() //Save the info diff --git a/code/modules/client/preference_setup/general/01_basic.dm b/code/modules/client/preference_setup/general/01_basic.dm index ff9f89193f7..32aa12ee12f 100644 --- a/code/modules/client/preference_setup/general/01_basic.dm +++ b/code/modules/client/preference_setup/general/01_basic.dm @@ -20,6 +20,7 @@ S["bday_month"] >> pref.bday_month S["bday_day"] >> pref.bday_day S["last_bday_note"] >> pref.last_birthday_notification + S["bday_announce"] >> pref.bday_announce S["spawnpoint"] >> pref.spawnpoint S["OOC_Notes"] >> pref.metadata @@ -33,6 +34,7 @@ S["bday_month"] << pref.bday_month S["bday_day"] << pref.bday_day S["last_bday_note"] << pref.last_birthday_notification + S["bday_announce"] << pref.bday_announce S["spawnpoint"] << pref.spawnpoint S["OOC_Notes"] << pref.metadata @@ -84,7 +86,7 @@ . += "
" . += "Biological Sex: [gender2text(pref.biological_gender)]
" . += "Pronouns: [gender2text(pref.identifying_gender)]
" - . += "Age: [pref.age] Birthday: [pref.bday_month]/[pref.bday_day]
" + . += "Age: [pref.age] Birthday: [pref.bday_month]/[pref.bday_day] - Announce?: [pref.bday_announce ? "Yes" : "No"]
" . += "Spawn Point: [pref.spawnpoint]
" if(config.allow_Metadata) . += "OOC Notes: Edit
" @@ -189,6 +191,10 @@ pref.bday_day = 0 return TOPIC_REFRESH + else if(href_list["bday_announce"]) + pref.bday_announce = !pref.bday_announce + return TOPIC_REFRESH + else if(href_list["spawnpoint"]) var/list/spawnkeys = list() for(var/spawntype in spawntypes) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index c6c6e291fba..570cdcf144f 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -41,6 +41,7 @@ var/list/preferences_datums = list() var/bday_month = 0 //Birthday month var/bday_day = 0 //Birthday day var/last_birthday_notification = 0 //The last year we were notified about our birthday + var/bday_announce = FALSE //Public announcement for birthdays var/spawnpoint = "Arrivals Shuttle" //where this character will spawn (0-2). var/b_type = "A+" //blood type (not-chooseable) var/backbag = 2 //backpack type diff --git a/sound/voice/BIRTH1.ogg b/sound/voice/BIRTH1.ogg new file mode 100644 index 00000000000..a2936b34696 Binary files /dev/null and b/sound/voice/BIRTH1.ogg differ diff --git a/sound/voice/BIRTH2.ogg b/sound/voice/BIRTH2.ogg new file mode 100644 index 00000000000..a19b757f896 Binary files /dev/null and b/sound/voice/BIRTH2.ogg differ