mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* Steals tg's span macros * Fix alphabet * Updated some more spans * Misses a conflict * Fix compile errors * Converts more spans * oops
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
//Chameleon causes the owner to slowly become transparent when not moving.
|
|
/datum/mutation/human/chameleon
|
|
name = "Chameleon"
|
|
desc = "A genome that causes the holder's skin to become transparent over time."
|
|
quality = POSITIVE
|
|
difficulty = 16
|
|
text_gain_indication = span_notice("You feel one with your surroundings.")
|
|
text_lose_indication = span_notice("You feel oddly exposed.")
|
|
time_coeff = 5
|
|
instability = 25
|
|
|
|
/datum/mutation/human/chameleon/on_acquiring(mob/living/carbon/human/owner)
|
|
if(..())
|
|
return
|
|
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
|
|
RegisterSignal(owner, COMSIG_MOVABLE_MOVED, .proc/on_move)
|
|
|
|
/datum/mutation/human/chameleon/on_life()
|
|
owner.alpha = max(0, owner.alpha - 25)
|
|
|
|
/datum/mutation/human/chameleon/proc/on_move()
|
|
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
|
|
|
|
/datum/mutation/human/chameleon/on_attack_hand(atom/target, proximity)
|
|
if(proximity) //stops tk from breaking chameleon
|
|
owner.alpha = CHAMELEON_MUTATION_DEFAULT_TRANSPARENCY
|
|
return
|
|
|
|
/datum/mutation/human/chameleon/on_losing(mob/living/carbon/human/owner)
|
|
if(..())
|
|
return
|
|
owner.alpha = 255
|
|
UnregisterSignal(owner, COMSIG_MOVABLE_MOVED)
|