Merge pull request #1741 from VOREStation/gc-data-record

Fixes players not being removed from the manifest immediately when cryoing.
This commit is contained in:
Arokha Sieyes
2017-06-15 18:39:27 -04:00
committed by GitHub
2 changed files with 50 additions and 35 deletions

View File

@@ -180,6 +180,8 @@
return "[..()] ([ckey])" return "[..()] ([ckey])"
/proc/log_info_line(var/datum/d) /proc/log_info_line(var/datum/d)
if(!d)
return "*null*"
if(!istype(d)) if(!istype(d))
return return json_encode(d)
return d.log_info_line() return d.log_info_line()

View File

@@ -1,34 +1,47 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 //This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
/datum/data /datum/data
var/name = "data" var/name = "data"
var/size = 1.0 var/size = 1.0
/datum/data/function /datum/data/function
name = "function" name = "function"
size = 2.0 size = 2.0
/datum/data/function/data_control /datum/data/function/data_control
name = "data control" name = "data control"
/datum/data/function/id_changer /datum/data/function/id_changer
name = "id changer" name = "id changer"
/datum/data/record /datum/data/record
name = "record" name = "record"
size = 5.0 size = 5.0
var/list/fields = list( ) var/list/fields = list( )
// Mostly used for data_core records, but unfortuantely used some other places too. But mostly here, so lets make a good effort.
/datum/data/text // TODO - Some machines/computers might be holding references to us. Lets look into that, but at least for now lets make sure that the manifest is cleaned up.
name = "text" /datum/data/record/Destroy(var/force)
var/data = null if(data_core.locked.Find(src))
if(!force)
crash_with("Someone tried to qdel a record that was in data_core.locked [log_info_line(src)]")
return QDEL_HINT_LETMELIVE
/datum/debug data_core.locked -= src
var/list/debuglist data_core.medical -= src
data_core.general -= src
data_core.security -= src
..()
return QDEL_HINT_FINDREFERENCE // If we must, we can resort to QDEL_HINT_HARDDEL. But lets see how this works in practice ~Leshana
/datum/data/text
name = "text"
var/data = null
/datum/debug
var/list/debuglist