From 8850b07974035cc4e266d78aa8c4336fbedb131f Mon Sep 17 00:00:00 2001 From: nmajask Date: Thu, 10 Jun 2021 17:51:38 -0400 Subject: [PATCH 1/4] Fixed and tweaked some stuff with the crew console interface Here are the changes: -Added IDs for job that didnt have them (Paramedic, Psychiatrist, Mining Medic, Signal Technician, Clerk, Tourist, an Artist), now they will appear in the right place and have the correct color. -Removed the map from the interface -Added new civilian color that civilians use (#535353) --- code/game/machinery/computer/crew.dm | 9 ++++++- tgui/packages/tgui/constants.js | 1 + tgui/packages/tgui/interfaces/CrewConsole.js | 26 +++++--------------- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index 44c1a72e11cc..8881f50788e3 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -42,12 +42,16 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) jobs["Geneticist"] = 22 jobs["Virologist"] = 23 jobs["Medical Doctor"] = 24 + jobs["Paramedic"] = 25 //Yogs: Added IDs for this job + jobs["Psychiatrist"] = 26 //Yogs: Added IDs for this job + jobs["Mining Medic"] = 27 //Yogs: Added IDs for this job jobs["Research Director"] = 30 jobs["Scientist"] = 31 jobs["Roboticist"] = 32 jobs["Chief Engineer"] = 40 jobs["Station Engineer"] = 41 jobs["Atmospheric Technician"] = 42 + jobs["Signal Technician"] = 43 //Yogs: Added IDs for this job jobs["Quartermaster"] = 51 jobs["Shaft Miner"] = 52 jobs["Cargo Technician"] = 53 @@ -60,6 +64,9 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) jobs["Mime"] = 67 jobs["Janitor"] = 68 jobs["Lawyer"] = 69 + jobs["Clerk"] = 71 //Yogs: Added IDs for this job, also need to skip 70 or it clerk would be considered a head job + jobs["Tourist"] = 72 //Yogs: Added IDs for this job + jobs["Artist"] = 73 //Yogs: Added IDs for this job jobs["Admiral"] = 200 jobs["CentCom Commander"] = 210 jobs["Custodian"] = 211 @@ -201,4 +208,4 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) if ("select_person") AI.ai_camera_track(params["name"]) -#undef SENSORS_UPDATE_PERIOD \ No newline at end of file +#undef SENSORS_UPDATE_PERIOD diff --git a/tgui/packages/tgui/constants.js b/tgui/packages/tgui/constants.js index 92c1f80e6c04..26424dae50f3 100644 --- a/tgui/packages/tgui/constants.js +++ b/tgui/packages/tgui/constants.js @@ -20,6 +20,7 @@ export const COLORS = { science: '#9b59b6', engineering: '#f1c40f', cargo: '#f39c12', + civilian: '#535353', // Yogs: Added new civilian color centcom: '#00c100', other: '#c38312', }, diff --git a/tgui/packages/tgui/interfaces/CrewConsole.js b/tgui/packages/tgui/interfaces/CrewConsole.js index e3c184078c1b..039d3c6e5171 100644 --- a/tgui/packages/tgui/interfaces/CrewConsole.js +++ b/tgui/packages/tgui/interfaces/CrewConsole.js @@ -33,9 +33,15 @@ const jobToColor = jobId => { if (jobId >= 50 && jobId < 60) { return COLORS.department.cargo; } + if (jobId >= 60 && jobId < 80) { // Yogs: Extended this to 80 as we have more than 9 civilian jobs + return COLORS.department.civilian; // Yogs: Also added a new civilian color + } if (jobId >= 200 && jobId < 230) { return COLORS.department.centcom; } + if (jobId == 999) { // Yogs Start: Assistants need the new color too + return COLORS.department.civilian; + } // Yogs End return COLORS.department.other; }; @@ -70,26 +76,6 @@ export const CrewConsole = (props, context) => { resizable> - -
- {data.z === 2 && ( -
- {data["sensors"].map(sensor => ( - sensor.pos_x && ( -
- ) - ))} - -
- )} -
-
From d41d06e6a7c22a9f92108fabbf1957b41dbfbf34 Mon Sep 17 00:00:00 2001 From: nmajask Date: Thu, 10 Jun 2021 18:13:07 -0400 Subject: [PATCH 2/4] Fix my mistake Why do you yell at me now instead of when I compile you 5 times --- tgui/packages/tgui/interfaces/CrewConsole.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgui/packages/tgui/interfaces/CrewConsole.js b/tgui/packages/tgui/interfaces/CrewConsole.js index 039d3c6e5171..a607024f0e4e 100644 --- a/tgui/packages/tgui/interfaces/CrewConsole.js +++ b/tgui/packages/tgui/interfaces/CrewConsole.js @@ -39,7 +39,7 @@ const jobToColor = jobId => { if (jobId >= 200 && jobId < 230) { return COLORS.department.centcom; } - if (jobId == 999) { // Yogs Start: Assistants need the new color too + if (jobId === 999) { // Yogs Start: Assistants need the new color too return COLORS.department.civilian; } // Yogs End return COLORS.department.other; From bc3cf5bff809d80340f697971043324a2f3b4455 Mon Sep 17 00:00:00 2001 From: nmajask Date: Sat, 12 Jun 2021 00:24:22 -0400 Subject: [PATCH 3/4] Should prevent the crew console from processing map stuff Hope this works --- code/game/machinery/computer/crew.dm | 9 --------- 1 file changed, 9 deletions(-) diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index 8881f50788e3..3193eb58aa49 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -105,15 +105,6 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) z = T.z var/list/zdata = update_data(z) . = list() - var/datum/minimap/M = SSmapping.station_minimaps[1] - .["sensors"] = zdata - .["link_allowed"] = isAI(user) - .["z"] = z - .["minx"] = M.minx - .["miny"] = M.miny - .["maxx"] = M.maxx - .["maxy"] = M.maxy - .["map_filename"] = SSassets.transport.get_asset_url("minimap-1.png") /datum/crewmonitor/proc/update_data(z) if(data_by_z["[z]"] && last_update["[z]"] && world.time <= last_update["[z]"] + SENSORS_UPDATE_PERIOD) From baf15ae858965b25298c011b501ed6c1c5e226f9 Mon Sep 17 00:00:00 2001 From: nmajask Date: Thu, 17 Jun 2021 19:41:56 -0400 Subject: [PATCH 4/4] Potentially fixes the check fail Potentially fixes the check fail by removing an unused var --- code/game/machinery/computer/crew.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index 3193eb58aa49..c8d067f17013 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -103,7 +103,6 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) if(!z) var/turf/T = get_turf(user) z = T.z - var/list/zdata = update_data(z) . = list() /datum/crewmonitor/proc/update_data(z)