Changelings now update their flavor text upon transforming. Updates DNA to include flavor text. (#26094)

* Fixes https://github.com/ParadiseSS13/Paradise/issues/3352

* bleugh
This commit is contained in:
Spaghetti-bit
2024-07-03 03:55:13 +00:00
committed by GitHub
parent 1a3a77d42c
commit 3e46e525da
8 changed files with 32 additions and 15 deletions
+19 -8
View File
@@ -23,9 +23,12 @@ GLOBAL_LIST_EMPTY(bad_blocks)
/datum/dna
// READ-ONLY, GETS OVERWRITTEN
// DO NOT FUCK WITH THESE OR BYOND WILL EAT YOUR FACE
var/uni_identity = "" // Encoded UI
var/struc_enzymes = "" // Encoded SE
var/unique_enzymes = "" // MD5 of player name
/// Encoded UI
var/uni_identity = ""
/// Encoded SE
var/struc_enzymes = ""
/// MD5 of player name
var/unique_enzymes = ""
// Original Encoded SE, for use with Ryetalin
var/struc_enzymes_original = "" // Encoded SE
@@ -41,11 +44,16 @@ GLOBAL_LIST_EMPTY(bad_blocks)
var/list/UI[DNA_UI_LENGTH]
// From old dna.
var/blood_type = "A+" // Should probably change to an integer => string map but I'm lazy.
var/real_name // Stores the real name of the person who originally got this dna datum. Used primarily for changelings,
var/datum/species/species = new /datum/species/human //The type of mutant race the player is if applicable (i.e. potato-man)
var/list/default_blocks = list() //list of all blocks toggled at roundstart
/// The blood type of the mob.
var/blood_type = "A+"
/// Stores the real name of the person who originally got this dna datum. Used primarily for changelings,
var/real_name
/// The type of mutant race the player is if applicable (i.e. potato-man)
var/datum/species/species = new /datum/species/human
/// list of all blocks toggled at roundstart
var/list/default_blocks = list()
/// The flavor text of the person. We store this here for polymorph and changelings.
var/flavor_text
// Make a copy of this strand.
// USE THIS WHEN COPYING STUFF OR YOU'LL GET CORRUPTION!
@@ -57,6 +65,7 @@ GLOBAL_LIST_EMPTY(bad_blocks)
new_dna.blood_type = blood_type
new_dna.real_name = real_name
new_dna.species = new species.type
new_dna.flavor_text = flavor_text
for(var/b = 1; b <= DNA_SE_LENGTH; b++)
new_dna.SE[b]=SE[b]
@@ -439,6 +448,7 @@ GLOBAL_LIST_EMPTY(bad_blocks)
// Because old DNA coders were insane or something
data["blood_type"] = blood_type
data["real_name"] = real_name
data["flavor_text"] = flavor_text
return data
/datum/dna/deserialize(data)
@@ -452,6 +462,7 @@ GLOBAL_LIST_EMPTY(bad_blocks)
species = new S
blood_type = data["blood_type"]
real_name = data["real_name"]
flavor_text = data["flavor_text"]
/datum/dna/proc/transfer_identity(mob/living/carbon/human/destination)
if(!istype(destination))
@@ -123,6 +123,7 @@
H.real_name = team_name + " Agent"
H.cleanSE() //No fat/blind/colourblind/epileptic/whatever ayys.
H.overeatduration = 0
H.dna.flavor_text = null
H.flavor_text = null
H.equipOutfit(/datum/outfit/abductor/agent)
greet_agent(agent,team_number)
@@ -140,6 +141,7 @@
H.real_name = team_name + " Scientist"
H.cleanSE() //No fat/blind/colourblind/epileptic/whatever ayys.
H.overeatduration = 0
H.dna.flavor_text = null
H.flavor_text = null
H.equipOutfit(/datum/outfit/abductor/scientist)
greet_scientist(scientist,team_number)
+2 -1
View File
@@ -164,11 +164,12 @@
var/mob/living/carbon/human/M = synd_mind.current
M.set_species(/datum/species/human, TRUE)
M.dna.flavor_text = null
M.flavor_text = null
M.dna.ready_dna(M) // Quadriplegic Nuke Ops won't be participating in the paralympics
M.dna.species.create_organs(M)
M.cleanSE() //No fat/blind/colourblind/epileptic/whatever ops.
M.overeatduration = 0
M.flavor_text = null
var/obj/item/organ/external/head/head_organ = M.get_organ("head")
var/hair_c = pick("#8B4513","#000000","#FF4500","#FFD700") // Brown, black, red, blonde
+1 -1
View File
@@ -313,7 +313,7 @@
/obj/machinery/clonepod/proc/create_clone()
clone = new /mob/living/carbon/human(src, patient_data.genetic_info.species.type)
clone.change_dna(patient_data.genetic_info, FALSE, TRUE)
clone.change_dna(patient_data.genetic_info, FALSE)
for(var/obj/item/organ/external/limb in clone.bodyparts)
if(!(limb.limb_name in limbs_to_grow)) //if the limb was determined to be vital