Commit Graph
69 Commits
Author SHA1 Message Date
soarqin 0015c16f0c fix: update mod compatibility for DSP 0.10.35.29131
Restore Ray Receiver buffer settings with the native integer intake check
and correct the displayed native buffer threshold.

Use VehiclePartProtoSet for LiveStreamAssist dictionary generation and
refresh offline text and icons from the current game installation.

Refresh compile-time game references and document the compatibility audit.
2026-10-12 18:35:24 +08:00
soarqin ededc3eeaf fix(uxassist): initialize alternating poles when enabling dragging
Initialize Tesla Tower previews on late enable, retry after data loading, and capture original pole prototypes only once for reliable restoration.

Refs #51
2026-10-11 04:00:56 +08:00
soarqin 6845b0c56f fix(uxassist): align Dark Fog item IDs, names, and icons
Correct Dark Fog item constants and use one definition for belt signal
names, icons, outputs, and exchange rates. Preserve the legacy signal and
saved-stock order and the equivalent single-material exchange ratios.

Rename the six embedded icons to match current English item names and
synchronize localization and resource references.

Validation: UXAssist Release build, item/name/icon/rate mapping checks,
and git diff --check.
2026-10-07 17:14:56 +08:00
soarqin 1c5073c6ac fix(mods): restore architect mode and clear stale station panels
Restore architect inventory handling and use 999 virtual items,
including logistics bots, drones, and vessels.

Recycle removed station panels and refresh overlays independently
of typing guards.

Bump CheatEnabler to 2.4.6 and UXAssist to 1.6.1, with release
notes and synchronized package manifests.
2026-09-25 17:14:33 +08:00
soarqin 0f640eb75b chore: release UXAssist 1.6.0 and CheatEnabler 2.4.5
Update changelogs and bump versions for UXAssist and CheatEnabler.
UXAssist 1.6.0 adds Orbital Collector product limits, reworked
auto-cruise navigation, auto-construct improvements, and DSP
0.10.35.29057 compatibility. CheatEnabler 2.4.5 adds the illegal
dyson shells button, Terraform anyway updates, and DSP 0.10.35
compatibility.
2026-09-24 04:04:34 +08:00
soarqin b5cb9aefb9 fix(uxassist): correct auto-cruise sail frame, braking and lifecycle
visual_uvel subtracted the unblended planet velocity. PlayerMove_Sail and
PlayerNavigation.DetermineSailVelocity both fade that reference frame out with
altitude and drop it entirely above 600 m, and PlayerController.UpdateRotation
runs after the whole action loop and turns visual_uvel into the mecha heading
and the speed readout, so the mecha visibly misaimed while sailing near a
planet. Apply the same blend, and stop writing uRotation from the sail
postfix, which the game recomputes immediately afterwards anyway.

Fixed targets had no approach deceleration: the cruise always aimed at
maxSailSpeed and simply stopped at the arrival radius. PlayerMove_Sail only
hands over to PlayerMove_Fly below 75 m/s of planet-relative speed, so the
mecha could never land. Cap the speed from the remaining distance, apply the
brake directly as the original does instead of folding it into the turn
interpolation (which weakened it by up to 1/t), and release warp early enough
for that brake to settle, since the game's own warp guard only covers planets
and never stars.

Yield to the game's own autopilot: PlayerNavigation zeroes the movement input
inside PlayerMove_Sail and PlayerMove_Fly and drives uVelocity itself, so both
were fighting over the same state. AutoConstructPatch already did this.

Guard SpaceSector.dfHives, which Init never allocates and Import only
allocates when the save carries hive data; the game null-checks it everywhere
for that reason and this ran on every sailing tick.

Follow AutoCruiseEnabled with the Harmony patches so disabling the feature no
longer leaves a transpiler on the hot PlayerController.GameTick installed, and
require a resolvable target before starting so the feature cannot emit a
started and a stopped popup in the same frame.

