Skip to content

Commit

Permalink
[FIX] Chameleon Is Toggleable Again (#25154)
Browse files Browse the repository at this point in the history
* red gold and green

* wew

---------

Co-authored-by: Snakebittenn <[email protected]>
  • Loading branch information
2 people authored and FFMirrorBot committed Nov 23, 2023
1 parent 5e270c8 commit d09bbc5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions modular_skyrat/master_files/code/datums/mutations/chameleon.dm
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."))
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6111,6 +6111,7 @@
#include "modular_skyrat\master_files\code\datums\mood_events\generic_negative_events.dm"
#include "modular_skyrat\master_files\code\datums\mood_events\needs_events.dm"
#include "modular_skyrat\master_files\code\datums\mutations\_mutations.dm"
#include "modular_skyrat\master_files\code\datums\mutations\chameleon.dm"
#include "modular_skyrat\master_files\code\datums\mutations\hulk.dm"
#include "modular_skyrat\master_files\code\datums\quirks\_quirk.dm"
#include "modular_skyrat\master_files\code\datums\quirks\negative.dm"
Expand Down

0 comments on commit d09bbc5

Please sign in to comment.