Commit Graph
75 Commits
Author SHA1 Message Date
soarqin e35fba88ae refactor: remove single-owner helpers and redundant plumbing
Return feature-only helpers to their owners, remove inactive scaffolding and duplicate state, and reuse existing calculation and UI work without changing public contracts or gameplay.

Record repository-wide coverage, justified retentions, independent reviews and validation, including baseline dashboard fixture failures.

Assisted-by: Cindy (https://cindy.app)
2026-11-04 23:06:50 +08:00
TTenYX 6ced106901 feat(cheatenabler): add tech downgrade and make the tech modifiers upgradable
Rework `Unlock Tech with Key-Modifiers` into a full upgrade/downgrade feature,
ported from the standalone TechTweaks plugin.

- Holding Shift / Ctrl / Ctrl+Shift / Alt while clicking a tech adds 1 / 10 /
  100 / all levels and unlocks the direct prerequisites, as before.
- `Caps Lock` toggles a session downgrade mode; the same modifiers then
  subtract 1 / 10 / 100 levels or revert the tech to locked. Downgrading walks
  the dependent techs so no "prerequisite locked, dependent unlocked" state is
  left behind, and it reverts the upgrade values the tech had applied
  (`TechFuncRevert`), including the multiplicative, assignment and boolean
  `UnlockTechFunction` cases, so repeated up/down cycles do not drift.
- Toggling downgrade mode reports itself like the other toggles: a realtime tip
  popup plus the critical warning banner. The banner now shows on its own
  instead of requiring `Build without condition` or `No collision` to be on,
  and outranks both in the shared priority chains.
- The `?` button in the tech tree shows the full key reference, using the same
  title and text as the config panel's tip button. While the option is off, the
  button is absent and `Caps Lock` is inert, so the key cannot collide with
  other bindings.
- The option keeps its original `General/UnlockTech` config entry, so existing
  configurations carry over.

The old unlock-only handler in `Patches/GamePatch.cs` is replaced by
`Patches/TechTweaksPatch.cs`, which follows the repository's mod feature
lifecycle (per-frame input through the registry's `OnInputUpdate`).
2026-10-10 23:49:40 +08:00
soarqin 574919f1f0 fix(UXAssist): reset cloned UI state 2026-09-02 18:47:37 +08:00
soarqin 010ec73c8d fix(CheatEnabler): restore BuildToolOpt station replacement 2026-07-12 18:30:20 +08:00
soarqin 15c5bbdd72 feat(cheatenabler): add bounded shell-count input 2026-07-11 01:02:12 +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 b6657c96c0 refactor(CheatEnabler): reduce duplication in DysonSphere helpers 2026-06-23 04:20:52 +08:00
soarqin eae4ba0376 refactor(CheatEnabler): split FactoryPatch into focused classes 2026-06-23 03:47:18 +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 19629eae97 CheatEnabler: Add a new button and fix a crash 2026-04-08 00:48:35 +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 a9ad961bd3 CheatEnabler: Use proliferators for belt signal 2026-03-11 19:25:57 +08:00
soarqin 0049629fd1 remove all frames 2025-12-30 22:11:30 +08:00
soarqin 3f7c384284 fix description 2025-11-19 01:23:21 +08:00
soarqin a25f74443d donet format 2025-09-21 15:38:03 +08:00
soarqin 4584895345 new function to generate illegal shells quickly 2025-09-21 01:37:09 +08:00
soarqin f8552d5c34 CheatEnabler: support for dyson shells with large radius 2025-09-10 21:40:42 +08:00
soarqin b093a62e36 use predefined 60 points for illegal shell generation 2025-06-30 00:40:26 +08:00
soarqin 2c4d1b8b0d CheatEnabler: illegal dyson shell functions 2025-06-04 18:11:58 +08:00
soarqin 23aa8c1f13 CheatEnabler: fire all bullets 2025-05-25 23:35:49 +08:00
soarqin b6c182168b CheatEnabler: unlock orbit radius 2025-05-19 18:17:05 +08:00
soarqin 69702d4f09 UXAssist & CheatEnabler update 2025-03-31 23:30:47 +08:00
soarqin 5dba87dc7f CheatEnabler v2.3.28 2025-03-25 21:11:42 +08:00
soarqin bd512a6b78 WIP 2024-09-18 04:55:40 +08:00
soarqin fb916b3813 refactoring UXAssist and CheatEnabler 2024-09-17 01:53:41 +08:00
soarqin 96b4d6cfc8 UXAssist and CheatEnabler new release 2024-09-04 20:32:00 +08:00
soarqin 421cfd230e WIP 2024-09-02 22:51:32 +08:00
soarqin 92445a452a UXAssist and CheatEnabler new releases 2024-08-30 19:14:34 +08:00
soarqin 287cfbbed4 UXAssist 1.1.5 2024-08-30 03:26:10 +08:00
soarqin d11817d4c3 Work in progress 2024-08-29 21:58:41 +08:00
soarqin f84d20544c fix crash 2024-08-24 22:01:47 +08:00
soarqin 5a12631c76 CheatEnabler 2.3.20 2024-08-23 14:51:26 +08:00
soarqin 7430f20181 UXAssist and CheatEnabler new release 2024-08-22 17:16:55 +08:00
soarqin fec947e71a WIP 2024-08-21 02:42:24 +08:00
soarqin b27ed3f96b WIP 2024-08-16 21:40:46 +08:00
soarqin 75aca132fa CheatEnabler 2.3.17 2024-08-16 11:07:55 +08:00
soarqin 2741069bc7 UXAssist 1.0.25 2024-05-24 21:30:25 +08:00
soarqin b1f27a2633 CheatEnabler 2.3.16 and UXAssist 1.0.24 2024-05-24 17:18:34 +08:00
soarqin c8a0651ae2 WIP 2024-05-22 20:07:21 +08:00
soarqin 7cdaa5df20 UXAssist and CheatEnabler release 2024-05-07 00:24:46 +08:00
soarqin 51314305d1 UXAssist and CheatEnabler new version 2024-03-29 19:00:40 +08:00
soarqin 3a52175041 WIP 2024-03-22 22:01:12 +08:00
soarqin c7972fd736 new version of UXAssist, CheatEnabler and CompressSave, which fix #17 and #20 2023-12-18 19:43:58 +08:00
soarqin 05485d76b5 CheatEnabler v2.3.6 2023-11-07 16:52:14 +08:00
soarqin 3d16baaa9a UXAssist v1.0.2, UniverseGenTweaks v1.2.1, CheatEnabler v2.3.4 2023-10-22 15:46:06 +08:00
soarqin 7fae7cc66e work in progress 2023-10-14 22:35:47 +08:00
soarqin 6caa183cfa UXAssist: Work in progress 2023-10-10 02:38:24 +08:00
soarqin 41f2103c11 UXAssist: Work in progress 2023-10-09 21:23:23 +08:00