Don't use inventory tokens for mapper-toggleable store/revive. Tokens are icky.

This commit is contained in:
Mari the Deer 2023-02-18 11:54:30 +01:00
commit a2855dfc9a
9 changed files with 31 additions and 32 deletions

View file

@ -70,6 +70,19 @@ Class SWWMHandler : EventHandler
prof_calls[idx]++;
}
static play void ToggleStore( bool val )
{
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
if ( !hnd || !hnd.gdat ) return; // shouldn't happen, but doesn't hurt to check
hnd.gdat.disablestore = !val;
}
static play void ToggleRevive( bool val )
{
let hnd = SWWMHandler(EventHandler.Find("SWWMHandler"));
if ( !hnd || !hnd.gdat ) return; // shouldn't happen, but doesn't hurt to check
hnd.gdat.disablerevive = !val;
}
override void OnRegister()
{
// oneliner RNG must be relative to consoleplayer