Files
VOREStation/code/modules/mob/_modifiers/changeling.dm
Cameron Lennox 3c622885c8 Changing changeling (Refactor) (#17749)
* Begin antag component

* Initial changeling move

* Slow...And...Steady...

* Initial

* remove  toworld testing

* More adjustments

* Update absorb.dm

Changelings get a genetic point per person absorbed

* Fixes losing your markings

* wa

* Update modularchangling.dm

* BETTER LING

WITH TGUI

* Gives all stings a global 1 second cd

Need to come up with a better way for this.

* snake_case

* Update epinephrine_overdose.dm

* Update changeling.dm

* Absorption/digestion absorbs people

Also disabled death sting because gtfo with that, it's unfun for everyone involved.

* prey ling

also DELETES death sting...It didn't even KILL properly

* fixes EMP shriek

* Update vorestation.dme

* Ling

* Unfat sting lowers nutrition more

* Update visible_camouflage.dm

* Update visible_camouflage.dm

* Changeling blades NOT embed

* Armblade fix

* Changeling spacesuit free

* Updates the armor

* Updates

* awa

* More

* Update blind_sting.dm

* Update blind_sting.dm

* Update boost_range.dm

* More adjustments

* Update _reagents.dm

* Update bioelectrogenesis.dm

* more

* all done

* awa

* shhh

* Update visible_camouflage.dm

* Update visible_camouflage.dm

* Update visible_camouflage.dm

* decon

* gets rid of AB+ blood

* Blood rejection and better checks

* changeling holder

* proper del

* Changeling lock

* Stops bodytheft

* yeah

* its reviving time

* Lets them shapeshift

* ah

* check

* Update negative.dm

* Update examine.dm
2025-07-04 21:08:03 +02:00

95 lines
2.1 KiB
Plaintext

/datum/modifier/changeling
name = "changeling"
desc = "Changeling modifier."
var/required_chems = 1 // Default is to require at least 1 chem unit. This does not consume it.
var/chem_maintenance = 1 // How many chems are expended per cycle, if we are consuming chems.
var/max_genetic_damage = 100
var/max_stat = 0
var/use_chems = FALSE // Do we have an upkeep cost on chems?
var/exterior_modifier = FALSE // Should we be checking the origin mob for chems?
/datum/modifier/changeling/check_if_valid()
var/mob/living/L = null
if(exterior_modifier)
if(origin)
L = origin.resolve()
else
expire()
return
if((!exterior_modifier && !holder.changeling_power(required_chems, 0, max_genetic_damage, max_stat)) || (exterior_modifier && L && !L.changeling_power(required_chems, 0, max_genetic_damage, max_stat)))
expire()
else
..()
/datum/modifier/changeling/tick()
..()
if(use_chems)
var/mob/living/L = null
if(exterior_modifier)
L = origin.resolve()
else
L = holder
if(L)
var/datum/component/antag/changeling/comp = L.GetComponent(/datum/component/antag/changeling)
comp.chem_charges = between(0, comp.chem_charges - chem_maintenance, comp.chem_storage)
/datum/modifier/changeling/thermal_sight
name = "Thermal Adaptation"
desc = "Our eyes are capable of seeing into the infrared spectrum to accurately identify prey through walls."
vision_flags = SEE_MOBS
on_expired_text = span_alien("Your sight returns to what it once was.")
stacks = MODIFIER_STACK_EXTEND
/datum/modifier/changeling/thermal_sight/check_if_valid()
var/mob/living/L = null
if(exterior_modifier)
L = origin.resolve()
else
L = holder
if(!L)
expire()
return
var/datum/component/antag/changeling/changeling = L.changeling_power(0,0,100,CONSCIOUS)
if(!changeling)
expire()
return
if(!changeling.thermal_sight)
expire()
return
..()
/datum/modifier/changeling/thermal_sight/expire()
var/mob/living/L = null
if(exterior_modifier)
L = origin.resolve()
else
L = holder
if(L)
var/datum/component/antag/changeling/changeling = L.changeling_power(0,0,100,CONSCIOUS)
if(changeling)
changeling.thermal_sight = FALSE
..()