Merge pull request #12390 from Ghommie/Ghommie-cit800
Porting brain trauma updates: Curse of madness, cloning traumas, random brain trauma event.
This commit is contained in:
@@ -51,4 +51,4 @@
|
||||
|
||||
H.dna.add_mutation(CLOWNMUT)
|
||||
H.dna.add_mutation(SMILE)
|
||||
H.gain_trauma(/datum/brain_trauma/mild/phobia, TRAUMA_RESILIENCE_LOBOTOMY, "clowns") //MWA HA HA
|
||||
H.gain_trauma(/datum/brain_trauma/mild/phobia/clowns, TRAUMA_RESILIENCE_LOBOTOMY) //MWA HA HA
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
return examine(user)
|
||||
|
||||
//Start growing a human clone in the pod!
|
||||
/obj/machinery/clonepod/proc/growclone(ckey, clonename, ui, mutation_index, mindref, datum/species/mrace, list/features, factions, list/quirks, datum/bank_account/insurance)
|
||||
/obj/machinery/clonepod/proc/growclone(ckey, clonename, ui, mutation_index, mindref, datum/species/mrace, list/features, factions, list/quirks, datum/bank_account/insurance, list/traumas)
|
||||
if(panel_open)
|
||||
return FALSE
|
||||
if(mess || attempting)
|
||||
@@ -209,6 +209,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.give_genitals(TRUE)
|
||||
|
||||
@@ -271,9 +277,6 @@
|
||||
var/obj/item/bodypart/BP = I
|
||||
BP.attach_limb(mob_occupant)
|
||||
|
||||
//Premature clones may have brain damage.
|
||||
mob_occupant.adjustOrganLoss(ORGAN_SLOT_BRAIN, -((speed_coeff / 2) * dmg_mult))
|
||||
|
||||
use_power(7500) //This might need tweaking.
|
||||
|
||||
else if((mob_occupant && mob_occupant.cloneloss <= (100 - heal_level)))
|
||||
@@ -399,6 +402,8 @@
|
||||
to_chat(occupant, "<span class='notice'><b>There is a bright flash!</b><br><i>You feel like a new being.</i></span>")
|
||||
mob_occupant.flash_act()
|
||||
|
||||
mob_occupant.adjustOrganLoss(ORGAN_SLOT_BRAIN, mob_occupant.getCloneLoss())
|
||||
|
||||
occupant.forceMove(T)
|
||||
update_icon()
|
||||
mob_occupant.domutcheck(1) //Waiting until they're out before possible monkeyizing. The 1 argument forces powers to manifest.
|
||||
@@ -474,10 +479,9 @@
|
||||
unattached_flesh.Cut()
|
||||
|
||||
H.setCloneLoss(CLONE_INITIAL_DAMAGE) //Yeah, clones start with very low health, not with random, because why would they start with random health
|
||||
//H.setOrganLoss(ORGAN_SLOT_BRAIN, CLONE_INITIAL_DAMAGE)
|
||||
// In addition to being cellularly damaged and having barely any
|
||||
|
||||
// brain function, they also have no limbs or internal organs.
|
||||
// In addition to being cellularly damaged, they also have no limbs or internal organs.
|
||||
// Applying brainloss is done when the clone leaves the pod, so application of traumas can happen.
|
||||
// based on the level of damage sustained.
|
||||
|
||||
if(!HAS_TRAIT(H, TRAIT_NODISMEMBER))
|
||||
var/static/list/zones = list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG)
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
if(pod.occupant)
|
||||
continue //how though?
|
||||
|
||||
if(pod.growclone(R.fields["ckey"], R.fields["name"], R.fields["UI"], R.fields["SE"], R.fields["mind"], R.fields["mrace"], R.fields["features"], R.fields["factions"], R.fields["quirks"], R.fields["bank_account"]))
|
||||
if(pod.growclone(R.fields["ckey"], R.fields["name"], R.fields["UI"], R.fields["SE"], R.fields["mind"], R.fields["mrace"], R.fields["features"], R.fields["factions"], R.fields["quirks"], R.fields["bank_account"], R.fields["traumas"]))
|
||||
temp = "[R.fields["name"]] => <font class='good'>Cloning cycle in progress...</font>"
|
||||
records -= R
|
||||
|
||||
@@ -442,14 +442,17 @@
|
||||
var/mob/living/mob_occupant = get_mob_or_brainmob(occupant)
|
||||
var/datum/dna/dna
|
||||
var/datum/bank_account/has_bank_account
|
||||
|
||||
// Do not use unless you know what they are.
|
||||
var/mob/living/carbon/C = mob_occupant
|
||||
var/mob/living/brain/B = mob_occupant
|
||||
|
||||
if(ishuman(mob_occupant))
|
||||
var/mob/living/carbon/C = mob_occupant
|
||||
dna = C.has_dna()
|
||||
var/obj/item/card/id/I = C.get_idcard()
|
||||
if(I)
|
||||
has_bank_account = I.registered_account
|
||||
if(isbrain(mob_occupant))
|
||||
var/mob/living/brain/B = mob_occupant
|
||||
dna = B.stored_dna
|
||||
|
||||
if(!istype(dna))
|
||||
@@ -497,11 +500,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
|
||||
if (!isnull(mob_occupant.mind)) //Save that mind so traitors can continue traitoring after cloning.
|
||||
R.fields["mind"] = "[REF(mob_occupant.mind)]"
|
||||
|
||||
|
||||
@@ -370,6 +370,14 @@
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/reagent_containers/pill/breast_enlargement(src)
|
||||
|
||||
/obj/item/storage/pill_bottle/neurine
|
||||
name = "bottle of neurine pills"
|
||||
desc = "Contains pills to treat non-severe mental traumas."
|
||||
|
||||
/obj/item/storage/pill_bottle/neurine/PopulateContents()
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/reagent_containers/pill/neurine(src)
|
||||
|
||||
/////////////
|
||||
//Organ Box//
|
||||
/////////////
|
||||
|
||||
Reference in New Issue
Block a user