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.
Select the closest eligible ghost in the approach corridor before flying to a selected site, and use spherical cross-track checks to avoid bypassing nearer construction work.
Top up the warp heading toward the requested direction after game rotation so the actual heading achieves the 1.6-degree-per-tick turn step. Reduce warp speed control during large heading errors while preserving manual warp speed input.
Only avoid an orbiting parent when the direct target segment intersects it. Constrain its avoidance radius to stay outside the target and follow a heading-selected tangent before resuming direct approach.
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.
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.
- Rename ImmediateBuildPatch to FactoryBuildPatches
- Rename AutoConstructButton to AutoConstructPatch
- AutoConstructButtonEnabled now toggles the Harmony patch instead of only refreshing UI visibility
- Preserve AutoConstructEnabled state when the button option is toggled
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.
Object.Destroy(stationTip) where stationTip is a MonoBehaviour destroys
only the component, leaving the cloned UI GameObject (icons, sliders, text)
orphaned and potentially visible under _stationTipsRoot. When the recycle
pool (128 slots) fills up during a planet with many stations, excess tips
were disposed this way; those orphaned GameObjects would reappear as frozen
'ghost' tips on every subsequent planet.
- Add ReleaseStationTip() helper: calls Object.Destroy(go) on the whole
GameObject after SetActive(false), replacing the broken Destroy(component)
- Simplify RecycleStationTips() and RecycleStationTip(int) to delegate to
ReleaseStationTip()
- Add HideAndRecycleStationTips() single cleanup entry point used by
Enable(false), OnGameBegin(), and new OnGameEnd()
- Add LocalPlanetWatcher (PatchImpl) hooking GameData.localPlanet setter:
triggers HideAndRecycleStationTips() on any planet id change, covering
frames where Update() is skipped by VFInput.inputing
- Subscribe OnGameEnd to clear tips when exiting a save/returning to menu