From 246b50bd4e2f4fc35def96c1fd59b4e5a917f3ed Mon Sep 17 00:00:00 2001 From: Ian Turk Date: Wed, 30 Aug 2017 17:05:31 -0600 Subject: [PATCH] Replaced datacore mob reference with a mind reference --- code/datums/datacore.dm | 2 +- code/game/gamemodes/objective.dm | 6 +++--- code/modules/paperwork/filingcabinet.dm | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index bd64f7b57b4..0685b5f0bee 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -273,7 +273,7 @@ L.fields["species"] = H.dna.species.type L.fields["features"] = H.dna.features L.fields["image"] = image - L.fields["reference"] = H + L.fields["mindref"] = H.mind locked += L return diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index bd73f92fc1e..e6a4b22486a 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -27,9 +27,9 @@ . = list() for(var/V in GLOB.data_core.locked) var/datum/data/record/R = V - var/mob/M = R.fields["reference"] - if(M && M.mind) - . += M.mind + var/datum/mind/M = R.fields["mindref"] + if(M) + . += M /datum/objective/proc/find_target() var/list/possible_targets = list() diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index f8c4cf1f731..3eac093f1b3 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -200,8 +200,9 @@ GLOBAL_LIST_EMPTY(employmentCabinets) var/datum/data/record/G = record if(!G) continue - if(G.fields["reference"]) - addFile(G.fields["reference"]) + var/datum/mind/M = G.fields["mindref"] + if(M && ishuman(M.current)) + addFile(M.current) /obj/structure/filingcabinet/employment/proc/addFile(mob/living/carbon/human/employee)