Refresh the toggle button label wherever Checked is set directly, since
MyCheckButton.Checked only updates the colours and the label lives on the
OnChecked handlers; toggling by shortcut left it stale.

Rename the user-facing strings to auto-cruise so they stop colliding with the
game's own navigation feature, and clean up the region: fix the misspelled
safety-radius constants, invert and rename the precondition helper, drop the
unused Obstacle.Radius, raise the degenerate-vector epsilon, and convert the
file's mixed tab indentation to spaces.
2026-09-16 02:16:40 +08:00
soarqin 3a840e7b2d fix(uxassist): correct auto-construct settling, altitude and planning
Flight settling never ran its residual-speed check: the caller gated it on
the tick countdown, which always reached exactly zero, so the constant
thresholds were dead and the wait degraded into a fixed delay. Gate it on a
separate pending flag, bound it with a timeout, and re-issue the deferred
route with bypassBrake so a timeout cannot defer the same route again.

Arrival no longer keeps the detour altitude. The planner scores build-range
coverage at ConstructionFlightAltitude, so hovering at AvoidanceAltitude put
part of the counted ghosts out of drone reach.

Also fix four planning defects:

* the route corridor compared an angle against a sine, and could collapse
  instead of widening past 90 degrees;
* candidate near/far separation compared a difference of squared distances
  against a squared merge distance, so any slightly farther ghost claimed the
  far slot, and a displaced near candidate was dropped instead of demoted;
* the angular fan axes mixed the universal player rotation with planet-local
  positions;
* surface distances used chord length where great-circle length was meant.

Ghost eligibility now mirrors the material-delivery filter in
ConstructionModuleComponent.GameTick. A ghost rejected by constructableIdHash
or blocked by a nearby Dark Fog building can never clear itemRequired, so the
mecha would park on a site that makes no progress. The enemy probe is skipped
when the planet has no ground bases.

Drop the OrderNode.Stop in CancelAutoMotion: PlayerOrder.Clear() discards it
before PlayerOrder.GameTick can process it, and the actual braking comes from
PlayerMove_Fly decaying rtsVelocity. It only left a stray order gizmo at the
planet centre.

Untie the Harmony patch from AutoConstructButtonEnabled so hiding the button
cannot silently disable the feature, and throttle the enable diagnostics now
that enabling is an in-game action.

Extract the shared manual-movement input probe, name the obstacle layer mask,
reset a copied Localizer on the cloned count text, and drop the dead
representative-target guard.
2026-09-16 02:16:14 +08:00
soarqin 2c601e3546 refactor(uxassist): unify auto-cruise navigation
Remove the legacy cruise implementation and expose the advanced navigator through the existing auto-cruise setting and UI. Match the game's 1.6-degree steering cap and handle antiparallel target directions with a stable turn plane.
2026-09-14 15:14:26 +08:00
soarqin 1cbda9a1d6 fix(uxassist): poll shortcuts after native input updates
Dispatch shortcut polling from VFInput.OnUpdate's postfix so key-down events use fresh modifier and typing state. Keep regular feature updates in the plugin Update loop.
2026-09-13 23:36:06 +08:00
soarqin 3f8e04f4a0 feat(uxassist): show new navigation shortcut hint 2026-09-13 19:28:24 +08:00
soarqin 0e09c17ea0 feat(UXAssist): show original building buffer values 2026-07-22 15:50:16 +08:00
soarqin 69d5a4b3ce feat(UXAssist): set orbital collector product limits 2026-07-22 15:25:30 +08:00
soarqin 53d558a9a4 feat(UXAssist): add advanced auto-navigation 2026-07-22 15:01:34 +08:00
FyisFe a48ae5ad96 feat: add 'hide sorters too' sub-option for do-not-render feature
When enabled (with the parent feature on), sorters are also hidden,
leaving only belts and their cargo visible. Hidden sorters also become
click-through so clicks reach the belts beneath them.

