Ejemplo n.º 1
0
        public void PageButtonClick(MonitorPage triggeredPage)
        {
            if (needsElectricCharge && electricChargeReserve < 0.01d)
            {
                return;
            }

            // Apply page redirect like this:
            triggeredPage = FindPageByName(activePage.ContextRedirect(triggeredPage.name)) ?? triggeredPage;
            if (triggeredPage != activePage && (activePage.SwitchingPermitted(triggeredPage.name) || triggeredPage.unlocker))
            {
                activePage.Active(false);
                activePage = triggeredPage;
                activePage.Active(true);
                persistence.SetVar(persistentVarName, activePage.pageNumber);
                refreshDrawCountdown = refreshTextCountdown = 0;
                firstRenderComplete  = false;
                PlayClickSound(audioOutput);
            }
        }
Ejemplo n.º 2
0
        public void PageButtonClick(MonitorPage triggeredPage)
        {
            if (resourceDepleted || noCommConnection)
            {
                return;
            }

            // Apply page redirect like this:
            triggeredPage = FindPageByName(activePage.ContextRedirect(triggeredPage.name)) ?? triggeredPage;
            if (triggeredPage != activePage && (activePage.SwitchingPermitted(triggeredPage.name) || triggeredPage.unlocker))
            {
                activePage.Active(false);
                activePage = triggeredPage;
                activePage.Active(true);
                rpmComp.SetPersistentVariable(persistentVarName, activePage.pageNumber, false);
                refreshDrawCountdown = refreshTextCountdown = 0;
                firstRenderComplete  = false;
                PlayClickSound(audioOutput);
            }
        }