diff --git a/src/Sanderling/Sanderling.Exe/sample/script/Mine.ore.cs b/src/Sanderling/Sanderling.Exe/sample/script/Mine.ore.cs index a3e22e50..ad5d52ed 100644 --- a/src/Sanderling/Sanderling.Exe/sample/script/Mine.ore.cs +++ b/src/Sanderling/Sanderling.Exe/sample/script/Mine.ore.cs @@ -171,13 +171,13 @@ Func DefenseStep() Host.Log("exit defense."); return null; } - - if(!(0 < DronesInSpaceCount)) - { + + if (!(0 < DronesInSpaceCount)) DroneLaunch(); - } - var SetRatName = + EnsureOverviewTypeSelectionLoaded(); + + var SetRatName = ListRatOverviewEntry?.Select(entry => Regex.Split(entry?.Name ?? "", @"\s+")?.FirstOrDefault()) ?.Distinct() ?.ToArray(); @@ -206,6 +206,12 @@ Func DefenseStep() Func InBeltMineStep() { + if (DefenseEnter) + { + Host.Log("enter defense."); + return DefenseStep; + } + EnsureWindowInventoryOpenOreHold(); EnsureOverviewTypeSelectionLoaded();