Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions code/game/machinery/computer/crew.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,12 @@ 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
Expand All @@ -64,9 +60,6 @@ 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
Expand Down Expand Up @@ -103,7 +96,17 @@ 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()
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)
Expand Down Expand Up @@ -198,4 +201,4 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
if ("select_person")
AI.ai_camera_track(params["name"])

#undef SENSORS_UPDATE_PERIOD
#undef SENSORS_UPDATE_PERIOD
1 change: 0 additions & 1 deletion tgui/packages/tgui/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export const COLORS = {
science: '#9b59b6',
engineering: '#f1c40f',
cargo: '#f39c12',
civilian: '#535353', // Yogs: Added new civilian color
centcom: '#00c100',
other: '#c38312',
},
Expand Down
26 changes: 20 additions & 6 deletions tgui/packages/tgui/interfaces/CrewConsole.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,9 @@ 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;
};

Expand Down Expand Up @@ -76,6 +70,26 @@ export const CrewConsole = (props, context) => {
resizable>
<Window.Content scrollable>
<Flex>
<Flex.Item>
<Section>
{data.z === 2 && (
<div className="map">
{data["sensors"].map(sensor => (
sensor.pos_x && (
<div className="blip" style={
`left:${
(sensor.pos_x-data.minx)*(600/(data.maxx-data.minx))}px;
top:${
(data.maxy-sensor.pos_y)*(600/(data.maxx-data.minx))}px`
} />
)
))}
<img src={data.map_filename} width="600px"
style={`-ms-interpolation-mode: nearest-neighbor`} />
</div>
)}
</Section>
</Flex.Item>
<Flex.Item>
<Section minHeight={90}>
<Table>
Expand Down