mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Adjust job selection table (#58232)
Changed column height from 17 to 15 and changed the order to a more sensible and aesthetic one. Co-authored-by: celotajstg <celotajstg@users.noreply.github.com>
This commit is contained in:
+23
-23
@@ -13,29 +13,29 @@
|
||||
#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_AI 16
|
||||
#define JOB_DISPLAY_ORDER_CYBORG 17
|
||||
#define JOB_DISPLAY_ORDER_CHIEF_ENGINEER 18
|
||||
#define JOB_DISPLAY_ORDER_STATION_ENGINEER 19
|
||||
#define JOB_DISPLAY_ORDER_ATMOSPHERIC_TECHNICIAN 20
|
||||
#define JOB_DISPLAY_ORDER_CHIEF_MEDICAL_OFFICER 21
|
||||
#define JOB_DISPLAY_ORDER_MEDICAL_DOCTOR 22
|
||||
#define JOB_DISPLAY_ORDER_PARAMEDIC 23
|
||||
#define JOB_DISPLAY_ORDER_CHEMIST 24
|
||||
#define JOB_DISPLAY_ORDER_VIROLOGIST 25
|
||||
#define JOB_DISPLAY_ORDER_PSYCHOLOGIST 26
|
||||
#define JOB_DISPLAY_ORDER_BARTENDER 4
|
||||
#define JOB_DISPLAY_ORDER_BOTANIST 5
|
||||
#define JOB_DISPLAY_ORDER_COOK 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_PSYCHOLOGIST 13
|
||||
#define JOB_DISPLAY_ORDER_AI 14
|
||||
#define JOB_DISPLAY_ORDER_CYBORG 15
|
||||
#define JOB_DISPLAY_ORDER_CHIEF_ENGINEER 16
|
||||
#define JOB_DISPLAY_ORDER_STATION_ENGINEER 17
|
||||
#define JOB_DISPLAY_ORDER_ATMOSPHERIC_TECHNICIAN 18
|
||||
#define JOB_DISPLAY_ORDER_QUARTERMASTER 19
|
||||
#define JOB_DISPLAY_ORDER_CARGO_TECHNICIAN 20
|
||||
#define JOB_DISPLAY_ORDER_SHAFT_MINER 21
|
||||
#define JOB_DISPLAY_ORDER_CHIEF_MEDICAL_OFFICER 22
|
||||
#define JOB_DISPLAY_ORDER_MEDICAL_DOCTOR 23
|
||||
#define JOB_DISPLAY_ORDER_PARAMEDIC 24
|
||||
#define JOB_DISPLAY_ORDER_CHEMIST 25
|
||||
#define JOB_DISPLAY_ORDER_VIROLOGIST 26
|
||||
#define JOB_DISPLAY_ORDER_RESEARCH_DIRECTOR 27
|
||||
#define JOB_DISPLAY_ORDER_SCIENTIST 28
|
||||
#define JOB_DISPLAY_ORDER_ROBOTICIST 29
|
||||
|
||||
@@ -872,12 +872,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
popup.open(FALSE)
|
||||
onclose(user, "capturekeypress", src)
|
||||
|
||||
/datum/preferences/proc/SetChoices(mob/user, limit = 17, list/splitJobs = list("Chief Engineer"), widthPerColumn = 295, height = 620)
|
||||
/datum/preferences/proc/SetChoices(mob/user, limit = 15, widthPerColumn = 295, height = 620)
|
||||
if(!SSjob)
|
||||
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.
|
||||
//widthPerColumn - Screen's width for every column.
|
||||
//height - Screen's height.
|
||||
|
||||
@@ -903,11 +902,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
for(var/datum/job/job in sortList(SSjob.occupations, /proc/cmp_job_display_asc))
|
||||
|
||||
index += 1
|
||||
if((index >= limit) || (job.title in splitJobs))
|
||||
if(index >= limit)
|
||||
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.
|
||||
// Fills the rest of the cells with the last job's selection color.
|
||||
for(var/i = 0, i < (limit - index), i += 1)
|
||||
HTML += "<tr bgcolor='[lastJob.selection_color]'><td width='60%' align='right'> </td><td> </td></tr>"
|
||||
HTML += "</table></td><td width='20%'><table width='100%' cellpadding='1' cellspacing='0'>"
|
||||
|
||||
Reference in New Issue
Block a user