diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index dc429702f1..5aeb7626f6 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -91,6 +91,42 @@ if(foundrecord) foundrecord.fields["rank"] = assignment +/datum/datacore/proc/get_manifest_tg() //copypasted from tg, renamed to avoid namespace conflicts + var/list/manifest_out = list() + var/list/departments = list( + "Command" = GLOB.command_positions, + "Security" = GLOB.security_positions, + "Engineering" = GLOB.engineering_positions, + "Medical" = GLOB.medical_positions, + "Science" = GLOB.science_positions, + "Supply" = GLOB.supply_positions, + "Service" = GLOB.civilian_positions, + "Silicon" = GLOB.nonhuman_positions + ) + for(var/datum/data/record/t in GLOB.data_core.general) + var/name = t.fields["name"] + var/rank = t.fields["rank"] + var/has_department = FALSE + for(var/department in departments) + var/list/jobs = departments[department] + if(rank in jobs) + if(!manifest_out[department]) + manifest_out[department] = list() + manifest_out[department] += list(list( + "name" = name, + "rank" = rank + )) + has_department = TRUE + break + if(!has_department) + if(!manifest_out["Misc"]) + manifest_out["Misc"] = list() + manifest_out["Misc"] += list(list( + "name" = name, + "rank" = rank + )) + return manifest_out + /datum/datacore/proc/get_manifest(monochrome, OOC) var/list/heads = list() var/list/sec = list() diff --git a/code/modules/atmospherics/machinery/components/binary_devices/relief_valve.dm b/code/modules/atmospherics/machinery/components/binary_devices/relief_valve.dm index 5dd86b0009..d0b663e4ad 100644 --- a/code/modules/atmospherics/machinery/components/binary_devices/relief_valve.dm +++ b/code/modules/atmospherics/machinery/components/binary_devices/relief_valve.dm @@ -60,7 +60,7 @@ else if(!opened && our_pressure >= open_pressure) open() -/obj/machinery/atmospherics/components/unary/relief_valve/ui_interact(mob/user, datum/tgui/ui) +/obj/machinery/atmospherics/components/binary/relief_valve/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if(!ui) ui = new(user, src, "AtmosRelief", name) @@ -78,7 +78,7 @@ return switch(action) if("open_pressure") - var/pressure = params["open_pressure"] + var/pressure = params["pressure"] if(pressure == "max") pressure = 50*ONE_ATMOSPHERE . = TRUE @@ -93,7 +93,7 @@ open_pressure = clamp(pressure, close_pressure, 50*ONE_ATMOSPHERE) investigate_log("open pressure was set to [open_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS) if("close_pressure") - var/pressure = params["close_pressure"] + var/pressure = params["pressure"] if(pressure == "max") pressure = open_pressure . = TRUE diff --git a/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm b/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm index 9c275e018b..f0d0d1d856 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/relief_valve.dm @@ -79,7 +79,7 @@ return switch(action) if("open_pressure") - var/pressure = params["open_pressure"] + var/pressure = params["pressure"] if(pressure == "max") pressure = 50*ONE_ATMOSPHERE . = TRUE @@ -94,7 +94,7 @@ open_pressure = clamp(pressure, close_pressure, 50*ONE_ATMOSPHERE) investigate_log("open pressure was set to [open_pressure] kPa by [key_name(usr)]", INVESTIGATE_ATMOS) if("close_pressure") - var/pressure = params["close_pressure"] + var/pressure = params["pressure"] if(pressure == "max") pressure = open_pressure . = TRUE diff --git a/code/modules/modular_computers/file_system/programs/crewmanifest.dm b/code/modules/modular_computers/file_system/programs/crewmanifest.dm index 37961d5803..a1503ce3a8 100644 --- a/code/modules/modular_computers/file_system/programs/crewmanifest.dm +++ b/code/modules/modular_computers/file_system/programs/crewmanifest.dm @@ -10,7 +10,7 @@ /datum/computer_file/program/crew_manifest/ui_static_data(mob/user) var/list/data = list() - data["manifest"] = GLOB.data_core.get_manifest() + data["manifest"] = GLOB.data_core.get_manifest_tg() return data /datum/computer_file/program/crew_manifest/ui_data(mob/user)