From e2efb090161e09fb8fcb91d0b153615890dbfbdc Mon Sep 17 00:00:00 2001 From: Christer2222 <25958019+Christer2222@users.noreply.github.com> Date: Fri, 19 Dec 2025 00:09:07 +0100 Subject: [PATCH] Adds a display for job difficulty as well as a description of the job (#30960) * tip window, comments, padding, difficulty supervisor * spacing * shows missing stars * dmi to base64 * defines * assigned difficulty to each job * added star sprites * assistant fix * show stars when assistant * Fixed restrictions * comment * consistent size work preference * tooltips now work, indented html * inlined the tooltip script * Moved buttons to top * padding and margins * align learn more button right * css cleanup * added descriptions. HTML encoding. * cargo description expansion * linting * null check * l * 3 half stars * lint * miner difficulty 3->4 * spacing and removed old test comments * spacing pt1 * spacing pt2 * string names of colors * spacing * rearranged defines * span -> defines * snake_case * removed extra space * Apply suggestions from code review Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> * Update code/modules/client/preference/character.dm Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --------- Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> --- code/__DEFINES/job_defines.dm | 10 ++ code/game/jobs/job/assistant.dm | 3 + code/game/jobs/job/engineering_jobs.dm | 9 ++ code/game/jobs/job/job.dm | 6 + code/game/jobs/job/medical_jobs.dm | 21 +++ code/game/jobs/job/science_jobs.dm | 15 ++ code/game/jobs/job/security_jobs.dm | 12 ++ code/game/jobs/job/silicon_jobs.dm | 6 + code/game/jobs/job/supervisor.dm | 21 +++ code/game/jobs/job/support.dm | 36 +++++ code/game/jobs/job/support_chaplain.dm | 3 + code/modules/client/preference/character.dm | 167 +++++++++++++++----- icons/ui_icons/stars.dmi | Bin 0 -> 588 bytes 13 files changed, 268 insertions(+), 41 deletions(-) create mode 100644 icons/ui_icons/stars.dmi diff --git a/code/__DEFINES/job_defines.dm b/code/__DEFINES/job_defines.dm index bec4d54b956..a167504893f 100644 --- a/code/__DEFINES/job_defines.dm +++ b/code/__DEFINES/job_defines.dm @@ -1,3 +1,13 @@ +#define NONE_DIFFICULTY 0 +#define EASY_DIFFICULTY 1 +#define LOW_DIFFICULTY 2 +#define MEDIUM_DIFFICULTY 3 +#define HARD_DIFFICULTY 4 +#define VERY_HARD_DIFFICULTY 5 +#define EXTREMELY_HARD_DIFFICULTY 6 + +#define MAX_DIFFICULTY 6 + /////////////////////////////// // WARNING // //////////////////////////////////////////////////////////////////////// diff --git a/code/game/jobs/job/assistant.dm b/code/game/jobs/job/assistant.dm index ac132bdd5ad..9e65da48e9b 100644 --- a/code/game/jobs/job/assistant.dm +++ b/code/game/jobs/job/assistant.dm @@ -10,6 +10,9 @@ access = list() //See /datum/job/assistant/get_access() alt_titles = list("Off-Duty", "Retired", "Intern") outfit = /datum/outfit/job/assistant + difficulty = NONE_DIFFICULTY + description = "Assistants have the responsibility to learn the game.\n\n\ + Difficulties: Learning the controls. Radio headsets" /datum/job/assistant/get_access() if(GLOB.configuration.jobs.assistant_maint_access) diff --git a/code/game/jobs/job/engineering_jobs.dm b/code/game/jobs/job/engineering_jobs.dm index 68c90e56630..3333a464c85 100644 --- a/code/game/jobs/job/engineering_jobs.dm +++ b/code/game/jobs/job/engineering_jobs.dm @@ -38,6 +38,9 @@ outfit = /datum/outfit/job/chief_engineer important_information = "This role requires you to coordinate a department. You are required to be familiar with Standard Operating Procedure (Engineering), basic job duties, and act professionally (roleplay)." standard_paycheck = CREW_PAY_HIGH + difficulty = HARD_DIFFICULTY + description = "The Chief Engineer has the responsibility of overseeing the Engineering department.\n\n\ + Difficulties: Standard Operating Procedure (General, Engineering), construction (advanced), hacking, engines (supermatter, tesla, singularity), communication" /datum/outfit/job/chief_engineer name = "Chief Engineer" @@ -92,6 +95,9 @@ exp_map = list(EXP_TYPE_CREW = 300) outfit = /datum/outfit/job/engineer standard_paycheck = CREW_PAY_MEDIUM + difficulty = MEDIUM_DIFFICULTY + description = "Station Engineers have the responsibility of maintaining the station's infrastructure and operating the station's engine.\n\n\ + Difficulties: Construction (advanced), space movement" /datum/outfit/job/engineer name = "Station Engineer" @@ -141,6 +147,9 @@ exp_map = list(EXP_TYPE_CREW = 300) outfit = /datum/outfit/job/atmos standard_paycheck = CREW_PAY_MEDIUM + difficulty = MEDIUM_DIFFICULTY + description = "Atmospheric Technicians have the responsibility of maintaining the station's atmospherics system.\n\n\ + Difficulties: Atmospherics, pipe manipulation, gas pressure, space movement" /datum/outfit/job/atmos name = "Life Support Specialist" diff --git a/code/game/jobs/job/job.dm b/code/game/jobs/job/job.dm index 9c60d0fc836..bef49862a4f 100644 --- a/code/game/jobs/job/job.dm +++ b/code/game/jobs/job/job.dm @@ -75,6 +75,12 @@ /// Standard paycheck amount for this job var/standard_paycheck = CREW_PAY_ASSISTANT + /// A description to be shown when set to high priority + var/description = "Missing description" + + /// How mechanically difficult this job is, shown on the job selection screen + var/difficulty + //Only override this proc /datum/job/proc/after_spawn(mob/living/carbon/human/H) SHOULD_CALL_PARENT(TRUE) diff --git a/code/game/jobs/job/medical_jobs.dm b/code/game/jobs/job/medical_jobs.dm index ef016bc71f6..9fa18f11be0 100644 --- a/code/game/jobs/job/medical_jobs.dm +++ b/code/game/jobs/job/medical_jobs.dm @@ -34,6 +34,9 @@ outfit = /datum/outfit/job/cmo important_information = "This role requires you to coordinate a department. You are required to be familiar with Standard Operating Procedure (Medical), basic job duties, and act professionally (roleplay)." standard_paycheck = CREW_PAY_HIGH + difficulty = HARD_DIFFICULTY + description = "The Chief Medical Officer has the responsibility of overseeing the Medical Department.\n\n\ + Difficulties: Standard Operating Procedure (General, Medical), surgery, cloning, healing, virology, autopsies, communication" /datum/outfit/job/cmo name = "Chief Medical Officer" @@ -81,6 +84,9 @@ exp_map = list(EXP_TYPE_CREW = 180) outfit = /datum/outfit/job/doctor standard_paycheck = CREW_PAY_MEDIUM + difficulty = MEDIUM_DIFFICULTY + description = "Medical Doctors have the responsibility of performing medical care, including surgery and cloning of the dead.\n\n\ + Difficulties: Surgery, cloning, healing" /datum/outfit/job/doctor name = "Medical Doctor" @@ -122,6 +128,9 @@ exp_map = list(EXP_TYPE_CREW = 180) outfit = /datum/outfit/job/coroner standard_paycheck = CREW_PAY_MEDIUM + difficulty = LOW_DIFFICULTY + description = "The Coroner has the responsibility of organizing dead crew members and their belongings.\n\n\ + Difficulties: Autopsies" /datum/outfit/job/coroner name = "Coroner" @@ -192,6 +201,9 @@ exp_map = list(EXP_TYPE_CREW = 300) outfit = /datum/outfit/job/chemist standard_paycheck = CREW_PAY_MEDIUM + difficulty = MEDIUM_DIFFICULTY + description = "Chemists have the responsibility of providing medicine to medical.\n\n\ + Difficulties: Chemistry, menu navigation" /datum/outfit/job/chemist name = "Chemist" @@ -238,6 +250,9 @@ ) outfit = /datum/outfit/job/virologist standard_paycheck = CREW_PAY_MEDIUM + difficulty = MEDIUM_DIFFICULTY + description = "The Virologist has the responsibility of manipulating and creating viruses as well as vaccines.\n\n\ + Difficulties: Virus mutation, virus curing, virus mixing, menu navigation" /datum/outfit/job/virologist @@ -280,6 +295,9 @@ alt_titles = list("Psychologist","Therapist") outfit = /datum/outfit/job/psychiatrist standard_paycheck = CREW_PAY_MEDIUM + difficulty = EASY_DIFFICULTY + description = "The Psychologist has the responsibility to keep the crew sane.\n\n\ + Difficulties: Communication, menu navigation" /datum/outfit/job/psychiatrist name = "Psychiatrist" @@ -333,6 +351,9 @@ outfit = /datum/outfit/job/paramedic important_information = "You are the first responder to medical emergencies outside the sanctity of the Medbay. You can also respond to Lavaland emergencies via the mining shuttle located in Cargo, or space emergencies via the Teleporter near the Bridge." standard_paycheck = CREW_PAY_MEDIUM + difficulty = LOW_DIFFICULTY + description = "The Paramedic has the responsibility of rescuing crew members from danger.\n\n\ + Difficulties: Healing" /datum/outfit/job/paramedic name = "Paramedic" diff --git a/code/game/jobs/job/science_jobs.dm b/code/game/jobs/job/science_jobs.dm index 74d33b28fd7..c936916dc40 100644 --- a/code/game/jobs/job/science_jobs.dm +++ b/code/game/jobs/job/science_jobs.dm @@ -45,6 +45,9 @@ outfit = /datum/outfit/job/rd important_information = "This role requires you to coordinate a department. You are required to be familiar with Standard Operating Procedure (Science), basic job duties, and act professionally (roleplay)." standard_paycheck = CREW_PAY_HIGH + difficulty = MEDIUM_DIFFICULTY + description = "The Research Director has the responsibility of overseeing the Science department.\n\n\ + Difficulties: Standard Operating Procedure (General, Science), R&D, xenobiology, toxins, chemistry, robotics, genetics, AI modules, anomalies" /datum/outfit/job/rd name = "Research Director" @@ -97,6 +100,9 @@ outfit = /datum/outfit/job/scientist standard_paycheck = CREW_PAY_MEDIUM + difficulty = MEDIUM_DIFFICULTY + description = "Scientists have the responsibility of increasing the station's research levels.\n\n\ + Difficulties: R&D, toxins, chemistry, anomalies, menu navigation" /datum/outfit/job/scientist name = "Scientist" @@ -148,6 +154,9 @@ outfit = /datum/outfit/job/xenobiologist standard_paycheck = CREW_PAY_MEDIUM + difficulty = MEDIUM_DIFFICULTY + description = "Xenobiologists have the responsibility of researching slimes and the organs of fauna.\n\n\ + Difficulties: Xenobiology, surgery" /datum/outfit/job/xenobiologist name = "Xenobiologist" @@ -202,6 +211,9 @@ outfit = /datum/outfit/job/roboticist standard_paycheck = CREW_PAY_MEDIUM + difficulty = MEDIUM_DIFFICULTY + description = "Roboticists have the responsibility of building exosuits, cyborgs, and implants.\n\n\ + Difficulties: Cyborg/exosuit/IPC construction/maintenance, AI modules, paperwork, MODsuits, surgery" /datum/outfit/job/roboticist name = "Roboticist" @@ -241,6 +253,9 @@ exp_map = list(EXP_TYPE_CREW = 180) outfit = /datum/outfit/job/geneticist standard_paycheck = CREW_PAY_MEDIUM + difficulty = MEDIUM_DIFFICULTY + description = "Geneticists have the responsibility of researching and providing genetic powers.\n\n\ + Difficulties: Genetics, menu navigation" /datum/outfit/job/geneticist name = "Geneticist" diff --git a/code/game/jobs/job/security_jobs.dm b/code/game/jobs/job/security_jobs.dm index 1895f3f6d82..0d1755f1d36 100644 --- a/code/game/jobs/job/security_jobs.dm +++ b/code/game/jobs/job/security_jobs.dm @@ -45,6 +45,9 @@ outfit = /datum/outfit/job/hos important_information = "This role requires you to coordinate a department. You are required to be familiar with Standard Operating Procedure (Security), Space Law, basic job duties, and act professionally (roleplay)." standard_paycheck = CREW_PAY_HIGH + difficulty = EXTREMELY_HARD_DIFFICULTY + description = "The Head of Security has the responsibility of overseeing the Security department.\n\n\ + Difficulties: Space Law, Standard Operating Procedure (General, Legal, Security), combat, identifying antagonists, communication" /datum/outfit/job/hos name = "Head of Security" @@ -102,6 +105,9 @@ missing_limbs_allowed = FALSE outfit = /datum/outfit/job/warden standard_paycheck = CREW_PAY_MEDIUM + difficulty = HARD_DIFFICULTY + description = "The Warden has the responsibility of monitoring prisoners.\n\n\ + Difficulties: Space Law, Standard Operating Procedure (Legal), identifying antagonists" /datum/outfit/job/warden name = "Warden" @@ -162,6 +168,9 @@ outfit = /datum/outfit/job/detective important_information = "Track, investigate, and look cool while doing it." standard_paycheck = CREW_PAY_MEDIUM + difficulty = MEDIUM_DIFFICULTY + description = "The Detective has the responsibility of solving crimes and uncovering criminals.\n\n\ + Difficulties: Space Law, Standard Operating Procedure (Legal), forensics, identifying antagonists" /datum/outfit/job/detective name = "Detective" @@ -233,6 +242,9 @@ outfit = /datum/outfit/job/officer important_information = "Space Law is the law, not a suggestion." standard_paycheck = CREW_PAY_MEDIUM + difficulty = MEDIUM_DIFFICULTY + description = "Security Officers have the responsibility of enforcing Space Law and protecting the crew.\n\n\ + Difficulties: Space Law, Standard Operating Procedure (Legal), combat, identifying antagonists" /datum/outfit/job/officer name = "Security Officer" diff --git a/code/game/jobs/job/silicon_jobs.dm b/code/game/jobs/job/silicon_jobs.dm index 4ef6ba45e1d..a810a529099 100644 --- a/code/game/jobs/job/silicon_jobs.dm +++ b/code/game/jobs/job/silicon_jobs.dm @@ -10,6 +10,9 @@ minimal_player_age = 30 exp_map = list(EXP_TYPE_SILICON = 300) has_bank_account = FALSE + difficulty = HARD_DIFFICULTY + description = "The AI has the responsibility of assisting the crew while following its lawset.\n\n\ + Difficulties: AI lawsets, controls" /datum/job/ai/equip(mob/living/carbon/human/H) if(!H) @@ -31,6 +34,9 @@ exp_map = list(EXP_TYPE_CREW = 300) alt_titles = list("Robot") has_bank_account = FALSE + difficulty = MEDIUM_DIFFICULTY + description = "Cyborgs have the responsibility of assisting the crew and following their lawsets.\n\n\ + Difficulties: AI lawsets, cyborg modules, controls" /datum/job/cyborg/equip(mob/living/carbon/human/H) if(!H) diff --git a/code/game/jobs/job/supervisor.dm b/code/game/jobs/job/supervisor.dm index c97094e0310..1bdf20f4d3b 100644 --- a/code/game/jobs/job/supervisor.dm +++ b/code/game/jobs/job/supervisor.dm @@ -17,6 +17,9 @@ outfit = /datum/outfit/job/captain important_information = "This role requires you to coordinate a department. You are required to be familiar with Standard Operating Procedure (Command), basic job duties, and act professionally (roleplay)." standard_paycheck = CREW_PAY_HIGH + difficulty = VERY_HARD_DIFFICULTY + description = "The Captain has the responsibility to oversee heads of staff.\n\n\ + Difficulties: Standard Operating Procedure (General, Legal, Command), Space Law, paperwork, AI modules, communication" /datum/job/captain/get_access() return get_all_accesses() @@ -111,6 +114,9 @@ outfit = /datum/outfit/job/hop important_information = "This role requires you to coordinate a department. You are required to be familiar with Standard Operating Procedure (Service), basic job duties, and act professionally (roleplay)." standard_paycheck = CREW_PAY_HIGH + difficulty = MEDIUM_DIFFICULTY + description = "The Head of Personnel has the responsibility of overseeing the Service department.\n\n\ + Difficulties: Standard Operating Procedure (Standard, Service, Command), Space Law, administration, IDs, paperwork " /datum/outfit/job/hop name = "Head of Personnel" @@ -187,6 +193,9 @@ outfit = /datum/outfit/job/nanotrasenrep important_information = "This role requires you to advise the Command team about Standard Operating Procedure, Chain of Command, and report to Central Command about various matters. You are required to act in a manner befitting someone representing Nanotrasen." standard_paycheck = CREW_PAY_MEDIUM + difficulty = LOW_DIFFICULTY + description = "The Nanotrasen Representative has the responsibility of ensuring heads of staff are following Standard Operating Procedure.\n\n\ + Difficulties: Standard Operating Procedure (General, Command), paperwork, communication" /datum/outfit/job/nanotrasenrep name = "Nanotrasen Representative" @@ -249,6 +258,9 @@ outfit = /datum/outfit/job/blueshield important_information = "This role requires you to ensure the safety of the Heads of Staff, not the general crew. You may perform arrests only if the combatant is directly threatening a member of Command, the Nanotrasen Representative, or the Magistrate." standard_paycheck = CREW_PAY_MEDIUM + difficulty = HARD_DIFFICULTY + description = "The Blueshield has the responsibility of protecting heads of staff and dignitaries.\n\n\ + Difficulties: Healing, combat, communication" /datum/outfit/job/blueshield name = "Blueshield" @@ -302,6 +314,9 @@ outfit = /datum/outfit/job/judge important_information = "This role requires you to oversee legal matters and make important decisions about sentencing. You are required to have an extensive knowledge of Space Law and Security SOP and only operate within, not outside, the boundaries of the law." standard_paycheck = CREW_PAY_MEDIUM + difficulty = HARD_DIFFICULTY + description = "The Magistrate has the responsibility of being the final word on Space Law and ensuring it's enforced properly.\n\n\ + Difficulties: Space Law, Standard Operating Procedure (General, Legal), communication" /datum/outfit/job/judge name = "Magistrate" @@ -357,6 +372,9 @@ outfit = /datum/outfit/job/iaa important_information = "Your job is to deal with affairs regarding Standard Operating Procedure. You are NOT in charge of Space Law affairs, nor can you override it. You are NOT a prisoner defence lawyer." standard_paycheck = CREW_PAY_MEDIUM + difficulty = MEDIUM_DIFFICULTY + description = "Internal Affairs Agents have the responsibility of ensuring departments are following Standard Operating Procedure.\n\n\ + Difficulties: Standard Operating Procedure (General, Departmental), paperwork" /datum/outfit/job/iaa name = "Internal Affairs Agent" @@ -419,6 +437,9 @@ outfit = /datum/outfit/job/nct important_information = "Your job is to try to assist as many crew members as possible regardless of department. You are NOT permitted to give command staff advice on any command SOP questions or aid in legal advice." standard_paycheck = CREW_PAY_MEDIUM + difficulty = MEDIUM_DIFFICULTY + description = "Nanotrasen Career Trainers (NCTs for short) are currently a mentor/admin only job. They are held to a higher standard, like any other staff-only job.\n\n\ + Difficulties: Training crew." /datum/outfit/job/nct name = "Nanotrasen Career Trainer" diff --git a/code/game/jobs/job/support.dm b/code/game/jobs/job/support.dm index 300611f6560..12ab3dd8bf2 100644 --- a/code/game/jobs/job/support.dm +++ b/code/game/jobs/job/support.dm @@ -36,6 +36,9 @@ important_information = "This role requires you to coordinate a department. You are required to be familiar with Standard Operating Procedure (Supply), basic job duties, and act professionally (roleplay)." exp_map = list(EXP_TYPE_SUPPLY = 1200) standard_paycheck = CREW_PAY_HIGH + difficulty = MEDIUM_DIFFICULTY + description = "The Quartermaster has the responsibility of overseeing the Supply department.\n\n\ + Difficulties: Standard Operating Procedure (General, Supply, Command), mining, cargo, economy, paperwork" /datum/outfit/job/qm name = "Quartermaster" @@ -80,6 +83,9 @@ alt_titles = list("Mail Carrier", "Courier") outfit = /datum/outfit/job/cargo_tech standard_paycheck = CREW_PAY_LOW + difficulty = EASY_DIFFICULTY + description = "Cargo Technicians have the responsibility of handling cargo orders and delivering mail.\n\n\ + Difficulties: Loading and unloading crates, economy, paperwork, menu navigation" /datum/outfit/job/cargo_tech name = "Cargo Technician" @@ -119,6 +125,9 @@ alt_titles = list("Metalworker", "Tinkerer") outfit = /datum/outfit/job/smith standard_paycheck = CREW_PAY_LOW + difficulty = MEDIUM_DIFFICULTY + description = "The Smith has the responsibility of refining ores, as well as making tool bits and armor plates.\n\n\ + Difficulties: Smithing, controls" /datum/outfit/job/smith name = "Smith" @@ -156,6 +165,9 @@ alt_titles = list("Spelunker") outfit = /datum/outfit/job/mining standard_paycheck = CREW_PAY_LOW + difficulty = HARD_DIFFICULTY + description = "Shaft Miners have the responsibility of mining ores on Lavaland.\n\n\ + Difficulties: Mining, combat" /datum/outfit/job/mining name = "Shaft Miner" @@ -245,6 +257,9 @@ alt_titles = list("Salvage Technician", "Scavenger") outfit = /datum/outfit/job/explorer standard_paycheck = CREW_PAY_LOW + difficulty = HARD_DIFFICULTY + description = "Explorers have the responsibility of exploring space near the station.\n\n\ + Difficulties: Space movement, combat, space exploration, mining" /datum/outfit/job/explorer name = "Explorer" @@ -281,6 +296,9 @@ access = list(ACCESS_BAR, ACCESS_MAINT_TUNNELS, ACCESS_WEAPONS, ACCESS_MINERAL_STOREROOM) outfit = /datum/outfit/job/bartender standard_paycheck = CREW_PAY_LOW + difficulty = LOW_DIFFICULTY + description = "The Bartender has the responsibility of mixing drinks for the crew.\n\n\ + Difficulties: Mixing drinks" /datum/outfit/job/bartender name = "Bartender" @@ -329,6 +347,9 @@ alt_titles = list("Cook","Culinary Artist","Butcher") outfit = /datum/outfit/job/chef standard_paycheck = CREW_PAY_LOW + difficulty = MEDIUM_DIFFICULTY + description = "The Chef has the responsibility of cooking food for the crew.\n\n\ + Difficulties: Martial arts, cooking" /datum/outfit/job/chef name = "Chef" @@ -371,6 +392,9 @@ alt_titles = list("Hydroponicist", "Botanical Researcher") outfit = /datum/outfit/job/hydro standard_paycheck = CREW_PAY_LOW + difficulty = MEDIUM_DIFFICULTY + description = "Botanists have the responsibility of growing plants for the Chef.\n\n\ + Difficulties: Growing plants, maniuplating plant traits" /datum/outfit/job/hydro name = "Botanist" @@ -412,6 +436,9 @@ ) outfit = /datum/outfit/job/clown standard_paycheck = CREW_PAY_LOW + difficulty = EASY_DIFFICULTY + description = "The Clown has the responsibility of entertaining the crew.\n\n\ + Difficulties: A sense of humor. Honk!" /datum/outfit/job/clown name = "Clown" @@ -508,6 +535,9 @@ ) outfit = /datum/outfit/job/mime standard_paycheck = CREW_PAY_LOW + difficulty = EASY_DIFFICULTY + description = "The Mime has the responsibility of entertaining the crew non-verbally.\n\n\ + Difficulties: Emotes" /datum/outfit/job/mime name = "Mime" @@ -567,6 +597,9 @@ alt_titles = list("Custodial Technician") outfit = /datum/outfit/job/janitor standard_paycheck = CREW_PAY_LOW + difficulty = EASY_DIFFICULTY + description = "Janitors have the responsibility of cleaning the station.\n\n\ + Difficulties: cleaning, lights replacement, movement, controls" /datum/outfit/job/janitor name = "Janitor" @@ -606,6 +639,9 @@ alt_titles = list("Journalist") outfit = /datum/outfit/job/librarian standard_paycheck = CREW_PAY_LOW + difficulty = EASY_DIFFICULTY + description = "The Librarian has the responsibility of providing books for the crew.\n\n\ + Difficulties: Paperwork, controls" /datum/outfit/job/librarian name = "Librarian" diff --git a/code/game/jobs/job/support_chaplain.dm b/code/game/jobs/job/support_chaplain.dm index dcb6fcbabae..2fa6a4a3e8f 100644 --- a/code/game/jobs/job/support_chaplain.dm +++ b/code/game/jobs/job/support_chaplain.dm @@ -17,6 +17,9 @@ ) outfit = /datum/outfit/job/chaplain standard_paycheck = CREW_PAY_LOW + difficulty = EASY_DIFFICULTY + description = "The Chaplain has the responsibility of providing religious services for the crew.\n\n\ + Difficulties: Controls, funerals" /datum/outfit/job/chaplain name = "Chaplain" diff --git a/code/modules/client/preference/character.dm b/code/modules/client/preference/character.dm index b263e57f053..3f24f1b8a88 100644 --- a/code/modules/client/preference/character.dm +++ b/code/modules/client/preference/character.dm @@ -2076,40 +2076,122 @@ /datum/character_save/proc/check_any_job() return(job_support_high || job_support_med || job_support_low || job_medsci_high || job_medsci_med || job_medsci_low || job_engsec_high || job_engsec_med || job_engsec_low) - +/// 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. +/// 1366x768 is a common screen resolution, and increasing widthPerColumn or height to above 400 and 700, +/// will result in the window being placed outside the screen for these users. If we get more jobs than limit x 3, increase limit. /datum/character_save/proc/SetChoices(mob/user, limit = 17, list/splitJobs = list("Head of Security", "Quartermaster"), widthPerColumn = 400, height = 700) if(!SSjobs) 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. var/width = widthPerColumn + // these are used to show the mechanical difficulty to the player + var/filled_difficulty = "" + var/unfilled_fifficulty = "" + var/half_difficulty = "" + var/all_difficulty + for(var/i in 1 to MAX_DIFFICULTY / 2) + all_difficulty += filled_difficulty var/list/html = list() + html += {" + + + + "} html += "" if(!length(SSjobs.occupations)) html += "The Jobs subsystem is not yet finished creating jobs, please try again later" html += "
Done

" // Easier to press up here. else - html += "
" - html += "Choose occupation chances
Unavailable occupations are crossed out.

" - html += "
Save

" // Easier to press up here. - html += "
Left-click to raise an occupation preference, right-click to lower it.
" - html += "" - html += "
" // Table within a table for alignment, also allows you to easily add more colomns. + var/unavailable_job + switch(alternate_option) + if(GET_RANDOM_JOB) + unavailable_job = "Get a random job" + if(BE_ASSISTANT) + unavailable_job = "Be an assistant" + if(RETURN_TO_LOBBY) + unavailable_job = "Return to lobby" + + html += {" + +
+
+

Left-click to raise an occupation preference, right-click to lower it.

+
+ +
Mechanical difficulty is shown as [all_difficulty]. +
+
+
+
+
+

Save preferences: Save and Close This Window

+

Reset preferences: Reset

+

If job preferences are unavailable: [unavailable_job]

+
+ Learn About Job Selection +
+
+

Hover over a job to get more information about it.

+
+
+ + +
"}; // Table within a table for alignment, also allows you to easily add more colomns. html += "" 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. + // 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(!SSjobs) return for(var/J in SSjobs.occupations) var/datum/job/job = J + var/difficulty_meter = "" + if(job.difficulty) + for(var/i in 1 to ceil(MAX_DIFFICULTY / 2)) + if(job.difficulty >= (2 * i)) + difficulty_meter += filled_difficulty + continue + if(job.difficulty > (2 * (i - 1))) + difficulty_meter += half_difficulty + continue + difficulty_meter += unfilled_fifficulty + if(job.admin_only) continue @@ -2121,6 +2203,7 @@ continue index += 1 + // when max jobs are listed, or the name of a "header" job is listed, make a new column if((index >= limit) || (job.title in splitJobs)) if((index < limit) && (lastJob != null)) // Dynamic window width @@ -2128,48 +2211,55 @@ //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 in 1 to limit - index) - html += "" + html += "" html += "
  
   
" index = 0 - html += "" - continue var/restrictions = job.get_exp_restrictions(user.client) + if(jobban_isbanned(user, job.title)) + html += "[rank]" + continue if(restrictions) - html += "[rank]" + html += "[rank]" continue if(job.barred_by_disability(user.client)) - html += "[rank]" + html += "[rank]" continue if(job.barred_by_quirk(user.client)) html += "[rank]" continue if(job.barred_by_missing_limbs(user.client)) - html += "[rank]" + html += "[rank]" continue if(!job.player_old_enough(user.client)) var/available_in_days = job.available_in_days(user.client) - html += "[rank]" + html += "[rank]" continue + + // Disable choice if the player has assitant selected (and this job isn't assistant) if((job_support_low & JOB_ASSISTANT) && (job.title != "Assistant")) - html += "[rank]" + // this determines the job preference column when assistant is enabled, since the other choices will be hidden + html += "[rank]" continue if((job.title in GLOB.command_positions) || (job.title == "AI"))//Bold head jobs html += "[SPAN_DARK("[rank]")]" else html += SPAN_DARK("[rank]") - html += "" + html += " No" + html += "" + // sets the size of the job preference column, but only for assistant. + // It will pick the bigger number of this and the rest of the column + html += "" continue /* if(GetJobDepartment(job, 1) & job.flag) @@ -2218,26 +2311,18 @@ else HTML += " \[NEVER]" */ + // determines the width of the jobs priority column html += "[prefLevelLabel]" - + html += "" + index += 1 - for(var/i in 1 to limit - index) // Finish the column so it is even - html += "" + for(var/i in 1 to limit - index) // Fill the column with blank slots so it is even + html += "" html += "
" + lastJob = job + + // determines the size of the job name column + // !! watch out for the funni open tag here. It needs to be closed later !! + // all this should probably be put in a function to make it easier to read and save future headaches + var/job_description = html_encode(replacetext_char(job.description, "\n", "
")) + html += "
" var/rank if(job.alt_titles) rank = "[GetPlayerAltTitle(job)]" else rank = job.title - lastJob = job - if(jobban_isbanned(user, job.title)) - html += "[rank] \[BANNED]
\[BANNED]
\[[restrictions]]
\[[restrictions]][difficulty_meter]
\[DISABILITY\]
\[DISABILITY\][difficulty_meter]
\[QUIRK\]
\[MISSING LIMBS\]
\[FIX LIMBS\][difficulty_meter]
\[IN [(available_in_days)] DAYS]
\[IN [(available_in_days)] DAYS][difficulty_meter]
[difficulty_meter]
" - + html += "" var/prefLevelLabel = "ERROR" var/prefLevelColor = "pink" var/prefUpperLevel = -1 // level to assign on left click @@ -2203,10 +2293,13 @@ if(job.title == "Assistant") // Assistant is special if(job_support_low & JOB_ASSISTANT) - html += " Yes" + html += " Yes" else - html += " No" - html += "
[SPAN_DARK("[difficulty_meter]")]
[SPAN_DARK("[difficulty_meter]")]" html += "
  
   
" html += "
" - switch(alternate_option) - if(GET_RANDOM_JOB) - html += "

Get random job if preferences unavailable

" - if(BE_ASSISTANT) - html += "

Be an assistant if preferences unavailable

" - if(RETURN_TO_LOBBY) - html += "

Return to lobby if preferences unavailable

" - - html += "
Reset
" - html += "

Learn About Job Selection
" html += "
" user << browse(null, "window=preferences") diff --git a/icons/ui_icons/stars.dmi b/icons/ui_icons/stars.dmi new file mode 100644 index 0000000000000000000000000000000000000000..c94d9b8b4fa8b2a2cb9042bf3ee926b938f51422 GIT binary patch literal 588 zcmV-S0<-;zP)HU6jt>Dnae!)U zVn?4G8=Ck~4H?4>N-E=5rU6jo0|BmOo