From 9ea738140d941ef0a7193e4f45278f2923997cc2 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Sun, 28 Jun 2026 08:37:54 -0400 Subject: Axe DO_COMMON Signed-off-by: Andrew Opalach --- Plugin.cs | 91 ++++++--------------------------------------------------------- 1 file changed, 8 insertions(+), 83 deletions(-) (limited to 'Plugin.cs') diff --git a/Plugin.cs b/Plugin.cs index 412d1b8..0058458 100755 --- a/Plugin.cs +++ b/Plugin.cs @@ -2,7 +2,6 @@ //#define OVERSIZED_SHADOW_MAP //#define SHADER_FEATURES //#define RESOURCE_ADJUSTMENT -//#define DO_COMMON using System.Numerics; using System.Globalization; @@ -43,6 +42,14 @@ using SharpPluginLoader.Core.Entities; // - Weird shadow area in Rotten Vale. // - Hotload nukes config? // +// Areas that need Shadow Distance retuning: +// - Exit of central camp in Horfrost Reach. +// - Sporepuff area in The Ancient Forest. +// - Wildspire Waste entrence to enclosed area past the waterfall. +// - The Rotten Vale jump out of Southeast Camp. Wall on the opposite side slightly to the left. +// - Special Arena. +// - Elder's Recess Lavasioth area. +// // Known issues to think about: // - Hair clipping while looking down. // - Volume rendering can look really bad with multiple overlapped sources(?) (Guding lands vines). @@ -144,69 +151,10 @@ namespace WorldTuningTool return ConfigManager.GetConfig(Instance!); } -#if DO_COMMON - private static bool overridesContainsCommon(IEnumerable overrides, Override ovR) - { - foreach (Override ov in overrides) - { - if (ov.Equals(ovR)) - { - return true; - } - } - return false; - } - - private static Override? removeIfOverridesContainsParam(IList overrides, Parameter param) - { - for (int i = 0; i < overrides.Count; i++) - { - Override ov = overrides[i]; - if (ov.Param == param) - { - overrides.RemoveAt(i); - return ov; - } - } - return null; - } -#endif - static void saveConfig(Config config) { config.Overrides.Remove(globalStage); -#if DO_COMMON - config.CommonGlobals.Clear(); - foreach (Override ov in config.Globals[selectedGlobal]) - { - bool common = true; - foreach ((string name, List overrides) in config.Globals) - { - if (!overridesContainsCommon(overrides, ov)) - { - common = false; - } - } - if (common) config.CommonGlobals.Add(ov); - } - Dictionary> allRemoved = new Dictionary>(); - foreach ((string name, List overrides) in config.Globals) - { - List removed = new List(); - foreach (Override ovC in config.CommonGlobals) - { - removed.Add(removeIfOverridesContainsParam(overrides, ovC.Param!)!); - } - allRemoved[name] = removed; - } -#endif ConfigManager.SaveConfig(Instance!); -#if DO_COMMON - foreach ((string name, List overrides) in config.Globals) - { - overrides.InsertRange(0, allRemoved[name]); - } -#endif config.Overrides[globalStage] = config.Globals[selectedGlobal]; selectedOrderChanged = false; setOrderChanged = false; @@ -1208,20 +1156,6 @@ namespace WorldTuningTool valueInt = i1; Save(); } -#if DO_COMMON - public Override(Override c) - { - Param = c.Param; - valueV = c.valueV; - valueInt = c.valueInt; - Save(); - } - - public bool Equals(Override r) - { - return r.Param == Param && (r.sValueV, r.sValueInt) == (sValueV, sValueInt); - } -#endif public void Save() { @@ -2509,15 +2443,6 @@ namespace WorldTuningTool { config.Globals[selectedGlobal] = new List(); } -#if DO_COMMON - foreach ((string name, List overrides) in config.Globals) - { - foreach (Override ov in config.CommonGlobals) - { - overrides.Insert(0, new Override(ov)); - } - } -#endif config.Overrides[globalStage] = config.Globals[selectedGlobal]; foreach (StageExt area in Config.OrderedStages) { -- cgit v1.2.3-101-g0448