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()
|
||||
|
||||
Reference in New Issue
Block a user