"}
if(config.allow_Metadata)
dat += "OOC Notes: Edit "
return dat
/datum/preferences/proc/getPrefLevelText(var/datum/job/job)
var/list/jobs = get_pref(/datum/preference_setting/assoc_list_setting/jobs)
switch(jobs[job.title])
if(JOB_PREF_HIGH)
return "High"
if(JOB_PREF_MED)
return "Medium"
if(JOB_PREF_LOW)
return "Low"
return "NEVER"
/datum/preferences/proc/SetJobsChoice(mob/user, limit = 16, list/splitJobs = list("Chief Engineer", "Head of Security"), widthPerColumn = 295, height = 620)
if(!job_master)
return
//limit - The amount of jobs allowed per column. Defaults to 17 to make it look nice.
//splitJobs - Allows you split the table by job. You can make different tables for each department by including their heads. Defaults to CE to make it look nice.
//width - Screen' width. Defaults to 550 to make it look nice.
//height - Screen's height. Defaults to 500 to make it look nice.
var/width = widthPerColumn
var/HTML = ""
HTML += {""} //the event.button == 1 check is brought to you by legacy IE running in wine
HTML += {"
Choose occupation chances
Left-click to raise an occupation preference, right-click to lower it.
"}
var/index = -1
//The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows.
var/datum/job/lastJob
if (!job_master)
return
for(var/datum/job/job in job_master.occupations)
index += 1
if((index >= limit) || (job.title in splitJobs))
width += widthPerColumn
if((index < limit) && (lastJob != null))
//If the cells were broken up by a job in the splitJob list then it will fill in the rest of the cells with
//the last job's selection color. Creating a rather nice effect.
for(var/i = 0, i < (limit - index), i += 1)
HTML += "
"
continue
if(!job.player_old_enough(user.client))
var/available_in_days = job.available_in_days(user.client)
HTML += "[rank]
\[IN [(available_in_days)] DAYS]
"
continue
if((rank in command_positions) || (rank == "AI"))//Bold head jobs
if(job.alt_titles)
HTML += "[GetPlayerAltTitle(job)]"
else
HTML += "[rank]"
else
if(job.alt_titles)
HTML += "[GetPlayerAltTitle(job)]"
else
HTML += "[rank]"
HTML += "
"
if(appearance_isbanned(user))
dat += "You are banned from using custom names and appearances. You can continue to adjust your characters, but you will be randomised once you join the game. "
switch(current_tab)
if(CHARACTER_SETUP)
dat = setup_character_options(dat, user)
if(UI_SETUP)
dat = setup_UI(dat, user)
if(GENERAL_SETUP)
dat = setup_special(dat, user)
if(SPECIAL_ROLES_SETUP)
dat = configure_special_roles(dat, user)
dat += "
"
/datum/preferences/proc/SetDisabilities(mob/user)
var/HTML = ""
HTML += {"
Choose disabilities
"}
HTML += ShowDisabilityState(user,DISABILITY_FLAG_NEARSIGHTED,"Needs Glasses")
HTML += ShowDisabilityState(user,DISABILITY_FLAG_FAT, "Obese")
HTML += ShowDisabilityState(user,DISABILITY_FLAG_EPILEPTIC, "Seizures")
HTML += ShowDisabilityState(user,DISABILITY_FLAG_DEAF, "Deaf")
HTML += ShowDisabilityState(user,DISABILITY_FLAG_BLIND, "Blind")
HTML += ShowDisabilityState(user,DISABILITY_FLAG_MUTE, "Mute")
HTML += ShowDisabilityState(user,DISABILITY_FLAG_VEGAN, "Vegan")
HTML += ShowDisabilityState(user,DISABILITY_FLAG_ASTHMA, "Asthma")
HTML += ShowDisabilityState(user,DISABILITY_FLAG_LACTOSE, "Lactose Intolerant")
HTML += ShowDisabilityState(user,DISABILITY_FLAG_LISP, "Lisp")
HTML += ShowDisabilityState(user,DISABILITY_FLAG_ANEMIA, "Anemia")
HTML += ShowDisabilityState(user,DISABILITY_FLAG_EHS, "Electromagnetic Hypersensitivity")
/*HTML += ShowDisabilityState(user,DISABILITY_FLAG_COUGHING, "Coughing")
HTML += ShowDisabilityState(user,DISABILITY_FLAG_TOURETTES, "Tourettes") Still working on it! -Angelite*/
HTML += {"
"}
user << browse(null, "window=preferences")
user << browse(HTML_SKELETON(HTML), "window=disabil;size=350x300")
return
/datum/preferences/proc/SetRecords(mob/user)
var/HTML = ""
HTML += {"
Set Character Records Medical Records "}
var/med_record = get_pref(/datum/preference_setting/string/med_record)
if(length(med_record) <= 40)
HTML += "[med_record]"
else
HTML += "[copytext(med_record, 1, 37)]..."
HTML += "
Employment Records "
var/gen_record = get_pref(/datum/preference_setting/string/gen_record)
if(length(gen_record) <= 40)
HTML += "[gen_record]"
else
HTML += "[copytext(gen_record, 1, 37)]..."
HTML += "
Security Records "
var/sec_record = get_pref(/datum/preference_setting/string/sec_record)
if(length(sec_record) <= 40)
HTML += "[sec_record] "
else
HTML += "[copytext(sec_record, 1, 37)]... "
HTML += {" \[Done\]
"}
user << browse(null, "window=preferences")
user << browse(HTML_SKELETON(HTML), "window=records;size=350x300")
return
/datum/preferences/proc/open_load_dialog(mob/user)
var/database/query/q = new
var/list/name_list[MAX_SAVE_SLOTS]
message_admins("open load dialog for [user]")
q.Add("select real_name, player_slot from players where player_ckey=?", user.ckey)
if(q.Execute(db))
while(q.NextRow())
name_list[q.GetColumn(2)] = q.GetColumn(1)
else
message_admins("Error in open_load_dialog [__FILE__] ln:[__LINE__] #: [q.Error()] - [q.ErrorMsg()]")
warning("Error in open_load_dialog [__FILE__] ln:[__LINE__] #:[q.Error()] - [q.ErrorMsg()]")
return 0
var/dat = "
Select a character slot to load"
var/counter = 1
while(counter <= MAX_SAVE_SLOTS)
if(counter==get_pref(/datum/preference_setting/numerical/default_slot))
dat += "[name_list[counter]] "
else
if(!name_list[counter])
dat += "Character[counter] "
else
dat += "[name_list[counter]] "
counter++
dat += "
"}
if(table_type == antag_roles && isantagbanned(user))
dat += "
You are banned from antagonist roles
"
else
for(var/role_id in table_type)
dat += "
[capitalize(role_id)]
"
if(table_type[role_id]) //if mode is available on the server
if(jobban_isbanned(user, role_id) || (role_id == "pai candidate" && jobban_isbanned(user, "pAI")) || (role_id == MALF && jobban_isbanned(user, "AI")))
dat += "