forked from ParadiseSS13/Paradise
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Changeling Ability: Environmental Adaption [TG Darkness Adaption …
…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
1 parent
7a4c487
commit 220cee4
Showing
3 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
code/modules/antagonists/changeling/powers/environmental_adaption.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters