Files
cbd3f1ea2b Dna, Bodyrecord, Xenochi Revive Refactor (#17732)
* changeling fix

* Move body spawning into BR

* small fix, organization

* replace xeno regen

* Body descriptor system removed

* Revert "Body descriptor system removed"

This reverts commit 04a0aa3ac8.

* massive bodyrecord copy refactor

* this too

* dna copying is now sane

* make a merge easier

* better file for this

* may we ensure peace everlasting

* linter

* oops, missed the test

* fixed up

* furthering the test

* different way to check

* looking promising

* required exclusions

* more test

* another tweak

* setup better

* globin

* test name change

* really mess up that monkey

* gradient style to UI entry

* scramble ignore

* illegal species

* scramble fix

* grad fix, more test fixes

* doing that right

* need these too

* missed defferal

* missed pathing

* documentation wall

* blood color needs a safety

* promethean prep

* this early set isn't needed

* some protections

* fixed waddler nulltest

* failure test

* intensify scan

* second fail test

* noticing

* dna test case

* other dna test case

* Test is bunk

* huge dna cleanup, better signal

* don't edit these

* documentation

* Do not use loc = src.loc

* oops

* Use weakrefs in pods

* remaining weakrefs

* reduce changes in pr

* cloning computer does not rotate itself when used

* moved body design to new BR code, and fixed screen size

* badlinting

* updated

* No instakilling teshari

* jiggles you

* TGUI

* move along

* m ove it

* Update AppearanceChangerMisc.tsx

* this too

* gender is race whoops

* Allow old clonepods too

* xc

* further encapsulation and some fixes

* oops

* misc not race

* separated that

* custom footsteps exchanged

* Custom speech bubble and xenochi stuff

* Update xenochimera.dm

* remove digileg snowflake

* try this

* Update xenochimera.dm

* proper close

* Always update our DNA

* awa

* extremely laggy check removed, actually useless

* explaining

* lower delay time

* slower jigglin

* Revert "slower jigglin"

This reverts commit c801f7d7f5.

* disable appearance editor due to various issues

* Promie love

* xenochi vanity test

* lmao

* earwings

* wording and slot revival

* mobvar?

* Phasing out specific shapeshifter appearances

If you have access to changing your icon, you can change whatever you want.

* saveslot loading

* more

* synth

* Shoot out limbs

* almost ready

* nullcheck

* xenochi revive handles size and weight correctly

* weaver cocoon updated xenochi internal record after tf

* cannot remove from lost limbs

* limbs properly respawn on slot revive

---------

Co-authored-by: C.L. <killer65311@gmail.com>
2025-06-09 08:20:42 -07:00

115 lines
4.2 KiB
Plaintext

/datum/power/changeling/absorb_dna
name = "Absorb DNA"
desc = "Permits us to syphon the DNA from a human. They become one with us, and we become stronger if they were of our kind."
ability_icon_state = "ling_absorb_dna"
genomecost = 0
verbpath = /mob/living/proc/changeling_absorb_dna
//Absorbs the victim's DNA. Requires a strong grip on the victim.
//Doesn't cost anything as it's the most basic ability.
/mob/living/proc/changeling_absorb_dna()
set category = "Changeling"
set name = "Absorb DNA"
var/datum/changeling/changeling = changeling_power(0,0,100)
if(!changeling) return
var/obj/item/grab/G = src.get_active_hand()
if(!istype(G))
to_chat(src, span_warning("We must be grabbing a creature in our active hand to absorb them."))
return
var/mob/living/carbon/human/T = G.affecting
if(!istype(T) || T.isSynthetic())
to_chat(src, span_warning("\The [T] is not compatible with our biology."))
return
if(T.species.flags & (NO_DNA|NO_SLEEVE))
to_chat(src, span_warning("We do not know how to parse this creature's DNA!"))
return
if(HUSK in T.mutations) //Lings can always absorb other lings, unless someone beat them to it first.
if(!T.mind.changeling || T.mind.changeling && T.mind.changeling.geneticpoints < 0)
to_chat(src, span_warning("This creature's DNA is ruined beyond useability!"))
return
if(G.state != GRAB_KILL)
to_chat(src, span_warning("We must have a tighter grip to absorb this creature."))
return
if(changeling.isabsorbing)
to_chat(src, span_warning("We are already absorbing!"))
return
changeling.isabsorbing = 1
for(var/stage = 1, stage<=3, stage++)
switch(stage)
if(1)
to_chat(src, span_notice("This creature is compatible. We must hold still..."))
if(2)
to_chat(src, span_notice("We extend a proboscis."))
src.visible_message(span_warning("[src] extends a proboscis!"))
if(3)
to_chat(src, span_notice("We stab [T] with the proboscis."))
src.visible_message(span_danger("[src] stabs [T] with the proboscis!"))
to_chat(T, span_danger("You feel a sharp stabbing pain!"))
add_attack_logs(src,T,"Absorbed (changeling)")
var/obj/item/organ/external/affecting = T.get_organ(src.zone_sel.selecting)
if(affecting.take_damage(39,0,1,0,"large organic needle"))
T:UpdateDamageIcon()
feedback_add_details("changeling_powers","A[stage]")
if(!do_mob(src, T, 150) || G.state != GRAB_KILL)
to_chat(src, span_warning("Our absorption of [T] has been interrupted!"))
changeling.isabsorbing = 0
return
to_chat(src, span_notice("We have absorbed [T]!"))
src.visible_message(span_danger("[src] sucks the fluids from [T]!"))
to_chat(T, span_danger("You have been absorbed by the changeling!"))
adjust_nutrition(T.nutrition)
changeling.chem_charges += 10
if(changeling.readapts <= 0)
changeling.readapts = 0 //SANITYYYYYY
changeling.readapts++
if(changeling.readapts > changeling.max_readapts)
changeling.readapts = changeling.max_readapts
to_chat(src, span_notice("We can now re-adapt, reverting our evolution so that we may start anew, if needed."))
var/saved_dna = T.dna.Clone() /// Prevent transforming bugginess.
var/datum/absorbed_dna/newDNA = new(T.real_name, saved_dna, T.species.name, T.languages, T.identifying_gender, T.flavor_texts, T.modifiers)
absorbDNA(newDNA)
if(T.mind && T.mind.changeling)
if(T.mind.changeling.absorbed_dna)
for(var/datum/absorbed_dna/dna_data in T.mind.changeling.absorbed_dna) //steal all their loot
if(dna_data in changeling.absorbed_dna)
continue
absorbDNA(dna_data)
changeling.absorbedcount++
T.mind.changeling.absorbed_dna.len = 1
// This is where lings get boosts from eating eachother
if(T.mind.changeling.lingabsorbedcount)
for(var/a = 1 to T.mind.changeling.lingabsorbedcount)
changeling.lingabsorbedcount++
changeling.geneticpoints += 4
changeling.max_geneticpoints += 4
to_chat(src, span_notice("We absorbed another changeling, and we grow stronger. Our genomes increase."))
T.mind.changeling.chem_charges = 0
T.mind.changeling.geneticpoints = -1
T.mind.changeling.max_geneticpoints = -1 //To prevent revival.
T.mind.changeling.absorbedcount = 0
T.mind.changeling.lingabsorbedcount = 0
changeling.absorbedcount++
changeling.isabsorbing = 0
T.death(0)
T.Drain()
return 1