From 9cd3dc803c796e5d35540a50fb4c65e0784ff589 Mon Sep 17 00:00:00 2001 From: Timberpoes Date: Wed, 15 Sep 2021 02:01:55 +0100 Subject: [PATCH] Fix lingering alpha issues when the Chameleon mutation is removed. (#61444) The Chameleon mutation registers COMSIG_HUMAN_EARLY_UNARMED_ATTACK when it is gained, but never unregisters it when it is lost. Mutation datums aren't necessarily deleted and can sit in the DNA dormant until activated, as a result there's no nice qdel() handler to clean up the mess. An example of this is a changeling with Chameleon skin, that adds/activates/deactivates the Chameleon mutation as required. Honestly, this could probably be refactored into a component since the behaviour is pretty generic and can mostly be applied to any atom. That is a bit more work for another day and a good first PR for someone to learn how to make components. This at least fixes the underlying issue. --- code/datums/mutations/chameleon.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/datums/mutations/chameleon.dm b/code/datums/mutations/chameleon.dm index 5bf9b470e94..1b23026d378 100644 --- a/code/datums/mutations/chameleon.dm +++ b/code/datums/mutations/chameleon.dm @@ -35,4 +35,4 @@ if(..()) return owner.alpha = 255 - UnregisterSignal(owner, COMSIG_MOVABLE_MOVED) + UnregisterSignal(owner, list(COMSIG_MOVABLE_MOVED, COMSIG_HUMAN_EARLY_UNARMED_ATTACK))