-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] Chameleon Is Toggleable Again (#25154)
* red gold and green * wew --------- Co-authored-by: Snakebittenn <[email protected]>
- Loading branch information
1 parent
5e270c8
commit d09bbc5
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
modular_skyrat/master_files/code/datums/mutations/chameleon.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,28 @@ | ||
// toggleable chameleon skin | ||
/datum/mutation/human/chameleon | ||
power_path = /datum/action/cooldown/spell/chameleon_skin_activate | ||
|
||
/datum/action/cooldown/spell/chameleon_skin_activate | ||
name = "Activate Chameleon Skin" | ||
desc = "The chromatophores in your skin adjust to your surroundings, as long as you stay still." | ||
spell_requirements = NONE | ||
button_icon = 'icons/mob/actions/actions_minor_antag.dmi' | ||
button_icon_state = "ninja_cloak" | ||
|
||
/datum/action/cooldown/spell/chameleon_skin_activate/cast(list/targets, mob/user = usr) | ||
. = ..() | ||
|
||
if(HAS_TRAIT(user,TRAIT_CHAMELEON_SKIN)) | ||
chameleon_skin_deactivate(user) | ||
return | ||
|
||
ADD_TRAIT(user, TRAIT_CHAMELEON_SKIN, GENETIC_MUTATION) | ||
to_chat(user, "The pigmentation of your skin shifts and starts to take on the colors of your surroundings.") | ||
|
||
/datum/action/cooldown/spell/chameleon_skin_activate/proc/chameleon_skin_deactivate(mob/user = usr) | ||
if(!HAS_TRAIT_FROM(user,TRAIT_CHAMELEON_SKIN, GENETIC_MUTATION)) | ||
return | ||
|
||
REMOVE_TRAIT(user, TRAIT_CHAMELEON_SKIN, GENETIC_MUTATION) | ||
user.alpha = 255 | ||
to_chat(user, text("Your skin shifts as it shimmers back into its original colors.")) |
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