Commit Graph
76 Commits
Author SHA1 Message Date
soarqin c7fcf31c30 fix(cheatenabler): require UXAssist 1.6.3 before loading
Align the runtime and package minimum with the official release that provides the shared production API. Keep official UXAssist 1.6.3 supported and document the dependency in both languages.

Assisted-by: Cindy (https://cindy.app)
2026-11-05 21:34:35 +08:00
soarqin 5fb8695348 fix(cheatenabler): make tech downgrades safe and refresh docs
Validate the full dependency cascade and capacity reductions before applying tech downgrades. Preserve shared recipes, restore native bonus values and station limits, and clamp stored energy to the remaining capacity.

Fix warning integration and tech-tree help button ownership, cleanup and localization. Use the shared patch lifecycle and guarded transpilers.

Refresh bilingual feature and usage documentation, and consolidate the 2.4.7 changelog around the final user-visible behavior.
2026-10-11 03:09:47 +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 010ec73c8d fix(CheatEnabler): restore BuildToolOpt station replacement 2026-07-12 18:30:20 +08:00
soarqin 66ecebaca7 fix(UXAssist): start late-discovered mod features 2026-07-11 14:25:46 +08:00
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 036243fd4a refactor: centralize localization keys and remove runtime Chinese literals 2026-06-23 21:19:42 +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 a9ad961bd3 CheatEnabler: Use proliferators for belt signal 2026-03-11 19:25:57 +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 950bde3464 CheatEnabler v2.3.30 2025-04-25 17:50:52 +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 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 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 3a52175041 WIP 2024-03-22 22:01:12 +08:00
soarqin 456598f2a1 WIP 2024-03-10 18:25:51 +08:00
soarqin 95ba94c045 minor fix 2023-12-31 15:07:44 +08:00
soarqin 7fae7cc66e work in progress 2023-10-14 22:35:47 +08:00
soarqin 29a6e00417 some fixes 2023-10-12 17:20:30 +08:00
soarqin efa50e4bc2 fix button text 2023-10-12 02:42:20 +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
soarqin d0bc5cf1d4 CheatEnabler v2.2.7 2023-10-07 16:46:13 +08:00
soarqin 0c48691dc9 CheatEnabler v2.2.6 2023-10-07 14:51:22 +08:00
soarqin befed5ae60 Work in progress 2023-10-04 14:11:50 +08:00
soarqin b3e216bc6a Work in progress 2023-09-28 03:21:46 +08:00
soarqin c092ae81bb CheatEnabler v2.2.5 2023-09-27 21:23:23 +08:00
soarqin ee883bc66e CheatEnabler 2.2.4 2023-09-26 02:46:40 +08:00
soarqin 58e45dc186 remove unused imports 2023-09-25 20:41:56 +08:00
soarqin e79b906f91 CheatEnabler v2.2.3 2023-09-25 20:39:18 +08:00
soarqin f7a058e388 CheatEnalber v2.2.2 2023-09-24 21:59:23 +08:00
soarqin 1cb9cb8e96 CheatEnabler v2.2.0 2023-09-19 23:14:16 +08:00
soarqin 103309df6d WIP 2023-09-19 23:13:21 +08:00
soarqin 1278221599 fix 2023-09-15 21:19:51 +08:00
soarqin c68cde65f1 use patch to resolve tips priority 2023-09-15 15:23:40 +08:00
soarqin 24ba5481a9 CheatEnabler v2.1.0 2023-09-14 20:29:51 +08:00
soarqin f34dcf4f96 CheatEnabler 2.0.0 2023-09-14 00:31:26 +08:00