mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
[MIRROR] Proper custom job name support [MDB IGNORE] (#9547)
* Proper custom job name support * merge (#9552) Co-authored-by: Tastyfish <crazychris32@gmail.com>
This commit is contained in:
@@ -137,10 +137,11 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
|
||||
manifest_inject(N.new_character, N.client)
|
||||
CHECK_TICK
|
||||
|
||||
/datum/datacore/proc/manifest_modify(name, assignment)
|
||||
/datum/datacore/proc/manifest_modify(name, assignment, trim)
|
||||
var/datum/data/record/foundrecord = find_record("name", name, GLOB.data_core.general)
|
||||
if(foundrecord)
|
||||
foundrecord.fields["rank"] = assignment
|
||||
foundrecord.fields["trim"] = trim
|
||||
|
||||
|
||||
/datum/datacore/proc/get_manifest()
|
||||
@@ -153,8 +154,9 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
|
||||
var/list/departments_by_type = SSjob.joinable_departments_by_type
|
||||
for(var/datum/data/record/record as anything in GLOB.data_core.general)
|
||||
var/name = record.fields["name"]
|
||||
var/rank = record.fields["rank"]
|
||||
var/datum/job/job = SSjob.GetJob(rank)
|
||||
var/rank = record.fields["rank"] // user-visible job
|
||||
var/trim = record.fields["trim"] // internal jobs by trim type
|
||||
var/datum/job/job = SSjob.GetJob(trim)
|
||||
if(!job || !(job.job_flags & JOB_CREW_MANIFEST) || !LAZYLEN(job.departments_list)) // In case an unlawful custom rank is added.
|
||||
var/list/misc_list = manifest_out[DEPARTMENT_UNASSIGNED]
|
||||
misc_list[++misc_list.len] = list(
|
||||
@@ -243,6 +245,8 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
|
||||
G.fields["id"] = id
|
||||
G.fields["name"] = H.real_name
|
||||
G.fields["rank"] = assignment
|
||||
G.fields["trim"] = assignment
|
||||
G.fields["initial_rank"] = assignment
|
||||
G.fields["age"] = H.age
|
||||
G.fields["species"] = H.dna.species.name
|
||||
G.fields["fingerprint"] = md5(H.dna.unique_identity)
|
||||
@@ -312,6 +316,8 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
|
||||
L.fields["id"] = md5("[H.real_name][assignment]") //surely this should just be id, like the others?
|
||||
L.fields["name"] = H.real_name
|
||||
L.fields["rank"] = assignment
|
||||
L.fields["trim"] = assignment
|
||||
G.fields["initial_rank"] = assignment
|
||||
L.fields["age"] = H.age
|
||||
L.fields["gender"] = H.gender
|
||||
if(H.gender == "male")
|
||||
|
||||
Reference in New Issue
Block a user