Moves /datum/var/signal_enabled to datum flags (#56372)

* Moves /datum/var/signal_enabled to datum flags

`signal_enabled` is a variable on /datum, so present almost every object
in the game. Folding it into the existing `datum_flags` variable will
save allocating a variable on every datum in the game.

- Clown weaponry was using the `signal_enabled` variable to turn their
  attached slippery component on and off when the shield/sword was
  toggled. They now just remove/add the component, rather than touching
  deep datum internals.
This commit is contained in:
coiax
2021-02-07 03:15:00 -08:00
committed by GitHub
parent 34f41f98dd
commit 6370ee6522
5 changed files with 38 additions and 26 deletions
+1 -7
View File
@@ -36,12 +36,6 @@
var/list/comp_lookup
/// Lazy associated list in the structure of `signals:proctype` that are run when the datum receives that signal
var/list/list/datum/callback/signal_procs
/**
* Is this datum capable of sending signals?
*
* Set to true when a signal has been registered
*/
var/signal_enabled = FALSE
/// Datum level flags
var/datum_flags = NONE
@@ -106,7 +100,7 @@
qdel(timer)
//BEGIN: ECS SHIT
signal_enabled = FALSE
datum_flags &= ~DF_SIGNAL_ENABLED
var/list/dc = datum_components
if(dc)