Skip to content
Prev Previous commit
Next Next commit
Merge branch 'Patron' into Patron
  • Loading branch information
N1Ran authored Apr 16, 2019
commit 8a57d14acf62a2277c7e83c2f9ab05ebe6b9a380
10 changes: 5 additions & 5 deletions Essentials/AutoCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ public void Update()
_currentStep++;
_nextRun += step.DelaySpan;

if (_currentStep >= Steps.Count)
{
_currentStep = 0;
_nextRun = _scheduledTime != TimeSpan.Zero

if (_currentStep < Steps.Count) return;
_currentStep = 0;
_nextRun = _scheduledTime != TimeSpan.Zero
? DateTime.Now.Date + _scheduledTime + TimeSpan.FromDays(1)
: _nextRun = DateTime.Now + _interval;
}

}

private IEnumerable SimSpeedDelay(TimeSpan time)
Expand Down
2 changes: 2 additions & 0 deletions Essentials/AutoCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ private bool CanRun(AutoCommand command)
case Trigger.Scheduled:
return true;
case Trigger.GridCount:

switch (command.Compare)
{
case GTL.GreaterThan:
Expand All @@ -75,6 +76,7 @@ private bool CanRun(AutoCommand command)

return Math.Min(Sync.ServerSimulationRatio, 1) <= command.TriggerRatio;


default:
throw new Exception("fuck it");
}
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.