18 Commits
Author SHA1 Message Date
soarqin 66ecebaca7 fix(UXAssist): start late-discovered mod features 2026-07-11 14:25:46 +08:00
soarqin ab1d20683d fix(UXAssist): centralize mod-feature lifecycle to prevent duplicate execution
ModFeatureRegistry is a static class with shared collections accumulating
features from all mods. Dependent mods (CheatEnabler, UniverseGenTweaks)
each independently called InitAll/StartAll/OnInputUpdateAll/OnUpdateAll/
UninitAll, re-running lifecycle for ALL accumulated features including
other mods' — per-frame Update ran 2-3x (breaking CheatEnabler key toggles
to net no-ops), Init/Start/Uninit ran 2-3x (double RegisterExporter causing
save corruption, double SettingChanged subscriptions, double keybind
registration).

Fix:
- Init now runs eagerly at Discover/Register time (Awake-phase), preserving
  the original timing that keybind registration depends on (game's
  UIOptionWindow._OnCreate copies keybinds only after all plugins load)
- InitAll removed entirely
- StartAll/UninitAll/OnInputUpdateAll/OnUpdateAll made internal so only
  UXAssist (host, same assembly, no InternalsVisibleTo) can drive them
- Start deferred to UXAssist.Start (after all dependents' Awake complete;
  BepInEx runs all Awakes before any Start)
- Per-feature Started idempotency + per-frame Time.frameCount guards as
  defense-in-depth
- Dependent mods reduced to Discover-only in Awake

Document the Init/Start timing contract on IModFeature and
ModFeatureAttribute so future mods can rely on it.
2026-06-29 02:56:54 +08:00
soarqin 036243fd4a refactor: centralize localization keys and remove runtime Chinese literals 2026-06-23 21:19:42 +08:00
soarqin 1939a9cf22 refactor(CheatEnabler/UniverseGen): consume more centralized constants 2026-06-23 20:48:35 +08:00
soarqin 8bfcee2a81 refactor(UniverseGenTweaks): split MoreSettings into focused classes 2026-06-23 07:19:25 +08:00
soarqin b5b2fee14e refactor(UniverseGenTweaks): adopt ModFeatureRegistry from UXAssist 2026-06-23 04:23:03 +08:00
soarqin a25f74443d donet format 2025-09-21 15:38:03 +08:00
soarqin 8446fba0e4 UniverseGenTweaks 1.2.10 2025-09-15 14:27:12 +08:00
soarqin 9d586d68e0 minor fix 2025-09-05 23:53:03 +08:00
soarqin 74c98c9934 UniverseGenTweaks v1.2.5 2023-12-31 15:07:52 +08:00
soarqin d85afccb0d mod deps 2023-10-15 17:02:29 +08:00
soarqin 7fae7cc66e work in progress 2023-10-14 22:35:47 +08:00
soarqin 31b992c7a2 work in progress 2023-10-14 15:27:10 +08:00
soarqin ba0bf07614 clean up usings 2023-09-05 21:24:14 +08:00
soarqin 93403dab12 UniverseGenTweaks 1.1.0 2023-09-05 21:22:34 +08:00
soarqin e3f7eddde7 minor fixes 2023-09-05 18:29:37 +08:00
soarqin aec98cda34 WIP: CompressSave 1.2.0 2022-11-20 16:36:02 +08:00
soarqin f4457c5fd2 Work in progress 2022-11-07 21:14:22 +08:00