From 2438ba0d97ede88c7ce29de176a4783b23a9ac81 Mon Sep 17 00:00:00 2001 From: ManlyMarco <39247311+ManlyMarco@users.noreply.github.com> Date: Tue, 14 Mar 2023 00:30:16 +0100 Subject: [PATCH] [ND] Add setting to completely disable the plugin --- src/Core_NightDarkener/NightDarkener.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Core_NightDarkener/NightDarkener.cs b/src/Core_NightDarkener/NightDarkener.cs index 9a995de..1f57cee 100644 --- a/src/Core_NightDarkener/NightDarkener.cs +++ b/src/Core_NightDarkener/NightDarkener.cs @@ -123,7 +123,8 @@ private void Start() BeSmart = Config.Bind("General", "Only on specific maps", true, "Only darken maps that are unlikely to have lights turned on at night (likely to be vacant). Turn off to make all maps dark at night."); BeSmartAlwaysOnCustom = Config.Bind("General", "Always enable on custom maps", true, "If the \"Only on specific maps\" setting is enabled, also darken all custom maps (otherwise all custom maps will not be darkened)."); - SceneManager.sceneLoaded += SceneManager_sceneLoaded; + if (Config.Bind("General", "Enabled", true, "Set to false to completely disable this plugin. Changes take effect after game restart.").Value) + SceneManager.sceneLoaded += SceneManager_sceneLoaded; } private static Color SubtractColor(Color color, float amount)