using S3.Core; using S3.Core.Ui; using UnityModManagerNet; namespace S3; /// /// UMM entry point for Seton's Special Sauce. /// /// S³ is an umbrella "everything mod": a thin core that hosts independent, /// optional modules (each disabled by default). The core initializes settings /// storage, registers the modules, enables the ones turned on, and hands the /// settings UI to . Each module owns its own flat /// settings file (see ). /// public static class Main { internal static UnityModManager.ModEntry ModEntry { get; private set; } = null!; private static ModuleRegistry _registry = null!; public static bool Load(UnityModManager.ModEntry modEntry) { ModEntry = modEntry; Log.Init(modEntry); SettingsStore.Init(modEntry.Path); _registry = new ModuleRegistry(); // Modules are registered here. Each module loads its own settings in its // constructor. Order here is display order in the settings panel. _registry.Register(new Modules.PhysicsOptimizer.PhysicsOptimizerModule()); _registry.Register(new Modules.MeshLod.MeshLodModule()); _registry.Register(new Modules.Profiler.ProfilerModule()); _registry.Register(new Modules.Popout.PopoutModule()); _registry.EnableConfigured(); ModConflicts.CheckAtLoad(); // Always-on core UI service: hosts Dear ImGui inside the game, intercepts // the base-game map hotkey, and enforces popout<->in-game mutual exclusion. UiService.Install(); modEntry.OnGUI = _ => SettingsPanel.Draw(_registry); modEntry.OnSaveGUI = _ => _registry.SaveAll(); Log.Info("Seton's Special Sauce loaded."); return true; } }