mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-11-19 17:05:20 +08:00
fix(uxassist): restore tech-tree arrows across save changes
Grow missing connection arrows when Peace-mode filtering is restored, preserving existing controls and native connection updates. Record the fix in UXAssist 1.7.0 and synchronize the manifest and bilingual documentation.
This commit is contained in:
1 parent
d728e8b4ae
commit
2eae91fa18
5 files changed
+20
-3
No files matched your search
@@ -3,6 +3,8 @@
|
||||
|
||||
## Changlog
|
||||
|
||||
* 1.6.4
|
||||
* `Hide battle-related techs in Peace mode`: Fix an array index error when opening the tech tree after switching from a Peace-mode save to a Combat-mode save in the same game process, including when disabling the option after loading another Peace-mode save.
|
||||
* 1.6.3
|
||||
* `Quick build Mining Machines`:
|
||||
* Add a Factory-tab button to arrange ordinary Mining Machines densely around the nearest solid vein group. Each miner covers at least 3 nodes from that group, without including nearby groups. Layouts are not limited by stock; missing miners remain as ghosts awaiting materials. Placement respects construction range and does not include belts or power facilities. Click again to cancel a search.
|
||||
@@ -444,6 +446,8 @@
|
||||
|
||||
## 更新日志
|
||||
|
||||
* 1.6.4
|
||||
* `在和平模式下隐藏战斗相关科技`:修复在同一次游戏运行中从和平模式存档切换到战斗模式存档后打开科技树时的数组越界,以及再次加载和平模式存档后关闭选项时的同类问题。
|
||||
* 1.6.3
|
||||
* `快速铺设采矿机`:
|
||||
* 在「工厂」页增加按钮,自动在最近的固体矿脉周围密集铺设普通采矿机。每台至少覆盖选中矿脉的 3 个矿点,不混入附近其他矿脉。布局数量不受库存限制,采矿机不足的位置保留待建造虚影。遵守建造范围,不自动铺设传送带和电力设施。计算期间再次点击可取消。
|
||||
|
||||
@@ -222,11 +222,22 @@ public static class TechPatch
|
||||
foreach (var item in nodes)
|
||||
{
|
||||
var node = item.Value;
|
||||
var postTechArray = node.techProto.postTechArray;
|
||||
// A new session can initialize nodes while the peace-mode graph is still filtered.
|
||||
var arrowCount = node.arrows.Length;
|
||||
if (arrowCount < postTechArray.Length)
|
||||
{
|
||||
System.Array.Resize(ref node.arrows, postTechArray.Length);
|
||||
for (var i = arrowCount; i < postTechArray.Length; i++)
|
||||
{
|
||||
node.arrows[i] = UnityEngine.Object.Instantiate(node.arrowPrefab, node.arrowPrefab.parent);
|
||||
node.arrows[i].SetAsFirstSibling();
|
||||
}
|
||||
}
|
||||
foreach (var arrow in node.arrows)
|
||||
{
|
||||
arrow.gameObject.SetActive(false);
|
||||
}
|
||||
var postTechArray = node.techProto.postTechArray;
|
||||
var active = postTechArray.Length > 0;
|
||||
node.connGroup.gameObject.SetActive(active);
|
||||
node.connImages = active ? node.connGroup.GetComponentsInChildren<Image>(true) : [];
|
||||
|
||||
@@ -171,6 +171,7 @@
|
||||
* Buy out techs with their prerequisites
|
||||
* This enables batch buying out techs with their prerequisites. Buy-out buttons are shown for locked techs/upgrades.
|
||||
* Hide battle-related techs in Peace mode
|
||||
* Battle-related techs and their connections return when disabling the option or loading a Combat-mode save; switching saves does not require restarting the game.
|
||||
* Unlock all techs with metadata
|
||||
* Use the config-panel button to confirm the metadata cost and buy out eligible techs in a batch; unlimited upgrade chains are excluded.
|
||||
* Combat
|
||||
@@ -378,6 +379,7 @@
|
||||
* 买断科技也同时买断所有前置科技
|
||||
* 可批量买断科技及其前置科技,未解锁的科技和升级会显示买断按钮。
|
||||
* 在和平模式下隐藏战斗相关科技
|
||||
* 关闭选项或加载战斗模式存档后恢复相关科技及连线,切换存档无需重启游戏。
|
||||
* 使用元数据解锁所有科技
|
||||
* 在配置面板点击按钮并确认元数据消耗,批量买断符合条件的科技;不包含无限升级科技链。
|
||||
* 战斗
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<BepInExPluginGuid>org.soardev.uxassist</BepInExPluginGuid>
|
||||
<Description>DSP MOD - UXAssist</Description>
|
||||
<Version>1.6.3</Version>
|
||||
<Version>1.6.4</Version>
|
||||
<PackageId>UXAssist</PackageId>
|
||||
<RootNamespace>UXAssist</RootNamespace>
|
||||
<PackHasChangelog>true</PackHasChangelog>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "UXAssist",
|
||||
"version_number": "1.6.3",
|
||||
"version_number": "1.6.4",
|
||||
"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