diff --git a/UXAssist/CHANGELOG.md b/UXAssist/CHANGELOG.md
index bb2a4df..8e5f933 100644
--- a/UXAssist/CHANGELOG.md
+++ b/UXAssist/CHANGELOG.md
@@ -1,5 +1,8 @@
## Changlog
+* 1.2.10
+ + `Set enabled CPU threads`: Fix hybrid-architect check for CPUs without hyper-threading
+ + `Re-initialize Dyson Spheres` and `Quick dismantle Dyson Shells`: Fix possible crashes and a display issue, while Dyson Sphere panel is actived.
* 1.2.9
+ `Protect veins from exhaustion`:
- Fix a bug that vein protection causes crashes (#50).
@@ -221,6 +224,9 @@
## 更新日志
+* 1.2.10
+ + `设置使用的CPU线程`:修复了对没有超线程的CPU的大小核检查
+ + `初始化戴森球`和`快速拆除戴森壳`:修复了在戴森球面板激活时可能导致崩溃的问题,以及显示错误的问题。
* 1.2.9
+ `保护矿脉不会耗尽`:
- 修复了矿脉保护导致崩溃的问题(#50)
diff --git a/UXAssist/Functions/DysonSphereFunctions.cs b/UXAssist/Functions/DysonSphereFunctions.cs
index 04984d5..862b905 100644
--- a/UXAssist/Functions/DysonSphereFunctions.cs
+++ b/UXAssist/Functions/DysonSphereFunctions.cs
@@ -15,59 +15,49 @@ public static class DysonSphereFunctions
return star ?? GameMain.data?.localStar;
}
- public static void InitCurrentDysonLayer(StarData star, int index)
+ public static void InitCurrentDysonLayer(StarData star, int layerId)
{
star ??= CurrentStarForDysonSystem();
if (star == null) return;
var dysonSpheres = GameMain.data?.dysonSpheres;
if (dysonSpheres == null) return;
var dysonEditor = UIRoot.instance?.uiGame.dysonEditor;
- if (index < 0)
+ if (layerId < 0)
{
if (dysonSpheres[star.index] == null) return;
- var idsToRemove = dysonSpheres[star.index].layersSorted.Select(layer => layer.id).ToArray();
var dysonSphere = new DysonSphere();
dysonSpheres[star.index] = dysonSphere;
dysonSphere.Init(GameMain.data, star);
dysonSphere.ResetNew();
- if (dysonEditor == null) return;
- foreach (var id in idsToRemove)
+
+ if (!dysonEditor) return;
+ if (dysonEditor.selection.viewStar == star)
{
- if (!dysonEditor.IsRender(id, false, true))
- {
- dysonEditor.SwitchRenderState(id, false, true);
- }
- if (!dysonEditor.IsRender(id, false, false))
- {
- dysonEditor.SwitchRenderState(id, false, false);
- }
+ dysonEditor.selection.viewDysonSphere = dysonSphere;
+ dysonEditor.selection.NotifyDysonShpereChange();
}
- dysonEditor.selection.ClearAllSelection();
return;
}
var ds = dysonSpheres[star.index];
- if (ds?.layersIdBased[index] == null) return;
+ if (ds?.layersIdBased[layerId] == null) return;
var pool = ds.rocketPool;
- var idToRemove = -1;
for (var id = ds.rocketCursor - 1; id > 0; id--)
{
if (pool[id].id != id) continue;
- if (pool[id].nodeLayerId != index) continue;
+ if (pool[id].nodeLayerId != layerId) continue;
ds.RemoveDysonRocket(id);
- idToRemove = id;
break;
}
- if (idToRemove < 0) return;
- ds.RemoveLayer(idToRemove);
- if (dysonEditor == null) return;
- if (!dysonEditor.IsRender(idToRemove, false, true))
+ ds.RemoveLayer(layerId);
+ if (!dysonEditor) return;
+ if (!dysonEditor.IsRender(layerId, false, true))
{
- dysonEditor.SwitchRenderState(idToRemove, false, true);
+ dysonEditor.SwitchRenderState(layerId, false, true);
}
- if (!dysonEditor.IsRender(idToRemove, false, false))
+ if (!dysonEditor.IsRender(layerId, false, false))
{
- dysonEditor.SwitchRenderState(idToRemove, false, false);
+ dysonEditor.SwitchRenderState(layerId, false, false);
}
dysonEditor.selection.ClearAllSelection();
}
diff --git a/UXAssist/UXAssist.csproj b/UXAssist/UXAssist.csproj
index ba17c2f..21c5658 100644
--- a/UXAssist/UXAssist.csproj
+++ b/UXAssist/UXAssist.csproj
@@ -4,7 +4,7 @@
net472
org.soardev.uxassist
DSP MOD - UXAssist
- 1.2.9
+ 1.2.10
true
latest
UXAssist
diff --git a/UXAssist/package/manifest.json b/UXAssist/package/manifest.json
index b3e9fad..d108f85 100644
--- a/UXAssist/package/manifest.json
+++ b/UXAssist/package/manifest.json
@@ -1,6 +1,6 @@
{
"name": "UXAssist",
- "version_number": "1.2.9",
+ "version_number": "1.2.10",
"website_url": "https://github.com/soarqin/DSP_Mods/tree/master/UXAssist",
"description": "Some functions and patches for better user experience / 一些提升用户体验的功能和补丁",
"dependencies": [