Adds Trait Genetics (#16921)

* Adds Trait Genetics from Outpost21

Adds trait genetics from Outpost 21
- Tried to update each file it touched to be equivalent to their Chomp specific variants in order to maintain functionality and make sure no oddities would happen due to code differences. (Some things like the eardeaf loop were left there but commented out)

* Morph trait

* Fixes a server crashing bug with flip

aa

* flip

* Makes morph superpower better

- Makes it use the appearance_changer instead of 1000 different  procs

- Makes cocoon weaver able to change eye and skin color.

I did NOT select you. BAD

* begone

* fix dna modifier

* Fixes massive memory leak

* Brain Runtime Fix

* There was no reason for this to be a spawn(0)

And no I didn't spawn with no blood - https://i.imgur.com/vPizqCD.png

* revert

revert the dna changes there

* Deconf

* gets rid of unused proc vars that did nothing

* expects enough free slots

* glob

* fixed and added two other tests

* another few tests

* this is a list

* fixed bad injector

* lets wrap these for sanity

* better feedback

* wrong name

* don't allow multiple occupants into the dna pod

* future traits will have activation levels instead of binary on/off

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: Willburd <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
Cameron Lennox
2025-02-11 02:01:27 -05:00
committed by GitHub
co-authored by Kashargul Willburd
parent 408b765def
commit cdafe425a5
108 changed files with 3805 additions and 2014 deletions
+27 -48
View File
@@ -718,11 +718,20 @@
M.heal_organ_damage(3 * removed, 0) //Gives the bones a chance to set properly even without other meds
if(ishuman(M))
var/mob/living/carbon/human/H = M
for(var/obj/item/organ/external/O in H.bad_external_organs)
if(O.status & ORGAN_BROKEN)
O.mend_fracture() //Only works if the bone won't rebreak, as usual
H.custom_pain("You feel a terrible agony tear through your bones!",60)
H.AdjustWeakened(1) //Bones being regrown will knock you over
var/totalvol = 0
if(H.ingested)
for(var/datum/reagent/R in H.ingested.reagent_list)
if(istype(R,/datum/reagent/osteodaxon))
totalvol += R.volume
totalvol += volume
if(totalvol >= 1)
for(var/obj/item/organ/external/O in H.bad_external_organs)
if(O.status & ORGAN_BROKEN)
O.mend_fracture() //Only works if the bone won't rebreak, as usual
H.custom_pain(span_danger("<b><font size=2>You feel a terrible agony tear through your [O.name]!</font></b>"),60,TRUE)
H.AdjustWeakened(10) //Bones being regrown will knock you over
H.adjustHalLoss(60)
H.AdjustStunned(1) //Bones being regrown will knock you over
/datum/reagent/myelamine
name = REAGENT_MYELAMINE
@@ -730,11 +739,11 @@
description = "Used to rapidly clot internal hemorrhages by increasing the effectiveness of platelets."
reagent_state = LIQUID
color = "#4246C7"
metabolism = REM * 0.5
metabolism = REM * 0.75
overdose = REAGENTS_OVERDOSE * 0.5
overdose_mod = 1.5
scannable = 1
var/repair_strength = 5
var/repair_strength = 6
/datum/reagent/myelamine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_DIONA)
@@ -908,6 +917,7 @@
overdose = 20
overdose_mod = 1.5
scannable = 1
metabolism = REM * 0.06
/datum/reagent/immunosuprizine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
var/strength_mod = 1 * M.species.chem_strength_heal
@@ -955,14 +965,14 @@
H.adjustToxLoss((15 / strength_mod))
I.take_damage(1)
/datum/reagent/skrellimmuno
/datum/reagent/skrellimmuno //skrell exist?
name = REAGENT_MALISHQUALEM
id = REAGENT_ID_MALISHQUALEM
description = "A strange, oily powder used by Malish-Katish to prevent organ rejection."
taste_description = "mordant"
reagent_state = SOLID
color = "#84B2B0"
metabolism = REM * 0.75
metabolism = REM * 0.06
overdose = 20
overdose_mod = 1.5
scannable = 1
@@ -1004,49 +1014,18 @@
/datum/reagent/ryetalyn
name = REAGENT_RYETALYN
id = REAGENT_ID_RYETALYN
description = REAGENT_RYETALYN + " can cure all genetic abnomalities via a catalytic process."
description = REAGENT_RYETALYN + " can cure DNA, Cloning, and genetic damage via a catalytic process."
taste_description = "acid"
reagent_state = SOLID
color = "#004000"
overdose = REAGENTS_OVERDOSE
/datum/reagent/ryetalyn/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
var/needs_update = M.mutations.len > 0
M.mutations = list()
M.disabilities = 0
M.sdisabilities = 0
var/mob/living/carbon/human/H = M
if(alien == IS_SLIME && istype(H)) //Shifts them toward white, faster than Rezadone does toward grey.
if(prob(50))
if(H.r_skin)
H.r_skin = round((H.r_skin + 510)/3)
if(H.r_hair)
H.r_hair = round((H.r_hair + 510)/3)
if(H.r_facial)
H.r_facial = round((H.r_facial + 510)/3)
H.adjustToxLoss(6 * removed)
if(prob(50))
if(H.g_skin)
H.g_skin = round((H.g_skin + 510)/3)
if(H.g_hair)
H.g_hair = round((H.g_hair + 510)/3)
if(H.g_facial)
H.g_facial = round((H.g_facial + 510)/3)
H.adjustToxLoss(6 * removed)
if(prob(50))
if(H.b_skin)
H.b_skin = round((H.b_skin + 510)/3)
if(H.b_hair)
H.b_hair = round((H.b_hair + 510)/3)
if(H.b_facial)
H.b_facial = round((H.b_facial + 510)/3)
H.adjustToxLoss(6 * removed)
// Might need to update appearance for hulk etc.
if(needs_update && ishuman(M))
H.update_mutations()
//Ryetalyn is for genetics damage curing not resetting mutations, breaks traitgenes
if(alien == IS_DIONA)
return
var/chem_effective = 1 * M.species.chem_strength_heal
M.adjustCloneLoss(-2 * removed * chem_effective)
/datum/reagent/ethylredoxrazine
name = REAGENT_ETHYLREDOXRAZINE
@@ -1198,7 +1177,7 @@
var/obj/item/organ/external/O = pick(H.organs)
if(prob(20) && !istype(O, /obj/item/organ/external/chest/unbreakable/slime) && !istype(O, /obj/item/organ/external/groin/unbreakable/slime))
to_chat(M, span_critical("You feel your [O] begin to dissolve, before it sloughs from your body."))
O.droplimb() //Splat.
O.droplimb(TRUE, DROPLIMB_ACID)
return
//Based roughly on Levofloxacin's rather severe side-effects
@@ -1212,7 +1191,7 @@
M.hallucination = max(M.hallucination, 10)
//One of the levofloxacin side effects is 'spontaneous tendon rupture', which I'll immitate here. 1:1000 chance, so, pretty darn rare.
if(ishuman(M) && rand(1,10000) == 1) //VOREStation Edit (more rare)
if(ishuman(M) && rand(1,10000) == 1) //Adjusted to 1:10000
var/obj/item/organ/external/eo = pick(H.organs) //Misleading variable name, 'organs' is only external organs
eo.fracture()
+4 -16
View File
@@ -186,12 +186,12 @@
taste_mult = 0.6
reagent_state = LIQUID
color = "#CF3600"
strength = 20
metabolism = REM * 2
strength = 15
metabolism = REM * 0.5
/datum/reagent/toxin/cyanide/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
..()
M.adjustOxyLoss(20 * removed)
M.adjustOxyLoss(10 * removed)
M.Sleeping(1)
/datum/reagent/toxin/mold
@@ -614,16 +614,12 @@
if(M.dna)
if(prob(removed * 10)) // Removed is .2 per tick. Multiplying it by 10 makes it a 2% chance per tick. 10 units has 50 ticks, so 10 units injected should give a single good/bad mutation.
randmuti(M)
if(prob(98))
randmutb(M)
else
randmutg(M)
domutcheck(M, null)
M.UpdateAppearance()
if(prob(removed * 40)) //Additionally, let's make it so there's an 8% chance per tick for a random cosmetic/not guranteed good/bad mutation.
randmuti(M)//This should equate to 4 random cosmetic mutations per 10 injected/20 ingested/30 touching units
to_chat(M, span_warning("You feel odd!"))
M.apply_effect(10 * removed, IRRADIATE, 0)
/datum/reagent/slimejelly
@@ -884,16 +880,12 @@
if(M.dna)
if(prob(removed * 10))
randmuti(M)
if(prob(98))
randmutb(M)
else
randmutg(M)
domutcheck(M, null)
M.UpdateAppearance()
if(prob(removed * 40))
randmuti(M)
to_chat(M, span_warning("You feel odd!"))
M.apply_effect(16 * removed, IRRADIATE, 0)
/datum/reagent/aslimetoxin
@@ -904,7 +896,7 @@
reagent_state = LIQUID
color = "#FF69B4"
/datum/reagent/aslimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) // TODO: check if there's similar code anywhere else
/datum/reagent/aslimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(M.isSynthetic())
return
@@ -914,16 +906,12 @@
if(M.dna)
if(prob(removed * 10))
randmuti(M)
if(prob(98))
randmutb(M)
else
randmutg(M)
domutcheck(M, null)
M.UpdateAppearance()
if(prob(removed * 40))
randmuti(M)
to_chat(M, span_warning("You feel odd!"))
M.apply_effect(6 * removed, IRRADIATE, 0)
/*