diff --git a/baystation12.dme b/baystation12.dme index 98fc485a45f..a2905e53ebb 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -746,6 +746,7 @@ #include "code\modules\client\client defines.dm" #include "code\modules\client\client procs.dm" #include "code\modules\client\preferences.dm" +#include "code\modules\client\preferences_factions.dm" #include "code\modules\client\preferences_gear.dm" #include "code\modules\client\preferences_savefile.dm" #include "code\modules\client\preferences_spawnpoints.dm" diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 0aee3c0cf33..3ae9f5dd586 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -77,6 +77,12 @@ datum/preferences var/language = "None" //Secondary language var/list/gear //Custom/fluff item loadout. + //Some faction information. + var/home_system = "None" //System of birth. + var/citizenship = "None" //Current home system. + var/faction = "None" //Antag faction/general associated faction. + var/religion = "None" //Religious association. + //Mob preview var/icon/preview_icon = null var/icon/preview_icon_front = null @@ -404,7 +410,14 @@ datum/preferences dat += "
Body Color
" dat += "Change Color
__
" + dat += "

Background Information
" + dat += "Home system: [home_system]
" + dat += "Citizenship: [citizenship]
" + dat += "Faction: [faction]
" + dat += "Religion: [religion]
" + dat += "

" + if(jobban_isbanned(user, "Syndicate")) dat += "You are banned from antagonist roles." src.be_special = 0 @@ -1337,6 +1350,48 @@ datum/preferences return spawnpoint = choice + if("home_system") + var/choice = input(user, "Please choose a home system.") as null|anything in home_system_choices + list("None","Other") + if(!choice) + return + if(choice == "Other") + var/raw_choice = input(user, "Please enter a home system.") as text|null + if(raw_choice) + home_system = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN)) + return + home_system = choice + if("citizenship") + var/choice = input(user, "Please choose your current citizenship.") as null|anything in citizenship_choices + list("None","Other") + if(!choice) + return + if(choice == "Other") + var/raw_choice = input(user, "Please enter your current citizenship.", "Character Preference") as text|null + if(raw_choice) + citizenship = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN)) + return + citizenship = choice + if("faction") + var/choice = input(user, "Please choose a faction to work for.") as null|anything in faction_choices + list("None","Other") + if(!choice) + return + if(choice == "Other") + var/raw_choice = input(user, "Please enter a faction.") as text|null + if(raw_choice) + faction = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN)) + return + faction = choice + if("religion") + var/choice = input(user, "Please choose a religion.") as null|anything in religion_choices + list("None","Other") + if(!choice) + return + if(choice == "Other") + var/raw_choice = input(user, "Please enter a religon.") as text|null + if(raw_choice) + religion = sanitize(copytext(raw_choice,1,MAX_MESSAGE_LEN)) + return + religion = choice + + else switch(href_list["preference"]) if("gender") diff --git a/code/modules/client/preferences_factions.dm b/code/modules/client/preferences_factions.dm new file mode 100644 index 00000000000..7b158be0eb1 --- /dev/null +++ b/code/modules/client/preferences_factions.dm @@ -0,0 +1,40 @@ +var/global/list/citizenship_choices = list( + "Earth", + "Mars", + "Moghes", + "Ahdomai", + "Qerrbalak" + ) + +var/global/list/home_system_choices = list( + "Sol", + "Nyx", + "Tau Ceti", + "Epsilon Ursae Majoris", + "S'randarr" + ) + +var/global/list/faction_choices = list( + "Sol Central", + "Vey Med", + "Aleph", + "Einstein Engines", + "Free Trade Union", + "NanoTrasen", + "Ward-Takahashi GMB", + "Gilthari Exports", + "Grayson Manufactories Ltd.", + "Aether Atmospherics", + "Zeng-Hu Pharmaceuticals", + "Hesphaistos Industries" + ) + +var/global/list/religion_choices = list( + "Unitarianism", + "Hinduism", + "Buddhist", + "Islamic", + "Christian", + "Agnostic", + "Deist" + ) \ No newline at end of file diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 896be32bace..b8f1be845c9 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -166,6 +166,10 @@ S["skill_specialization"] >> skill_specialization S["organ_data"] >> organ_data S["gear"] >> gear + S["home_system"] >> home_system + S["citizenship"] >> citizenship + S["faction"] >> faction + S["religion"] >> religion S["nanotrasen_relation"] >> nanotrasen_relation //S["skin_style"] >> skin_style @@ -225,6 +229,11 @@ if(!gear) src.gear = list() //if(!skin_style) skin_style = "Default" + if(!home_system) home_system = "None" + if(!citizenship) citizenship = "None" + if(!faction) faction = "None" + if(!religion) religion = "None" + return 1 /datum/preferences/proc/save_character() @@ -297,6 +306,10 @@ S["skill_specialization"] << skill_specialization S["organ_data"] << organ_data S["gear"] << gear + S["home_system"] << home_system + S["citizenship"] << citizenship + S["faction"] << faction + S["religion"] << religion S["nanotrasen_relation"] << nanotrasen_relation //S["skin_style"] << skin_style diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 0f18e02cf38..0419924af75 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -330,6 +330,9 @@ if(character.mind.assigned_role != "Cyborg") data_core.manifest_inject(character) ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc. //TODO!!!!! ~Carn + + //Grab some data from the character prefs for use in random news procs. + AnnounceArrival(character, rank, join_message) else