Traumas are copied when a person is cloned (#41852)

* Traumas are copied when a person is cloned

🆑 coiax
add: When a person is cloned, any mental traumas are cloned as well.
/🆑

If the cloner is going to recreate your delicate personality, it's going
to have to recreate anything wrong with your brain as well. After all,
where does one greytider's legitimate fear of security end, and another
one's irrational fear begin?

Essentially, traumas could be easily gotten rid of by cloning, or death
would rob a person of a rare positive trauma. Now you're stuck with them
until you get rid of them.

* Suggested changes
This commit is contained in:
coiax
2019-01-30 16:36:20 +00:00
committed by moo
parent 9ad0220904
commit e65e50e8d9
5 changed files with 28 additions and 10 deletions

View File

@@ -14,6 +14,7 @@
var/can_gain = TRUE
var/random_gain = TRUE //can this be gained through random traumas?
var/resilience = TRAUMA_RESILIENCE_BASIC //how hard is this to cure?
var/clonable = TRUE // will this transfer if the brain is cloned?
/datum/brain_trauma/Destroy()
if(brain && brain.traumas)
@@ -24,6 +25,10 @@
owner = null
return ..()
/datum/brain_trauma/proc/on_clone()
if(clonable)
return new type
//Called on life ticks
/datum/brain_trauma/proc/on_life()
return

View File

@@ -31,6 +31,11 @@
trigger_species = SStraumas.phobia_species[phobia_type]
..()
/datum/brain_trauma/mild/phobia/on_clone()
if(clonable)
return new type(phobia_type)
/datum/brain_trauma/mild/phobia/on_life()
..()
if(owner.has_trait(TRAIT_FEARLESS))

View File

@@ -137,7 +137,7 @@
return examine(user)
//Start growing a human clone in the pod!
/obj/machinery/clonepod/proc/growclone(clonename, ui, mutation_index, mindref, last_death, datum/species/mrace, list/features, factions, list/quirks, datum/bank_account/insurance)
/obj/machinery/clonepod/proc/growclone(clonename, ui, mutation_index, mindref, last_death, datum/species/mrace, list/features, factions, list/quirks, datum/bank_account/insurance, list/traumas)
if(panel_open)
return NONE
if(mess || attempting)
@@ -218,6 +218,12 @@
var/datum/quirk/Q = new V(H)
Q.on_clone(quirks[V])
for(var/t in traumas)
var/datum/brain_trauma/BT = t
var/datum/brain_trauma/cloned_trauma = BT.on_clone()
if(cloned_trauma)
H.gain_trauma(cloned_trauma, BT.resilience)
H.set_cloned_appearance()
H.set_suicide(FALSE)
@@ -388,7 +394,6 @@
mob_occupant.remove_trait(TRAIT_NOCRITDAMAGE, CLONING_POD_TRAIT)
mob_occupant.remove_trait(TRAIT_NOBREATH, CLONING_POD_TRAIT)
if(grab_ghost_when == CLONER_MATURE_CLONE)
mob_occupant.grab_ghost()
to_chat(occupant, "<span class='notice'><b>There is a bright flash!</b><br><i>You feel like a new being.</i></span>")

View File

@@ -63,7 +63,7 @@
. = pod
/proc/grow_clone_from_record(obj/machinery/clonepod/pod, datum/data/record/R)
return pod.growclone(R.fields["name"], R.fields["UI"], R.fields["SE"], R.fields["mind"], R.fields["last_death"], R.fields["mrace"], R.fields["features"], R.fields["factions"], R.fields["quirks"], R.fields["bank_account"])
return pod.growclone(R.fields["name"], R.fields["UI"], R.fields["SE"], R.fields["mind"], R.fields["last_death"], R.fields["mrace"], R.fields["features"], R.fields["factions"], R.fields["quirks"], R.fields["bank_account"], R.fields["traumas"])
/obj/machinery/computer/cloning/process()
if(!(scanner && LAZYLEN(pods) && autoprocess))
@@ -567,11 +567,17 @@
R.fields["features"] = dna.features
R.fields["factions"] = mob_occupant.faction
R.fields["quirks"] = list()
R.fields["bank_account"] = has_bank_account
for(var/V in mob_occupant.roundstart_quirks)
var/datum/quirk/T = V
R.fields["quirks"][T.type] = T.clone_data()
R.fields["traumas"] = list()
if(ishuman(mob_occupant))
R.fields["traumas"] = C.get_traumas()
if(isbrain(mob_occupant))
R.fields["traumas"] = B.get_traumas()
R.fields["bank_account"] = has_bank_account
R.fields["mind"] = "[REF(mob_occupant.mind)]"
R.fields["last_death"] = mob_occupant.stat == DEAD ? mob_occupant.mind.last_death : -1
@@ -588,7 +594,3 @@
if(old_record)
records -= old_record
scantemp = "Record updated."
else
scantemp = "Subject successfully scanned."
records += R
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)

View File

@@ -244,6 +244,7 @@
if(paranoia)
QDEL_NULL(paranoia)
paranoia = new()
paranoia.clonable = FALSE
user.gain_trauma(paranoia, TRAUMA_RESILIENCE_MAGIC)
to_chat(user, "<span class='warning'>As you don the foiled hat, an entire world of conspiracy theories and seemingly insane ideas suddenly rush into your mind. What you once thought unbelievable suddenly seems.. undeniable. Everything is connected and nothing happens just by accident. You know too much and now they're out to get you. </span>")