mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
adds implants and hair gradients to serialisation (#18934)
removes organ DNA from serialisation
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user