mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
lazy datacore fix
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user