Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] [FIX] Chameleon Is Toggleable Again #786

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading