deus-ex-randomizer
deus-ex-randomizer copied to clipboard
crowd control hide incompatible effects
You can run a check with a timer as to which mode is being played
_timer = new Timer(s =>
{
try { UpdateEffectStates(); }
catch (Exception e) { Log.Debug(e); }
}, this, TimeSpan.Zero, TimeSpan.FromSeconds(30));
Then in UpdateEffectStates, make it so it only sends updates when the game mode has changed (Otherwise just returns) The hiding itself you can do with ReportStatus
ReportStatus(zombiespawn, EffectStatus.MenuVisible)
MenuVisible or MenuHidden Note that the "zombiespawn" used there is an Effect Object that is kept separately and references the effect in the effect list
Effect zombiespawn = new Effect("Spawn Zombie", "spawn_zombie", "spawn");