mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-11-19 17:05:20 +08:00
fix(uxassist): preserve vein count layout in 1.6.2
This commit is contained in:
1 parent
12467b9345
commit
9fc2723bca
5 files changed
+14
-30
No files matched your search
@@ -18,9 +18,9 @@
|
||||
## Build
|
||||
|
||||
- `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 <project>/<project>.csproj -c Release --no-restore`.
|
||||
- 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.
|
||||
- Package main mods with `dotnet build -t:ZipMod -c Release`; package preloaders with `dotnet build -t:CopyToParentPackage -c Release`. The mod `.csproj` `<Version>` 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 `<Version>`. Group user-visible changes by feature, omit implementation-only details, and carry forward existing unreleased notes without rewriting historical entries.
|
||||
- Normal validation: `dotnet build <project>/<project>.csproj -c Release --no-restore`. If NuGet assets are missing, run `dotnet restore <project>/<project>.csproj` before retrying the build.
|
||||
- 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` `<Version>` 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 `<Version>`. 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.
|
||||
- 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.
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
- `PatchImpl<T>.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.
|
||||
- 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. Restore original label layout when rows are reused or the feature is disabled.
|
||||
- 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.
|
||||
- Expanded terraform brushes must raise both the input-size limit and the operation-local clamps in `PrepareFlattenPoints` and `PrepareRestorePoints`, with buffers sized before either preparation path runs.
|
||||
- Space-scene rendering suppression must require the native in-game hide-UI state and exclude menu demos and combat cutscenes. A hidden player model alone does not imply hidden scenery; use the same eligibility check for drawing and planet-simulator visibility.
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
## Changlog
|
||||
|
||||
* 1.6.2
|
||||
* `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.
|
||||
* Fix the title-screen background turning black, even when the UXAssist window is closed.
|
||||
@@ -422,6 +424,8 @@
|
||||
|
||||
## 更新日志
|
||||
|
||||
* 1.6.2
|
||||
* `宇宙视图行星/星系矿脉数量显示`:修复矿脉数量文字偏下和矿物名称向右偏移的问题。
|
||||
* 1.6.1
|
||||
* `范围铺设地基的最大区域扩大`:适配 DSP 0.10.35.29104,恢复 11x11 至 30x30 的铺设地基与恢复地形范围。
|
||||
* 修复标题画面背景变黑的问题,包括关闭 UXAssist 窗口后背景仍不显示的情况。
|
||||
|
||||
@@ -160,12 +160,6 @@ public class UIPatch : PatchImpl<UIPatch>
|
||||
private static void FormatResource(UIResAmountEntry uiresAmountEntry, VeinTypeInfo vt)
|
||||
{
|
||||
RectTransform labelRect = uiresAmountEntry.labelText.rectTransform;
|
||||
if (vt.labelRect != labelRect)
|
||||
{
|
||||
vt.RestoreLabel();
|
||||
vt.labelRect = labelRect;
|
||||
vt.labelOffsetMinX = labelRect.offsetMin.x;
|
||||
}
|
||||
if (vt.textCtrl == null)
|
||||
{
|
||||
vt.textCtrl = Object.Instantiate(uiresAmountEntry.valueText, labelRect.parent);
|
||||
@@ -186,12 +180,10 @@ public class UIPatch : PatchImpl<UIPatch>
|
||||
{
|
||||
countRect.SetParent(labelRect.parent, false);
|
||||
}
|
||||
countRect.anchorMin = labelRect.anchorMin;
|
||||
countRect.anchorMax = new Vector2(labelRect.anchorMin.x, labelRect.anchorMax.y);
|
||||
countRect.pivot = new Vector2(0f, labelRect.pivot.y);
|
||||
countRect.offsetMin = new Vector2(vt.labelOffsetMinX, labelRect.offsetMin.y);
|
||||
countRect.offsetMax = new Vector2(vt.labelOffsetMinX + countWidth, labelRect.offsetMax.y);
|
||||
labelRect.offsetMin = new Vector2(vt.labelOffsetMinX + countWidth + CountLabelGap, labelRect.offsetMin.y);
|
||||
countRect.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, countWidth);
|
||||
Vector3 countPosition = uiresAmountEntry.rectTrans.localPosition;
|
||||
countPosition.x = labelRect.localPosition.x + labelRect.rect.xMin - countWidth * (1f - countRect.pivot.x) - CountLabelGap;
|
||||
countRect.localPosition = countPosition;
|
||||
}
|
||||
|
||||
private static void InitializeVeinCountArray(VeinTypeInfo[] veinCountArray)
|
||||
@@ -330,23 +322,11 @@ public class UIPatch : PatchImpl<UIPatch>
|
||||
public int numVeinGroups;
|
||||
public int numVeinGroupsWithCollector;
|
||||
public Text textCtrl;
|
||||
public RectTransform labelRect;
|
||||
public float labelOffsetMinX;
|
||||
|
||||
public void RestoreLabel()
|
||||
{
|
||||
if (labelRect != null)
|
||||
{
|
||||
labelRect.offsetMin = new Vector2(labelOffsetMinX, labelRect.offsetMin.y);
|
||||
}
|
||||
labelRect = null;
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
numVeinGroups = 0;
|
||||
numVeinGroupsWithCollector = 0;
|
||||
RestoreLabel();
|
||||
if (textCtrl != null)
|
||||
{
|
||||
textCtrl.text = "";
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<BepInExPluginGuid>org.soardev.uxassist</BepInExPluginGuid>
|
||||
<Description>DSP MOD - UXAssist</Description>
|
||||
<Version>1.6.1</Version>
|
||||
<Version>1.6.2</Version>
|
||||
<PackageId>UXAssist</PackageId>
|
||||
<RootNamespace>UXAssist</RootNamespace>
|
||||
<PackHasChangelog>true</PackHasChangelog>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "UXAssist",
|
||||
"version_number": "1.6.1",
|
||||
"version_number": "1.6.2",
|
||||
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UXAssist",
|
||||
"description": "Some functions and patches for better user experience / 一些提升用户体验的功能和补丁",
|
||||
"dependencies": [
|
||||
|
||||
Reference in new issue
Block a user