deus-ex-randomizer icon indicating copy to clipboard operation
deus-ex-randomizer copied to clipboard

crowd control hide incompatible effects

Open Die4Ever opened this issue 1 year ago • 0 comments

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");

Die4Ever avatar Jul 11 '22 01:07 Die4Ever