Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
OnStart fix. Make sure the interval is not set to 00:00:00 and this t…
…rigger is set to run once.
  • Loading branch information
N1Ran committed Mar 28, 2019
commit c4d5a8fd12906cb5cb23481ea80bd8d1a49f2d5d
6 changes: 2 additions & 4 deletions Essentials/AutoCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@ private bool CanRun(AutoCommand command)
switch (command.CommandTrigger)
{
case Trigger.Disabled:
break;
return false;
case Trigger.OnStart:
var a = TimeSpan.Parse(command.Interval);
var b = ((ITorchServer)TorchBase.Instance).ElapsedPlayTime;
if ((a - b).TotalSeconds <= 1 && (a - b).TotalSeconds > 0)
return true;
break;
return ((a - b).TotalSeconds <= 1 && (a - b).TotalSeconds > 0);
case Trigger.Vote:
break;
case Trigger.Timed:
Expand Down