mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-11-19 17:05:20 +08:00
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`).
This commit is contained in:
1 parent
6a292e0816
commit
6ced106901
19 files changed
+2072
-143
No files matched your search
+12
-2
@@ -13,7 +13,12 @@
|
||||
* General:
|
||||
* Enable Dev Shortcuts (check config panel for usage)
|
||||
* Disable Abnormal Checks
|
||||
* Unlock techs with key-modifiers (Ctrl/Alt/Shift)
|
||||
* Quickly upgrade/downgrade tech with key-modifiers (click the tech tree while holding Ctrl/Alt/Shift)
|
||||
* `Alt` raises a tech to its maximum level, or reverts it to locked while downgrade mode is on
|
||||
* `Caps Lock` toggles downgrade mode; toggling reports itself with a realtime tip and a critical warning banner
|
||||
* Downgrading also reverts the upgrade values the tech had applied, so repeated up/down cycles do not drift
|
||||
* This option now replaces the old unlock-only behaviour; it keeps the same config entry
|
||||
* The `?` button in the tech tree window shows the full key reference
|
||||
* Remove all metadata consumption records
|
||||
* Remove metadata consumption record in current game
|
||||
* Clear metadata flag which bans achievements
|
||||
@@ -88,7 +93,12 @@
|
||||
* 常规:
|
||||
* 启用开发模式快捷键(使用说明见设置面板)
|
||||
* 屏蔽异常检测
|
||||
* 使用组合键解锁科技(Ctrl/Alt/Shift)
|
||||
* 使用组合键快速升降级科技(按住 Ctrl/Alt/Shift 点击科技树)
|
||||
* `Alt` 将科技升到最大等级;开启降级模式后则回退到未解锁
|
||||
* `Caps Lock` 切换降级模式,切换时会用实时弹窗和严重警告横幅提示
|
||||
* 降级会同时回退该科技已应用的升级数值,反复升降级不会产生数值漂移
|
||||
* 本选项已取代原来的「仅解锁」行为,配置文件条目保持不变
|
||||
* 科技树界面的 `?` 按钮显示完整组合键说明
|
||||
* 移除所有元数据消耗记录
|
||||
* 移除当前存档的元数据消耗记录
|
||||
* 解除当前存档因使用元数据导致的成就限制
|
||||
|
||||
Reference in new issue
Block a user