private void DutyStateChangedHandler(bool on_duty) { Globals.IsPlayerOnDuty = on_duty; if (on_duty) { Function.MonitorAICalls(); Function.CheckForUpdates(); CheckIfCalloutActiveFiber.Resume(); DetectOpenSimpleNotepadFiber.Resume(); DetectOpenCloseRequestedFiber.Resume(); Function.LogDebug("Successfully loaded LSPDFR Computer+."); if (Function.IsAlprPlusRunning()) { Function.LogDebug("C+: Registering for ALPR+ Events"); ALPRPlusFunctions.OnAlprPlusMessage += ALPRPlusFunctions_OnAlprPlusMessage; ALPRPlusFunctions.RegisterForEvents(); } else { Function.LogDebug("C+: ALPR+ Not Detected"); } } else { if (Function.IsAlprPlusRunning()) { ALPRPlusFunctions.OnAlprPlusMessage -= ALPRPlusFunctions_OnAlprPlusMessage; } } }
private void OnOnDutyStateChanged(bool onDuty) { IS_ON_DUTY = onDuty; if (onDuty) { CheckThread.Resume(); if (ApplyOnGoOnDuty) { DoMagic(); } } }
private void DutyStateChangedHandler(bool on_duty) { Globals.IsPlayerOnDuty = on_duty; if (on_duty) { XmlConfigs.ReadDefinitionsAndGlobalize(); Function.MonitorAICalls(); Function.CheckForUpdates(); CheckIfCalloutActiveFiber.Resume(); DetectOpenSimpleNotepadFiber.Resume(); DetectOpenCPlusOnFootFiber.Resume(); DetectOpenCloseRequestedFiber.Resume(); Function.LogDebug("Successfully loaded LSPDFR Computer+."); InitStorage(); if (Function.IsAlprPlusRunning()) { Function.LogDebug("C+: Registering for ALPR+ Events"); ALPRPlusFunctions.OnAlprPlusMessage += ALPRPlusFunctions_OnAlprPlusMessage; ALPRPlusFunctions.RegisterForEvents(); } else { Function.LogDebug("C+: ALPR+ Not Detected"); } if (Function.IsBPSRunning()) { // @TODO put this back once Albo tests integration //ComputerPlusEntity.PersonaType = PersonaTypes.BPS; } } else { if (Function.IsAlprPlusRunning()) { ALPRPlusFunctions.OnAlprPlusMessage -= ALPRPlusFunctions_OnAlprPlusMessage; } } }