mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-09 17:13:36 +00:00
job titles
This commit is contained in:
@@ -335,7 +335,7 @@
|
||||
jobs += "<a href='?src=\ref[src];newjobban2=Chemist_RD_CMO;jobban4=\ref[M]'>Chemist+RD+CMO</a> <br>"
|
||||
jobs += "<a href='?src=\ref[src];newjobban2=Geneticist_RD_CMO;jobban4=\ref[M]'>Geneticist+RD+CMO</a> <br>"
|
||||
jobs += "<a href='?src=\ref[src];newjobban2=MD_CMO;jobban4=\ref[M]'>MD+CMO</a> <br>"
|
||||
jobs += "<a href='?src=\ref[src];newjobban2=Virologist_RD_CMO;jobban4=\ref[M]'>Virologist+RD+CMO</a> <br>"
|
||||
/*jobs += "<a href='?src=\ref[src];newjobban2=Virologist_RD_CMO;jobban4=\ref[M]'>Virologist+RD+CMO</a> <br>"*/
|
||||
jobs += "<a href='?src=\ref[src];newjobban2=Scientist_RD;jobban4=\ref[M]'>Scientist+RD</a> <br>"
|
||||
jobs += "<a href='?src=\ref[src];newjobban2=AI_Cyborg;jobban4=\ref[M]'>AI+Cyborg</a> <br>"
|
||||
jobs += "<a href='?src=\ref[src];newjobban2=Detective_HoS;jobban4=\ref[M]'>Detective+HoS</a> <br><br>"
|
||||
|
||||
@@ -315,6 +315,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!record_found)//We have to pick their role if they have no record.
|
||||
if(G_found.mind&&G_found.mind.assigned_role)//But they may have an assigned role already.
|
||||
new_character.mind.assigned_role = G_found.mind.assigned_role//Also makes sure our MODE people are equipped right later on.
|
||||
new_character.mind.role_alt_title = G_found.mind.role_alt_title
|
||||
else
|
||||
var/assigned_role = input("Please specify which job the character will be respawned as.", "Assigned role") as null|anything in get_all_jobs()
|
||||
if(!assigned_role) new_character.mind.assigned_role = "Assistant"//Defaults to assistant.
|
||||
|
||||
@@ -253,9 +253,9 @@
|
||||
src << alert("[rank] is not available. Please try another.")
|
||||
return 0
|
||||
|
||||
job_master.AssignRole(src, rank, 1)
|
||||
var/mob/living/carbon/human/character = create_character()
|
||||
var/icon/char_icon = getFlatIcon(character,0)//We're creating out own cache so it's not needed.
|
||||
job_master.AssignRole(character, rank, 1)
|
||||
job_master.EquipRank(character, rank, 1)
|
||||
EquipCustomItems(character)
|
||||
character.loc = pick(latejoin)
|
||||
@@ -327,7 +327,7 @@
|
||||
L.fields["sex"] = H.gender
|
||||
L.fields["age"] = H.age
|
||||
L.fields["id"] = md5("[H.real_name][H.mind.assigned_role]")
|
||||
L.fields["rank"] = H.mind.assigned_role
|
||||
L.fields["rank"] = H.mind.role_alt_title ? H.mind.role_alt_title : H.mind.assigned_role
|
||||
L.fields["b_type"] = H.dna.b_type
|
||||
L.fields["b_dna"] = H.dna.unique_enzymes
|
||||
L.fields["enzymes"] = H.dna.struc_enzymes
|
||||
|
||||
@@ -104,6 +104,8 @@ datum/preferences
|
||||
job_engsec_med = 0
|
||||
job_engsec_low = 0
|
||||
|
||||
list/job_alt_titles = new() // the default name of a job like "Medical Doctor"
|
||||
|
||||
flavor_text = ""
|
||||
|
||||
// slot stuff
|
||||
@@ -213,6 +215,19 @@ datum/preferences
|
||||
proc/closesave(mob/user)
|
||||
user << browse(null, "window=saves;size=300x640")
|
||||
|
||||
proc/GetAltTitle(datum/job/job)
|
||||
return job_alt_titles.Find(job.title) > 0 \
|
||||
? job_alt_titles[job.title] \
|
||||
: job.title
|
||||
|
||||
proc/SetAltTitle(datum/job/job, new_title)
|
||||
// remove existing entry
|
||||
if(job_alt_titles.Find(job.title))
|
||||
job_alt_titles -= job.title
|
||||
// add one if it's not default
|
||||
if(job.title != new_title)
|
||||
job_alt_titles[job.title] = new_title
|
||||
|
||||
proc/SetChoices(mob/user, changedjob)
|
||||
var/HTML = "<body>"
|
||||
HTML += "<tt><center>"
|
||||
@@ -246,14 +261,17 @@ datum/preferences
|
||||
HTML += "<font color=orange>\[Low]</font>"
|
||||
else
|
||||
HTML += "<font color=red>\[NEVER]</font>"
|
||||
HTML += "</a><br>"
|
||||
if(job.alt_titles)
|
||||
HTML += "</a> <a href=\"byond://?src=\ref[user];preferences=1;alt_title=1;job=\ref[job]\">\[[GetAltTitle(job)]\]</a><br>"
|
||||
else
|
||||
HTML += "</a><br>"
|
||||
|
||||
HTML += "<br>"
|
||||
HTML += "<a href=\"byond://?src=\ref[user];preferences=1;occ=0;job=cancel\">\[Done\]</a>"
|
||||
HTML += "</center></tt>"
|
||||
|
||||
user << browse(null, "window=preferences")
|
||||
user << browse(HTML, "window=mob_occupation;size=320x600")
|
||||
user << browse(HTML, "window=mob_occupation;size=350x600")
|
||||
return
|
||||
|
||||
|
||||
@@ -378,6 +396,14 @@ datum/preferences
|
||||
|
||||
return 1
|
||||
|
||||
if(link_tags["alt_title"] && link_tags["job"])
|
||||
var/datum/job/job = locate(link_tags["job"])
|
||||
var/choices = list(job.title) + job.alt_titles
|
||||
var/choice = input("Pick a title for [job.title].", "Character Generation", GetAltTitle(job)) as anything in choices | null
|
||||
if(choice)
|
||||
SetAltTitle(job, choice)
|
||||
SetChoices(user)
|
||||
|
||||
if(link_tags["real_name"])
|
||||
var/new_name
|
||||
|
||||
@@ -638,6 +664,7 @@ datum/preferences
|
||||
job_engsec_high = 0
|
||||
job_engsec_med = 0
|
||||
job_engsec_low = 0
|
||||
job_alt_titles = new()
|
||||
underwear = 1
|
||||
be_special = 0
|
||||
be_random_name = 0
|
||||
|
||||
@@ -115,6 +115,8 @@ datum/preferences/proc/savefile_save(mob/user, slot)
|
||||
F["job_engsec_med"] << src.job_engsec_med
|
||||
F["job_engsec_low"] << src.job_engsec_low
|
||||
|
||||
F["job_alt_titles"] << job_alt_titles
|
||||
|
||||
//Body data
|
||||
F["hair_red"] << src.r_hair
|
||||
F["hair_green"] << src.g_hair
|
||||
@@ -212,6 +214,10 @@ datum/preferences/proc/savefile_load(mob/user, slot)
|
||||
F["job_engsec_med"] >> src.job_engsec_med
|
||||
F["job_engsec_low"] >> src.job_engsec_low
|
||||
|
||||
F["job_alt_titles"] >> job_alt_titles
|
||||
if(!job_alt_titles)
|
||||
job_alt_titles = new()
|
||||
|
||||
//NOTE: Conversion things go inside this if statement
|
||||
//When updating the save file remember to add 1 to BOTH the savefile constants
|
||||
//Also take the old conversion things that no longer apply out of this if
|
||||
|
||||
Reference in New Issue
Block a user