adds implants and hair gradients to serialisation (#18934)

removes organ DNA from serialisation
This commit is contained in:
S34N
2022-09-03 21:14:44 +01:00
committed by GitHub
parent 281766db83
commit 021fd9a416
4 changed files with 24 additions and 15 deletions
+2 -11
View File
@@ -291,13 +291,8 @@ I use this so that this can be made better once the organ overhaul rolls out --
/obj/item/organ/serialize()
var/data = ..()
if(status != 0)
if(status)
data["status"] = status
// Save the DNA datum if: The owner doesn't exist, or the dna doesn't match the owner
// Don't save when the organ has no initialized DNA. Happens when you spawn it in as admin
if(dna.unique_enzymes && !(owner && dna.unique_enzymes == owner.dna.unique_enzymes))
data["dna"] = dna.serialize()
return data
/obj/item/organ/deserialize(data)
@@ -305,8 +300,4 @@ I use this so that this can be made better once the organ overhaul rolls out --
if(data["status"] & ORGAN_ROBOT)
robotize()
status = data["status"]
if(islist(data["dna"]))
// The only thing the official proc does is
//instantiate the list and call this proc
dna.deserialize(data["dna"])
..()
..()
@@ -233,6 +233,9 @@
if(!length(contents))
. += "<span class='warning'>There is nothing left inside!</span>"
/obj/item/organ/external/head/vars_to_save()
return list("color", "name", "h_grad_style", "h_grad_offset_x", "h_grad_offset_y", "h_grad_colour", "h_grad_alpha")
/obj/item/organ/external/head/remove()
if(owner)
if(!istype(dna))