Commit Graph
213 Commits
Author SHA1 Message Date
soarqin 15c5bbdd72 feat(cheatenabler): add bounded shell-count input 2026-07-11 01:02:12 +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 c2016909ff refactor: phase 5 transpiler docs, mod-compat helpers, and build quality gates 2026-06-23 23:03:13 +08:00
soarqin 647b130993 refactor: register static-state resets on game end 2026-06-23 22:20:04 +08:00
soarqin 76d9d9fa21 refactor: use localization constants for last remaining literals 2026-06-23 21:44:35 +08:00
soarqin 8d70ce8862 refactor: use localization constants at remaining call sites 2026-06-23 21:41:24 +08:00
soarqin 51fc080ff2 fix: address localization review issues 2026-06-23 21:35:09 +08:00
soarqin 036243fd4a refactor: centralize localization keys and remove runtime Chinese literals 2026-06-23 21:19:42 +08:00
soarqin 34c99701ca refactor: localize hard-coded strings and translate comments 2026-06-23 20:58:05 +08:00
soarqin 1939a9cf22 refactor(CheatEnabler/UniverseGen): consume more centralized constants 2026-06-23 20:48:35 +08:00
soarqin 25b33144b8 refactor(CheatEnabler/UniverseGen): consume centralized constants 2026-06-23 20:41:20 +08:00
soarqin b6657c96c0 refactor(CheatEnabler): reduce duplication in DysonSphere helpers 2026-06-23 04:20:52 +08:00
soarqin 2dce3a7b93 refactor(CheatEnabler): split DysonSphereFunctions into focused helpers 2026-06-23 04:10:09 +08:00
soarqin eae4ba0376 refactor(CheatEnabler): split FactoryPatch into focused classes 2026-06-23 03:47:18 +08:00
soarqin 099f3ee35a refactor(CheatEnabler): adopt ModFeatureRegistry from UXAssist 2026-06-23 03:33:19 +08:00
soarqin cc783937e6 chore: move Increase maximum power usage in Logistic Stations and Advanced Mining Machines from CheatEnabler to UXAssist 2026-06-16 22:56:01 +08:00
soarqin 33921e7177 docs: update Changelog for CheatEnabler 2026-06-15 23:13:01 +08:00
soarqin 44efbdbb4f UXAssist 1.5.8 and CheatEnabler 2.4.4 2026-05-30 18:49:16 +08:00
soarqin ca4244384c crash fix 2026-04-27 23:09:16 +08:00
soarqin 19629eae97 CheatEnabler: Add a new button and fix a crash 2026-04-08 00:48:35 +08:00
soarqin 2e6950afb3 fix possible crash 2026-03-22 14:23:52 +08:00
soarqin a346778db9 fix possible crash 2026-03-20 15:08:02 +08:00
soarqin e2848b4f97 UXAssist v1.5.6 and CheatEnabler v2.4.3, with package target fix 2026-03-16 20:46:51 +08:00
soarqin f69a90d452 Fix potential bugs in UXAssist and CheatEnabler
UXAssist:
- PlanetFunctions: fix infinite loop in constructStats cleanup (i++ -> i--)
- PlanetFunctions: skip entityPool slot 0 (sentinel) in DismantleAll foreach
- PlanetFunctions: fix belt buffer walk infinite loop when buffer[j]==250,
  add cargoPool bounds check
- FactoryPatch: fix UnfixProto guard condition (< 3 -> < PowerPoleIds.Length)
- FactoryPatch: fix Array.Resize(index*2) -> (index+1)*2 to handle index==0
- LogisticsPatch: fix UpdateStorageMax early-exit to check both local and remote
- LogisticsPatch: fix storage max scan to use Math.Max instead of last-write
- LogisticsPatch: add divide-by-zero guard in station storage ratio calculation
- LogisticsPatch: fix station entry right-click delegates using per-instance
  dictionary instead of shared static array to prevent unsubscribe mismatch
- LogisticsPatch: add null checks for GameObject.Find results in InitGUI
- GamePatch: log exception in previously empty catch block
- GameLogic: invoke event handlers individually with try/catch so one failing
  subscriber does not abort subsequent ones
- DysonSpherePatch/LogisticsPatch/PersistPatch/PlayerPatch: replace
  matcher.Labels = null with matcher.Labels = [] (5 sites)
