mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-02-04 21:42:19 +08:00
bug fix
This commit is contained in:
@@ -33,14 +33,15 @@ public static class FactoryFunctions
|
|||||||
List<int> buildPreviewsToRemove = [];
|
List<int> buildPreviewsToRemove = [];
|
||||||
foreach (var buildPreview in blueprintCopyTool.bpPool)
|
foreach (var buildPreview in blueprintCopyTool.bpPool)
|
||||||
{
|
{
|
||||||
if (buildPreview?.item == null || buildPreview.objId <= 0) continue;
|
if (buildPreview?.item == null) continue;
|
||||||
|
var objId = buildPreview.objId;
|
||||||
|
if (objId == 0) continue;
|
||||||
int index;
|
int index;
|
||||||
if ((index = buildPreviewsToRemove.BinarySearch(buildPreview.objId)) < 0)
|
if ((index = buildPreviewsToRemove.BinarySearch(objId)) < 0)
|
||||||
buildPreviewsToRemove.Insert(~index, buildPreview.objId);
|
buildPreviewsToRemove.Insert(~index, objId);
|
||||||
var isBelt = buildPreview.desc.isBelt;
|
var isBelt = buildPreview.desc.isBelt;
|
||||||
var isInserter = buildPreview.desc.isInserter;
|
var isInserter = buildPreview.desc.isInserter;
|
||||||
if (isInserter) continue;
|
if (isInserter) continue;
|
||||||
var objId = buildPreview.objId;
|
|
||||||
if (isBelt)
|
if (isBelt)
|
||||||
{
|
{
|
||||||
var needCheck = false;
|
var needCheck = false;
|
||||||
@@ -86,7 +87,6 @@ public static class FactoryFunctions
|
|||||||
{
|
{
|
||||||
build.DoDismantleObject(objId);
|
build.DoDismantleObject(objId);
|
||||||
}
|
}
|
||||||
buildPreviewsToRemove = null;
|
|
||||||
blueprintCopyTool.ClearSelection();
|
blueprintCopyTool.ClearSelection();
|
||||||
blueprintCopyTool.ClearPreSelection();
|
blueprintCopyTool.ClearPreSelection();
|
||||||
blueprintCopyTool.ResetBlueprint();
|
blueprintCopyTool.ResetBlueprint();
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ public static class PlayerPatch
|
|||||||
|
|
||||||
public static void OnUpdate()
|
public static void OnUpdate()
|
||||||
{
|
{
|
||||||
|
if (!UIRoot.instance.uiGame.starmap.active) return;
|
||||||
if (_toggleAllStarsNameKey.keyValue)
|
if (_toggleAllStarsNameKey.keyValue)
|
||||||
{
|
{
|
||||||
ToggleAllStarsName();
|
ToggleAllStarsName();
|
||||||
@@ -175,9 +176,9 @@ public static class PlayerPatch
|
|||||||
_forceShowAllStarsName = _forceShowAllStarsNameExternal || _showAllStarsNameKey.IsKeyPressing();
|
_forceShowAllStarsName = _forceShowAllStarsNameExternal || _showAllStarsNameKey.IsKeyPressing();
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPostfix]
|
[HarmonyPrefix]
|
||||||
[HarmonyPatch(typeof(UIStarmap), nameof(UIStarmap._OnClose))]
|
[HarmonyPatch(typeof(UIStarmap), nameof(UIStarmap._OnOpen))]
|
||||||
private static void UIStarmap__OnClose_Postfix()
|
private static void UIStarmap__OnOpen_Prefix()
|
||||||
{
|
{
|
||||||
_showAllStarsNameStatus = 0;
|
_showAllStarsNameStatus = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user