Skip to content

Commit

Permalink
add check whether defense necessary.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcitectus committed Dec 12, 2015
1 parent dcd08a8 commit 016de29
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/Sanderling/Sanderling.Exe/sample/script/Mine.ore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,13 @@ Func<object> 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();
Expand Down Expand Up @@ -206,6 +206,12 @@ Func<object> DefenseStep()

Func<object> InBeltMineStep()
{
if (DefenseEnter)
{
Host.Log("enter defense.");
return DefenseStep;
}

EnsureWindowInventoryOpenOreHold();

EnsureOverviewTypeSelectionLoaded();
Expand Down

0 comments on commit 016de29

Please sign in to comment.