From 7a8dac9e2af45c9d62a3b88cf914fe5754aa4f67 Mon Sep 17 00:00:00 2001 From: in0finite Date: Wed, 26 Jun 2019 01:55:16 +0200 Subject: [PATCH] add "pause spawning" setting --- Assets/Scripts/Settings/MiscSettings.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Assets/Scripts/Settings/MiscSettings.cs b/Assets/Scripts/Settings/MiscSettings.cs index e7295a9b..f67d172b 100644 --- a/Assets/Scripts/Settings/MiscSettings.cs +++ b/Assets/Scripts/Settings/MiscSettings.cs @@ -108,12 +108,20 @@ namespace SanAndreasUnity.Settings { persistType = OptionsWindow.InputPersistType.None, }; + OptionsWindow.BoolInput m_pauseSpawning = new OptionsWindow.BoolInput ("Pause spawning") { + isAvailable = () => SpawnManager.Instance != null, + getValue = () => SpawnManager.Instance.IsSpawningPaused, + setValue = (value) => { SpawnManager.Instance.IsSpawningPaused = value; }, + persistType = OptionsWindow.InputPersistType.OnStart + }; + void Awake () { var inputs = new OptionsWindow.Input[] { m_timeScaleInput, m_gravityInput, m_displayHealthBarsInput, m_displayMinimapInput, m_runInBackgroundInput, m_drawLineFromGunInput, m_enableCamera, + m_pauseSpawning, m_pedSyncRate, m_vehicleSyncRate, m_syncVehicleTransformUsingSyncVars, m_syncVehiclesLinearVelocity, m_syncVehiclesAngularVelocity, m_controlWheelsOnLocalPlayer, m_controlVehicleInputOnLocalPlayer,