I suspect the issue is with null entries in the records list.

This just nukes them all before processing with sorting. I looked over all of the list accesses, and they didn't appear to be index controlled, so this shouldn't break anything.
This commit is contained in:
skull132
2017-05-21 17:20:22 +03:00
committed by GitHub
parent 2e87db1883
commit c230dc0f5e
5 changed files with 27 additions and 5 deletions
+6
View File
@@ -417,6 +417,8 @@ proc/get_id_photo(var/mob/living/carbon/human/H, var/assigned_role)
G.fields["notes"] = "No notes found."
general += G
G.inDataCore = 1
return G
/datum/datacore/proc/CreateSecurityRecord(var/name, var/id, var/incidents)
@@ -435,6 +437,8 @@ proc/get_id_photo(var/mob/living/carbon/human/H, var/assigned_role)
R.fields["incidents"] = incidents
data_core.security += R
R.inDataCore = 1
return R
/datum/datacore/proc/CreateMedicalRecord(var/name, var/id)
@@ -456,6 +460,8 @@ proc/get_id_photo(var/mob/living/carbon/human/H, var/assigned_role)
M.fields["notes"] = "No notes found."
data_core.medical += M
M.inDataCore = 1
return M
/datum/datacore/proc/ResetPDAManifest()
+12 -1
View File
@@ -21,8 +21,19 @@
/datum/data/record
name = "record"
size = 5.0
var/list/fields = list( )
var/list/fields = list()
var/inDataCore = 0
/datum/data/record/Destroy()
// Just remove us from everywhere. So we don't have to keep track of which list
// we're in specifically.
if (inDataCore && data_core)
data_core.general -= src
data_core.medical -= src
data_core.security -= src
data_core.locked -= src
return ..()
/datum/data/text
name = "text"