mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +01:00
Adds more depth to citizenship and religion choices at the character setup (#6785)
This pr adds some depth to the citizenship and religion choices at the character setup. Citizenship will now affect your loadout and mission as a consular officer. Religion will now affect your chaplain's religion name, bible name and sprite. Selecting any option will bring a small lore pop up for citizenship and religion choices.
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
S["med_record"] >> pref.med_record
|
||||
S["sec_record"] >> pref.sec_record
|
||||
S["gen_record"] >> pref.gen_record
|
||||
S["home_system"] >> pref.home_system
|
||||
S["citizenship"] >> pref.citizenship
|
||||
S["religion"] >> pref.religion
|
||||
S["nanotrasen_relation"] >> pref.nanotrasen_relation
|
||||
@@ -15,7 +14,6 @@
|
||||
S["med_record"] << pref.med_record
|
||||
S["sec_record"] << pref.sec_record
|
||||
S["gen_record"] << pref.gen_record
|
||||
S["home_system"] << pref.home_system
|
||||
S["citizenship"] << pref.citizenship
|
||||
S["religion"] << pref.religion
|
||||
S["nanotrasen_relation"] << pref.nanotrasen_relation
|
||||
@@ -34,7 +32,6 @@
|
||||
"ss13_characters" = list(
|
||||
"vars" = list(
|
||||
"nt_relation" = "nanotrasen_relation",
|
||||
"home_system",
|
||||
"citizenship",
|
||||
"religion"
|
||||
),
|
||||
@@ -58,7 +55,6 @@
|
||||
),
|
||||
"ss13_characters" = list(
|
||||
"nt_relation",
|
||||
"home_system",
|
||||
"citizenship",
|
||||
"religion","id" = 1,
|
||||
"ckey" = 1
|
||||
@@ -72,7 +68,6 @@
|
||||
"records_security" = pref.sec_record,
|
||||
"char_id" = pref.current_character,
|
||||
"nt_relation" = pref.nanotrasen_relation,
|
||||
"home_system" = pref.home_system,
|
||||
"citizenship" = pref.citizenship,
|
||||
"religion" = pref.religion,
|
||||
"id" = pref.current_character,
|
||||
@@ -80,12 +75,18 @@
|
||||
)
|
||||
|
||||
/datum/category_item/player_setup_item/general/background/sanitize_character()
|
||||
if(!pref.home_system)
|
||||
pref.home_system = "Unset"
|
||||
if(!pref.citizenship)
|
||||
pref.citizenship = "None"
|
||||
pref.citizenship = CITIZENSHIP_BIESEL
|
||||
if(!pref.religion)
|
||||
pref.religion = "None"
|
||||
pref.religion = RELIGION_NONE
|
||||
|
||||
var/datum/species/S = all_species[pref.species]
|
||||
|
||||
if(!(pref.citizenship in S.allowed_citizenships))
|
||||
pref.citizenship = CITIZENSHIP_BIESEL
|
||||
|
||||
if(!(pref.religion in S.allowed_religions))
|
||||
pref.religion = RELIGION_NONE
|
||||
|
||||
pref.nanotrasen_relation = sanitize_inlist(pref.nanotrasen_relation, COMPANY_ALIGNMENTS, initial(pref.nanotrasen_relation))
|
||||
|
||||
@@ -93,7 +94,6 @@
|
||||
var/list/dat = list(
|
||||
"<b>Background Information</b><br>",
|
||||
"[current_map.company_name] Relation: <a href='?src=\ref[src];nt_relation=1'>[pref.nanotrasen_relation]</a><br/>",
|
||||
"Home System: <a href='?src=\ref[src];home_system=1'>[pref.home_system]</a><br/>",
|
||||
"Citizenship: <a href='?src=\ref[src];citizenship=1'>[pref.citizenship]</a><br/>",
|
||||
"Religion: <a href='?src=\ref[src];religion=1'>[pref.religion]</a><br/>",
|
||||
"<br/><b>Records</b>:<br/>"
|
||||
@@ -112,46 +112,35 @@
|
||||
. = dat.Join()
|
||||
|
||||
/datum/category_item/player_setup_item/general/background/OnTopic(var/href,var/list/href_list, var/mob/user)
|
||||
var/datum/species/S = all_species[pref.species]
|
||||
if(href_list["nt_relation"])
|
||||
var/new_relation = input(user, "Choose your relation to NT. Note that this represents what others can find out about your character by researching your background, not what your character actually thinks.", "Character Preference", pref.nanotrasen_relation) as null|anything in COMPANY_ALIGNMENTS
|
||||
if(new_relation && CanUseTopic(user))
|
||||
pref.nanotrasen_relation = new_relation
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["home_system"])
|
||||
var/choice = input(user, "Please choose a home system.", "Character Preference", pref.home_system) as null|anything in home_system_choices + list("Unset","Other")
|
||||
else if(href_list["citizenship"])
|
||||
var/choice = input(user, "Please choose your current citizenship.", "Character Preference", pref.citizenship) as null|anything in S.allowed_citizenships
|
||||
if(!choice || !CanUseTopic(user))
|
||||
return TOPIC_NOACTION
|
||||
if(choice == "Other")
|
||||
var/raw_choice = sanitize(input(user, "Please enter a home system.", "Character Preference") as text|null, MAX_NAME_LEN)
|
||||
if(raw_choice && CanUseTopic(user))
|
||||
pref.home_system = raw_choice
|
||||
else
|
||||
pref.home_system = choice
|
||||
show_citizenship_menu(user, choice)
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["citizenship"])
|
||||
var/choice = input(user, "Please choose your current citizenship.", "Character Preference", pref.citizenship) as null|anything in citizenship_choices + list("None","Other")
|
||||
if(!choice || !CanUseTopic(user))
|
||||
return TOPIC_NOACTION
|
||||
if(choice == "Other")
|
||||
var/raw_choice = sanitize(input(user, "Please enter your current citizenship.", "Character Preference") as text|null, MAX_NAME_LEN)
|
||||
if(raw_choice && CanUseTopic(user))
|
||||
pref.citizenship = raw_choice
|
||||
else
|
||||
pref.citizenship = choice
|
||||
else if(href_list["set_citizenship"])
|
||||
pref.citizenship = (html_decode(href_list["set_citizenship"]))
|
||||
sanitize_character()
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["religion"])
|
||||
var/choice = input(user, "Please choose a religion.", "Character Preference", pref.religion) as null|anything in religion_choices + list("None","Other")
|
||||
var/choice = input(user, "Please choose a religion.", "Character Preference", pref.religion) as null|anything in S.allowed_religions
|
||||
if(!choice || !CanUseTopic(user))
|
||||
return TOPIC_NOACTION
|
||||
if(choice == "Other")
|
||||
var/raw_choice = sanitize(input(user, "Please enter a religon.", "Character Preference") as text|null, MAX_NAME_LEN)
|
||||
if(raw_choice)
|
||||
pref.religion = sanitize(raw_choice)
|
||||
else
|
||||
pref.religion = choice
|
||||
show_religion_menu(user, choice)
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["set_religion"])
|
||||
pref.religion = (html_decode(href_list["set_religion"]))
|
||||
sanitize_character()
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["set_medical_records"])
|
||||
@@ -173,3 +162,23 @@
|
||||
return TOPIC_REFRESH
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/category_item/player_setup_item/general/background/proc/show_citizenship_menu(mob/user, selected_citizenship)
|
||||
var/datum/citizenship/citizenship = SSrecords.citizenships[selected_citizenship]
|
||||
|
||||
if(citizenship)
|
||||
|
||||
var/list/dat = list("<center><b>[citizenship.name]</center></b>")
|
||||
dat += "<br><br><center><a href='?src=\ref[user.client];JSlink=wiki;wiki_page=[replacetext(citizenship.name, " ", "_")]'>Read the Wiki</a></center>"
|
||||
dat += "<br>[citizenship.description]"
|
||||
dat += "<br><center>\[<a href='?src=\ref[src];set_citizenship=[html_encode(citizenship.name)]'>Select</a>\]</center>"
|
||||
show_browser(user, dat.Join(), "window=citizenshippreview;size=400x500")
|
||||
|
||||
/datum/category_item/player_setup_item/general/background/proc/show_religion_menu(mob/user, selected_religion)
|
||||
var/datum/religion/religion = SSrecords.religions[selected_religion]
|
||||
|
||||
if(religion)
|
||||
var/list/dat = list("<center><b>[religion.name]</center></b>")
|
||||
dat += "<br>[religion.description]"
|
||||
dat += "<br><center>\[<a href='?src=\ref[src];set_religion=[html_encode(religion.name)]'>Select</a>\]</center>"
|
||||
show_browser(user, dat.Join(), "window=religionpreview;size=400x500")
|
||||
Reference in New Issue
Block a user