Skip to content

Commit

Permalink
New Changeling Ability: Environmental Adaption [TG Darkness Adaption …
Browse files Browse the repository at this point in the history
…Port] (ParadiseSS13#25404)

* darkness

* seethrough

* shit works now

* Update code/modules/antagonists/changeling/powers/environmental_adaption.dm

Co-authored-by: Burzah <[email protected]>
Signed-off-by: Marm <[email protected]>

* deconflict

---------

Signed-off-by: Marm <[email protected]>
Co-authored-by: Burzah <[email protected]>
  • Loading branch information
ItsMarmite and Burzah authored Jun 6, 2024
1 parent 7a4c487 commit 220cee4
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/datum/action/changeling/environmental_adaptation
name = "Environmental Adaptation"
desc = "Our skin pigmentations rapidly change to suit the environment around us. Needs 10 chemicals in-storage to toggle. Slows down our chemical regeneration by 15%"
helptext = "Allows us to darken and change the translucency of our pigmentation. \
The translucent effect works best in dark environments and garments. Can be toggled on and off."
button_icon_state = "enviro_adaptation"
dna_cost = 2
chemical_cost = 10
power_type = CHANGELING_PURCHASABLE_POWER
category = /datum/changeling_power_category/utility

req_human = TRUE
//// is ability active (we are invisible)?
var/is_active = FALSE
/// How much we slow chemical regeneration while active, in chems per second
var/recharge_slowdown = 0.15
var/chem_recharge_slowdown = 0

/datum/action/changeling/environmental_adaptation/sting_action(mob/living/carbon/human/cling) //SHOULD always be human, because req_human = TRUE
..()
is_active = !is_active
if(is_active)
enable_ability(cling)
else
disable_ability(cling)


/datum/action/changeling/environmental_adaptation/proc/enable_ability(mob/living/carbon/human/cling) //Enable the adaptation
animate(cling, alpha = 65, time = 3 SECONDS)
cling.visible_message("<span class='warning'>[cling]'s skin suddenly starts becoming translucent!</span>", \
"<span class='notice'>We adapt our pigmentation to suit the environment around us.</span>")
var/datum/antagonist/changeling/changeling_data = cling.mind?.has_antag_datum(/datum/antagonist/changeling)
changeling_data?.chem_recharge_slowdown -= recharge_slowdown //Slows down chem regeneration

/datum/action/changeling/environmental_adaptation/proc/disable_ability(mob/living/carbon/human/cling) //Restore the adaptation
animate(cling, alpha = 255, time = 3 SECONDS)
cling.visible_message(
"<span class='warning'>[cling] appears from thin air!</span>",
"<span class='notice'>We stop concentration on our pigmentation, allowing it to return to normal.</span>",
)
animate(cling, color = null, time = 3 SECONDS)
var/datum/antagonist/changeling/changeling_data = cling.mind?.has_antag_datum(/datum/antagonist/changeling)
changeling_data?.chem_recharge_slowdown += recharge_slowdown
Binary file modified icons/mob/actions/actions.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions paradise.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1442,6 +1442,7 @@
#include "code\modules\antagonists\changeling\powers\chameleon_skin.dm"
#include "code\modules\antagonists\changeling\powers\contort_body.dm"
#include "code\modules\antagonists\changeling\powers\digitalcamo.dm"
#include "code\modules\antagonists\changeling\powers\environmental_adaption.dm"
#include "code\modules\antagonists\changeling\powers\epinephrine.dm"
#include "code\modules\antagonists\changeling\powers\fakedeath.dm"
#include "code\modules\antagonists\changeling\powers\fleshmend.dm"
Expand Down

0 comments on commit 220cee4

Please sign in to comment.