Pause the school on warning notices until the owner dismisses them.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -95,6 +95,11 @@ internal sealed partial class SchoolWorker
|
||||
_school = school;
|
||||
school.DressRules = _savedDressRules ?? new SchoolDressRules();
|
||||
school.SpeechRules = _savedSpeechRules ?? new SchoolSpeechRules();
|
||||
if (_notices.HasPausing)
|
||||
{
|
||||
school.Clock.IsRunning = false;
|
||||
}
|
||||
|
||||
PublishSnapshot();
|
||||
|
||||
if (_isNew)
|
||||
@@ -505,19 +510,12 @@ internal sealed partial class SchoolWorker
|
||||
{
|
||||
foreach (var def in catalog.Events.Values)
|
||||
{
|
||||
if (def.Abstract
|
||||
|| !def.Trigger.Equals(fact.Trigger, StringComparison.Ordinal)
|
||||
|| !def.Severity.Equals(EventSeverities.Info, StringComparison.Ordinal))
|
||||
if (def.Abstract || !def.Trigger.Equals(fact.Trigger, StringComparison.Ordinal))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
BroadcastNotice(new ServerNoticeMessage(
|
||||
++_nextNoticeId,
|
||||
def.DefName,
|
||||
NoticeSeverity.Info,
|
||||
def.Pause,
|
||||
(uint)Math.Max(0, def.TtlMs)));
|
||||
TryEmitNotice(school, def, personId: 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user