Merge branch 'job-menu-improvements' of https://github.com/Poojawa/Citadel-Station-13-portworks into job-menu-improvements

This commit is contained in:
Poojawa
2019-08-18 21:27:03 -05:00
22 changed files with 50 additions and 45 deletions
+12 -12
View File
@@ -57,18 +57,18 @@
#define JOB_DISPLAY_ORDER_ASSISTANT 1
#define JOB_DISPLAY_ORDER_CAPTAIN 2
#define JOB_DISPLAY_ORDER_HEAD_OF_PERSONNEL 3
#define JOB_DISPLAY_ORDER_QUARTERMASTER 4
#define JOB_DISPLAY_ORDER_CARGO_TECHNICIAN 5
#define JOB_DISPLAY_ORDER_SHAFT_MINER 6
#define JOB_DISPLAY_ORDER_BARTENDER 7
#define JOB_DISPLAY_ORDER_COOK 8
#define JOB_DISPLAY_ORDER_BOTANIST 9
#define JOB_DISPLAY_ORDER_JANITOR 10
#define JOB_DISPLAY_ORDER_CLOWN 11
#define JOB_DISPLAY_ORDER_MIME 12
#define JOB_DISPLAY_ORDER_CURATOR 13
#define JOB_DISPLAY_ORDER_LAWYER 14
#define JOB_DISPLAY_ORDER_CHAPLAIN 15
#define JOB_DISPLAY_ORDER_BARTENDER 4
#define JOB_DISPLAY_ORDER_COOK 5
#define JOB_DISPLAY_ORDER_BOTANIST 6
#define JOB_DISPLAY_ORDER_JANITOR 7
#define JOB_DISPLAY_ORDER_CLOWN 8
#define JOB_DISPLAY_ORDER_MIME 9
#define JOB_DISPLAY_ORDER_CURATOR 10
#define JOB_DISPLAY_ORDER_LAWYER 11
#define JOB_DISPLAY_ORDER_CHAPLAIN 12
#define JOB_DISPLAY_ORDER_QUARTERMASTER 13
#define JOB_DISPLAY_ORDER_CARGO_TECHNICIAN 14
#define JOB_DISPLAY_ORDER_SHAFT_MINER 15
#define JOB_DISPLAY_ORDER_CHIEF_ENGINEER 16
#define JOB_DISPLAY_ORDER_STATION_ENGINEER 17
#define JOB_DISPLAY_ORDER_ATMOSPHERIC_TECHNICIAN 18
+1 -1
View File
@@ -473,7 +473,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole))
//Validate job prefs
for(var/j in job_preferences)
if(job_preferences[j] != JP_LOW && job_preferences[j] != JP_MEDIUM && job_preferences[j] != JP_LOW)
if(job_preferences[j] != JP_LOW && job_preferences[j] != JP_MEDIUM && job_preferences[j] != JP_HIGH)
job_preferences -= j
all_quirks = SANITIZE_LIST(all_quirks)
@@ -7,7 +7,7 @@
total_positions = 3
spawn_positions = 2
supervisors = "the chief engineer"
selection_color = "#fff5cc"
selection_color = "#ff9b3d"
exp_requirements = 60
exp_type = EXP_TYPE_CREW
@@ -7,7 +7,7 @@
total_positions = 3
spawn_positions = 2
supervisors = "the quartermaster"
selection_color = "#dcba97"
selection_color = "#ca8f55"
outfit = /datum/outfit/job/cargo_tech
+1 -1
View File
@@ -7,7 +7,7 @@
total_positions = 2
spawn_positions = 2
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
selection_color = "#74b5e0"
exp_type = EXP_TYPE_CREW
exp_requirements = 60
@@ -9,7 +9,7 @@
total_positions = 1
spawn_positions = 1
supervisors = "the captain"
selection_color = "#ffd699"
selection_color = "#ee7400"
req_admin_notify = 1
minimal_player_age = 7
exp_requirements = 180
@@ -9,7 +9,7 @@
total_positions = 1
spawn_positions = 1
supervisors = "the captain"
selection_color = "#99ffe6"
selection_color = "#509ed1"
req_admin_notify = 1
minimal_player_age = 7
exp_requirements = 180
+1 -1
View File
@@ -8,7 +8,7 @@
total_positions = 1
spawn_positions = 1
supervisors = "the head of security"
selection_color = "#ffeeee"
selection_color = "#c02f2f"
minimal_player_age = 7
exp_requirements = 300
exp_type = EXP_TYPE_CREW
+1 -1
View File
@@ -7,7 +7,7 @@
total_positions = 2
spawn_positions = 2
supervisors = "the chief medical officer and research director"
selection_color = "#ffeef0"
selection_color = "#74b5e0"
exp_type = EXP_TYPE_CREW
exp_requirements = 60
@@ -9,7 +9,7 @@
total_positions = 1
spawn_positions = 1
supervisors = "the captain"
selection_color = "#cccccc"
selection_color = "#3a8529"
req_admin_notify = 1
minimal_player_age = 10
exp_requirements = 180
@@ -9,7 +9,7 @@
total_positions = 1
spawn_positions = 1
supervisors = "the captain"
selection_color = "#ff9999"
selection_color = "#b90000"
req_admin_notify = 1
minimal_player_age = 14
exp_requirements = 300
@@ -7,7 +7,7 @@
total_positions = 5
spawn_positions = 3
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
selection_color = "#74b5e0"
outfit = /datum/outfit/job/doctor
+1 -1
View File
@@ -9,7 +9,7 @@
total_positions = 1
spawn_positions = 1
supervisors = "the captain"
selection_color = "#ead4ae"
selection_color = "#a06121"
req_admin_notify = 1
minimal_player_age = 7
exp_requirements = 180
@@ -9,7 +9,7 @@
total_positions = 1
spawn_positions = 1
supervisors = "the captain"
selection_color = "#e6b3e6"
selection_color = "#7544cc"
req_admin_notify = 1
minimal_player_age = 7
exp_type_department = EXP_TYPE_SCIENCE
+1 -1
View File
@@ -7,7 +7,7 @@
total_positions = 2
spawn_positions = 2
supervisors = "the research director"
selection_color = "#ffeeff"
selection_color = "#9574cd"
exp_requirements = 60
exp_type = EXP_TYPE_CREW
+1 -1
View File
@@ -7,7 +7,7 @@
total_positions = 5
spawn_positions = 3
supervisors = "the research director"
selection_color = "#ffeeff"
selection_color = "#9574cd"
exp_requirements = 60
exp_type = EXP_TYPE_CREW
@@ -8,7 +8,7 @@
total_positions = 5 //Handled in /datum/controller/occupations/proc/setup_officer_positions()
spawn_positions = 5 //Handled in /datum/controller/occupations/proc/setup_officer_positions()
supervisors = "the head of security, and the head of your assigned department (if applicable)"
selection_color = "#ffeeee"
selection_color = "#c02f2f"
minimal_player_age = 7
exp_requirements = 300
exp_type = EXP_TYPE_CREW
+1 -1
View File
@@ -7,7 +7,7 @@
total_positions = 3
spawn_positions = 3
supervisors = "the quartermaster"
selection_color = "#dcba97"
selection_color = "#ca8f55"
outfit = /datum/outfit/job/miner
@@ -7,7 +7,7 @@
total_positions = 5
spawn_positions = 5
supervisors = "the chief engineer"
selection_color = "#fff5cc"
selection_color = "#ff9b3d"
exp_requirements = 60
exp_type = EXP_TYPE_CREW
+1 -1
View File
@@ -7,7 +7,7 @@
total_positions = 1
spawn_positions = 1
supervisors = "the chief medical officer"
selection_color = "#ffeef0"
selection_color = "#74b5e0"
exp_type = EXP_TYPE_CREW
exp_requirements = 60
+1 -1
View File
@@ -8,7 +8,7 @@
total_positions = 1
spawn_positions = 1
supervisors = "the head of security"
selection_color = "#ffeeee"
selection_color = "#c02f2f"
minimal_player_age = 7
exp_requirements = 300
exp_type = EXP_TYPE_CREW
+18 -13
View File
@@ -37,7 +37,8 @@
return
/mob/dead/new_player/proc/new_player_panel()
var/output = "<center><p><a href='byond://?src=[REF(src)];show_preferences=1'>Setup Character</a></p>"
var/output = "<center><p>Welcome, <b>[client ? client.prefs.real_name : "Unknown User"]</b></p>"
output += "<center><p><a href='byond://?src=[REF(src)];show_preferences=1'>Setup Character</a></p>"
if(SSticker.current_state <= GAME_STATE_PREGAME)
switch(ready)
@@ -444,7 +445,7 @@
if(SEC_LEVEL_RED)
level = "red"
if(SEC_LEVEL_DELTA)
level = "delta"
level = "delta"
var/dat = "<div class='notice'>Round Duration: [DisplayTimeText(world.time - SSticker.round_start_time)]<br>Alert Level: [capitalize(level)]</div>"
if(SSshuttle.emergency)
@@ -457,17 +458,18 @@
for(var/datum/job/prioritized_job in SSjob.prioritized_jobs)
if(prioritized_job.current_positions >= prioritized_job.total_positions)
SSjob.prioritized_jobs -= prioritized_job
dat += "<table><tr><td valign='top'>"
dat += "<center><table><tr><td valign='top'>"
var/column_counter = 0
for(var/list/category in list(GLOB.command_positions) + list(GLOB.engineering_positions) + list(GLOB.supply_positions) + list(GLOB.nonhuman_positions - "pAI") + list(GLOB.civilian_positions) + list(GLOB.medical_positions) + list(GLOB.science_positions) + list(GLOB.security_positions))
var/free_space = 0
for(var/list/category in list(GLOB.command_positions) + list(GLOB.supply_positions) + list(GLOB.engineering_positions) + list(GLOB.nonhuman_positions - "pAI") + list(GLOB.civilian_positions) + list(GLOB.medical_positions) + list(GLOB.science_positions) + list(GLOB.security_positions))
var/cat_color = "fff" //random default
if(SSjob.name_occupations && SSjob.name_occupations[category[1]])
cat_color = SSjob.name_occupations[category[1]].selection_color //use the color of the first job in the category (the department head) as the category color
else
cat_color = SSjob.occupations[category[1]].selection_color
dat += "<fieldset style='width: 185px; border: 2px solid [cat_color]; display: inline'>"
dat += "<legend align='center' style='color: [cat_color]'>[SSjob.name_occupations[category[1]].exp_type_department]</legend>"
var/list/dept_dat = list()
for(var/job in category)
var/datum/job/job_datum = SSjob.name_occupations[job]
@@ -484,10 +486,16 @@
dat += jointext(dept_dat, "")
dat += "</fieldset><br>"
column_counter++
if(column_counter > 0 && (column_counter % 3 == 0))
if(free_space <=4)
free_space++
if(column_counter > 0 && (column_counter % 3 == 0))
dat += "</td><td valign='top'>"
if(free_space >= 5 && (free_space % 5 == 0) && (column_counter % 3 != 0))
free_space = 0
column_counter = 0
dat += "</td><td valign='top'>"
dat += "</td></tr></table></center>"
dat += "</div></div>"
dat += "</td></tr></table></center></center>"
var/available_ghosts = 0
for(var/spawner in GLOB.mob_spawners)
@@ -502,7 +510,6 @@
if(!available_ghosts)
dat += "<div class='notice red'>There are currently no open ghost spawners.</div>"
else
dat += "<div class='clearBoth'>Currently open Ghost roles:</div><br>"
var/list/categorizedJobs = list("Ghost Role" = list(jobs = list(), titles = GLOB.mob_spawners, color = "#ffffff"))
for(var/spawner in GLOB.mob_spawners)
if(!LAZYLEN(spawner))
@@ -512,10 +519,8 @@
continue
categorizedJobs["Ghost Role"]["jobs"] += spawner
dat += "<table><tr><td valign='top'>"
dat += "<center><table><tr><td valign='top'>"
for(var/jobcat in categorizedJobs)
if(categorizedJobs[jobcat]["colBreak"])
dat += "</td><td valign='top'>"
if(!length(categorizedJobs[jobcat]["jobs"]))
continue
var/color = categorizedJobs[jobcat]["color"]
@@ -528,7 +533,7 @@
dat += "</td></tr></table></center>"
dat += "</div></div>"
var/datum/browser/popup = new(src, "latechoices", "Choose Profession", 680, 580)
var/datum/browser/popup = new(src, "latechoices", "Choose Profession", 720, 600)
popup.add_stylesheet("playeroptions", 'html/browser/playeroptions.css')
popup.set_content(jointext(dat, ""))
popup.open(FALSE) // FALSE is passed to open so that it doesn't use the onclose() proc