- RenderingPatch: gate InserterRenderer.Render and the RaycastLogic
  inserter exemption on a new HideSorters flag
- FactoryPatch/UXAssist/FactoryConfigProvider: new
  DoNotRenderEntitiesHideSorters config wired to the flag
- UIConfigWindow/I18NKeys: indented sub-checkbox + EN/zh label
- README/CHANGELOG: document the sub-option; bump to 1.5.9
2026-07-22 14:21:05 +08:00
soarqin 66ecebaca7 fix(UXAssist): start late-discovered mod features 2026-07-11 14:25:46 +08:00
soarqin 6b03801681 fix: Auto-Construct panel visibility on panel switching 2026-07-11 00:53:06 +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 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 7973cbe358 refactor: centralize game constants 2026-06-23 20:11:39 +08:00
soarqin 54c1700fcd fix(UXAssist): restore I18N public API compatibility 2026-06-23 08:25:48 +08:00
soarqin 6c7f9867d0 refactor(UXAssist): clean up I18N internals without changing public API 2026-06-23 08:22:25 +08:00
soarqin d843090622 refactor(UXAssist): safe GameEvent wrapper and XML docs 2026-06-23 08:17:08 +08:00
soarqin 439d74c817 fix(UXAssist): preserve calling assembly semantics in Util facade 2026-06-23 08:09:53 +08:00
soarqin ed916ebe7f refactor(UXAssist): split Util into focused helpers with forwarding facade 2026-06-23 08:04:58 +08:00
soarqin 06015d51d0 docs(UXAssist): update ModFeature docs for non-static feature classes 2026-06-23 03:38:04 +08:00
soarqin 099f3ee35a refactor(CheatEnabler): adopt ModFeatureRegistry from UXAssist 2026-06-23 03:33:19 +08:00
soarqin 39bdf06e88 refactor(UXAssist): introduce config providers between UI and patches 2026-06-23 03:27:01 +08:00
soarqin 91259bbd17 refactor(UXAssist): harden ModFeatureRegistry 2026-06-23 02:23:20 +08:00
soarqin cb7a965d12 feat(UXAssist): public ModFeature lifecycle registry 2026-06-23 02:18:32 +08:00
soarqin 63aaceda6f chore: remove some use of WinApi to avoid possible security check from thunderstore 2026-06-16 00:59:20 +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 5e501ea649 UXAssist: add 3 options to Initialize Planet 2026-03-07 19:42:14 +08:00
soarqin 80aa2f9b70 UXAssist: fix belt signal overlap issue 2026-02-07 20:26:12 +08:00
soarqin d711dd25ef remove cpu affinity settings, as they are officially supported 2025-09-29 23:34:17 +08:00
soarqin e909b6d9d2 rename GameLogicProc back to make things compatible with old dependants 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 a25f74443d donet format 2025-09-21 15:38:03 +08:00
soarqin 75030c5b23 UXAssist v1.3.5 2025-05-10 20:09:30 +08:00
soarqin 5545d7a2bf UXAssist v1.3.2 2025-04-27 19:31:49 +08:00
soarqin 5674d601ec WIP for UXAssist new features 2025-04-13 20:06:37 +08:00
soarqin 092795cbac fix profile support 2025-03-26 02:15:44 +08:00
soarqin 34822453a7 try to remember window position across multiple display monitors 2025-01-24 20:03:07 +08:00
soarqin 2d6f5fdf56 try to fix P/E-core check 2024-11-26 18:46:01 +08:00
soarqin bbab36bc35 reformat code 2024-11-12 15:02:22 +08:00
soarqin 5b725ff94f avoid use console window if debug console is enabled in BepInEx 2024-11-12 15:01:53 +08:00
soarqin 6048db8069 try to fix multi-instance bug 2024-11-12 02:45:56 +08:00
soarqin 4534540786 Work in progress for UXAssist 1.2.5 2024-09-25 20:40:46 +08:00