From 205cf55440605472d3de05ef0d953e0440b26b24 Mon Sep 17 00:00:00 2001 From: Soar Qin Date: Tue, 6 Oct 2026 15:19:29 +0800 Subject: [PATCH] fix(uxassist): clear beacon markers on planet reset in 1.6.3 --- AGENTS.md | 4 +++- UXAssist/CHANGELOG.md | 2 ++ UXAssist/Functions/PlanetFunctions.cs | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index afd280e..7d62c92 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -19,8 +19,9 @@ - `Directory.Build.props` supplies common frameworks, BepInEx packages, game references, warning policy, and the `UpdateGameDlls` dependency. `Directory.Build.targets` defines `ZipMod` and `CopyToParentPackage`. - Normal validation: `dotnet build /.csproj -c Release --no-restore`. If NuGet assets are missing, run `dotnet restore /.csproj` before retrying the build. +- Keep temporary verification projects under the mod's excluded root `obj/` directory. Remove abandoned generated outputs when their source project is gone so the SDK source glob cannot compile them into the mod. - Refresh game references explicitly with `dotnet build UpdateGameDlls/UpdateGameDlls.csproj`; the script publicizes installed DLLs in staging and compares generated content hashes so checkout timestamps cannot hide game updates. Missing DSP or the publicizer is a warning, not a build failure. If `assembly-publicizer` requires an unavailable .NET runtime, retry with process-local `DOTNET_ROLL_FORWARD=Major` rather than changing global runtime settings. Verify discovery warnings against the actual configured library directories and original managed DLLs; absence from the VDF `apps` list alone does not establish that DSP is uninstalled. -- Package main mods with `dotnet build -t:ZipMod -c Release`; package preloaders with `dotnet build -t:CopyToParentPackage -c Release`. The mod `.csproj` `` is the single version source and packaging synchronizes `package/manifest.json`. Keep the latest English and Chinese `CHANGELOG.md` release headings and notes aligned with ``. Group user-visible changes by feature and omit implementation-only details. Carry forward existing unreleased notes; document fixes to released regressions under the new version without rewriting historical entries. +- Package main mods with `dotnet build -t:ZipMod -c Release`; package preloaders with `dotnet build -t:CopyToParentPackage -c Release`. The mod `.csproj` `` is the single version source and packaging synchronizes `package/manifest.json`. Keep the latest English and Chinese `CHANGELOG.md` release headings and notes aligned with ``. Group user-visible changes by feature, state relevant triggers for fixes, and omit implementation-only details. Carry forward existing unreleased notes; document fixes to released regressions under the new version without rewriting historical entries. - Treat warnings as errors except the intentional obsolete API warning `0618`; do not weaken this policy to hide new warnings. - Export Thunderstore package icons as 256x256 PNG files and verify their format and dimensions. For circular exports, apply an antialiased alpha mask to the approved artwork instead of regenerating it; preserve RGB pixels and make the exterior fully transparent. Convey the mod's function through familiar, conventionally oriented symbols rather than lettering. Preserve DSP motifs and consistent materials across related mod icons. During localized edits, preserve all unrequested geometry, placement and styling from the chosen reference; do not redesign surrounding structures to produce an overlap. Use clear foreground occlusion for intersecting forms without losing the main symbol's silhouette, and check contrast in 64x64 and 32x32 side-by-side previews. Keep unselected icon candidates under `artifacts/`, outside release package directories. @@ -38,6 +39,7 @@ - Performance-sensitive Harmony transpilers must include the standard target/fallback header and use `TranspilerGuard` when a matcher can fail; returning original instructions is the fallback. Match named enum members and semantic calls or fields instead of hard-coded enum values or local-variable slots. Validate injected stack operand types and branch destinations, not just successful matching. - `PatchImpl.Enable(true)` must remain fail-soft: log, unpatch, and leave the patch unset if Harmony application fails so config delegate chains remain consistent. - Overlay UI state must converge from actual game state on periodic updates, not depend only on one-shot event or patch callbacks. Treat replacement of a planet transport as a lifecycle boundary and clear its dependent overlays once. Station IDs are reusable indices, and a stable planet ID or factory reference does not imply stable transport ownership. Cloned controls must reset runtime state while retaining source styles; use `UXAssist.UI.Util.GetPreferredWidth` for dynamic text and `ResetButton` for cloned buttons. Preserve the source tip settings when resetting cloned help buttons so the game's native tips work; do not replace them with separate dialogs. Shared button sizing must use anchor-relative child positions so text and icons remain aligned after a button pivot changes. +- Bulk planet resets must unregister entity markers through `DigitalSystem.RemoveMarkerComponent` before replacing entity pools or the digital system; `GalacticDigitalSystem` retains shared marker references across planets. - Logistics station overlays must refresh through the native UI lifecycle, independently of typing guards. Reconcile cached tips against live station/entity identities and recycle local tips when stations are removed. - Planet vein utilization counters belong before resource labels, not beside native icons or highlight controls. Keep resource labels in their native layout and preserve the counters' row-based vertical position when rows are reused. - UI-only options must preserve native progression, statistics, and event delivery. Suppress presentation handlers rather than bypassing authoritative game-state setters. diff --git a/UXAssist/CHANGELOG.md b/UXAssist/CHANGELOG.md index 37af2e8..e590f0d 100644 --- a/UXAssist/CHANGELOG.md +++ b/UXAssist/CHANGELOG.md @@ -4,6 +4,7 @@ ## Changlog * 1.6.2 + * `Initialize This Planet`: Fix an occasional array index error after initializing a planet with Holo Beacons. * `Planet vein utilization`: Restore the original vertical alignment of vein-group counts and keep resource names in their original positions. * 1.6.1 * `Larger area for terraform`: Restore 11x11 through 30x30 foundation and Restore Terrain brushes after DSP 0.10.35.29104. @@ -425,6 +426,7 @@ ## 更新日志 * 1.6.2 + * `初始化本行星`:修复行星上存在全息信标时,初始化后可能出现数组越界报错的问题。 * `宇宙视图行星/星系矿脉数量显示`:修复矿脉数量文字偏下和矿物名称向右偏移的问题。 * 1.6.1 * `范围铺设地基的最大区域扩大`:适配 DSP 0.10.35.29104,恢复 11x11 至 30x30 的铺设地基与恢复地形范围。 diff --git a/UXAssist/Functions/PlanetFunctions.cs b/UXAssist/Functions/PlanetFunctions.cs index 084ea34..b9344b9 100644 --- a/UXAssist/Functions/PlanetFunctions.cs +++ b/UXAssist/Functions/PlanetFunctions.cs @@ -478,6 +478,12 @@ public static class PlanetFunctions factory.BeforeDismantleObject(id); + if (ed.markerId != 0) + { + factory.digitalSystem.RemoveMarkerComponent(ed.markerId); + ed.markerId = 0; + } + if (ed.colliderId != 0) { physics.RemoveLinkedColliderData(ed.colliderId);