fix(minigame): GM ForceStart bypasses the previous-run TaskDuration guard

A forced start (e.g. /starths) was blocked for the whole TaskDuration after a
run even though the event had already ended, so re-starting needed a server
restart. ForceStart now skips the 'previous event still running' guard;
scheduled auto-starts still respect it.
This commit is contained in:
Acentech Dev
2026-07-21 15:02:45 +03:00
parent 0f9db37a92
commit bd5cda12dd

View File

@@ -71,9 +71,12 @@ public abstract class PeriodicTaskBasePlugIn<TConfiguration, TState> : IPeriodic
return;
}
if (this.IsPreviousEventStillRunning(state))
// A GM ForceStart (e.g. /starths) bypasses the "previous run still within its TaskDuration"
// guard: the previous event has actually ended, and the admin explicitly wants a new one now.
// (Without this, TaskDuration keeps the state blocked for its full length even after the event
// finished, so a re-start only worked after a server restart.) Scheduled auto-starts still respect it.
if (!this._isStartForced && this.IsPreviousEventStillRunning(state))
{
this._isStartForced = false;
return;
}