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