- UIConfigWindow: remove duplicate I18N.Add for 'Outgoing integration count'
- UIConfigWindow: remove two orphaned y += 36f spacing increments

CheatEnabler:
- GamePatch: add null check for GameMain.gameScenario in AbnormalDisabler.OnEnable
- FactoryPatch: add null check for GameMain.mainPlayer in TakeTailItemsPatch
  and GetItemCountPatch
- FactoryPatch: add null check for GameMain.mainPlayer in
  ConstructionSystem_GameTick_Prefix
- FactoryPatch: fix _portalFrom.Remove(beltId) -> Remove(v) (wrong key)
- FactoryPatch: add null guard for GameMain.data before iterating factories
  in WindTurbinesPowerGlobalCoverage
- DysonSphereFunctions: fix shell pool rebuild loop writing all shells to
  slot 1 (id=1); now uses j+1 per iteration
- DysonSphereFunctions: replace GameMain.gameScenario.NotifyOnPlanDysonShell()
  with null-conditional call (?.) at 4 sites
- DysonSpherePatch: fix SkipAbsorbPatch/QuickAbsorbPatch sharing _instantAbsorb:
  OnDisable now recalculates the flag instead of unconditionally clearing it
- PlayerFunctions: add null check for GameMain.galaxy in TeleportToOuterSpace
- UIConfigWindow: add null guard in UpdateButtons before accessing button fields
- PlanetFunctions: add colliderId bounds check in BuryAllVeins
2026-03-16 19:52:14 +08:00
soarqin e91271e137 Add UpdateGameDlls target to auto-refresh publicized game DLLs 2026-03-16 18:23:52 +08:00
soarqin f7fc9aaab0 UXAssist: fix recent upload result 2026-03-12 00:30:03 +08:00
soarqin 669ce9f88c minor fixes 2026-03-11 19:26:40 +08:00
soarqin a9ad961bd3 CheatEnabler: Use proliferators for belt signal 2026-03-11 19:25:57 +08:00
soarqin f0ee1aaea9 code format 2026-02-09 21:12:32 +08:00
soarqin 157c86112b optimized batch building 2026-02-04 14:54:06 +08:00
soarqin d0c20693e3 updated dlls 2026-02-04 14:49:48 +08:00
soarqin 8ae88f4b41 CheatEnabler: Immediate Build fix optimization 2026-02-04 13:22:29 +08:00
soarqin c1428f6aee CheatEnabler: Immediate Build fix 2026-02-04 03:07:25 +08:00
soarqin 6e4416389d CheatEnabler v2.4.2 2026-01-29 02:13:06 +08:00
soarqin 9787636d08 UXAssist 1.5.0 and CheatEnabler 2.4.1 2026-01-23 16:23:10 +08:00
soarqin b537ff22be work in progress 2026-01-07 16:45:09 +08:00
soarqin 0049629fd1 remove all frames 2025-12-30 22:11:30 +08:00
soarqin f237789fa0 minor fixes 2025-12-06 22:41:23 +09:00
soarqin 29ee32b11b work in progress 2025-11-30 18:08:13 +08:00
soarqin 3f7c384284 fix description 2025-11-19 01:23:21 +08:00
soarqin 556493b2b6 some fixes 2025-11-15 22:48:35 +08:00
soarqin 6f5b779d58 work in progress 2025-11-12 02:43:26 +08:00
soarqin 16429936a9 UXAssist v1.4.0 and CheatEnabler v2.4.0 2025-09-29 23:46:44 +08:00
soarqin e909b6d9d2 rename GameLogicProc back to make things compatible with old dependants 2025-09-29 23:34:17 +08:00
soarqin 2a4008deac fixed rest issues 2025-09-29 23:34:17 +08:00
soarqin 6b423225fe partial fix belt signal 2025-09-29 23:34:17 +08:00
soarqin 9d9a12c1af more fixes to make sure nothing working wrong on game 2025-09-29 23:34:17 +08:00
soarqin 1d11ba90bd we make them compile first 2025-09-29 23:34:17 +08:00
soarqin d6a8275938 minor fix 2025-09-21 23:01:29 +08:00
soarqin a25f74443d donet format 2025-09-21 15:38:03 +08:00