Event refactor (#9589)
* Station event refactor * Remove clientside `IStationEventManager` we can just use prototypes * Basic API idea * Cruft * first attempt at epicness * okay yeah this shit is really clean * sort out minor stuff * Convert `BreakerFlip` * `BureaucraticError` + general cleanup * `DiseaseOutbreak` * `FalseAlarm` * `GasLeak` * `KudzuGrowth` * `MeteorSwarm` * `MouseMigration` * misc errors * `PowerGridCheck` * `RandomSentience` * `VentClog` * `VentCritters` * `ZombieOutbreak` * Rewrite basic event scheduler * Minor fixes and logging * ooooops * errors + fix * linter * completions, `RuleStarted` property, update loop fixes * Tweaks * Fix #9462 * Basic scheduler update fix, and fixes #8174 * Add test * UI cleanup * really this was just for testing
This commit is contained in:
@@ -23,10 +23,11 @@ public sealed class MaxTimeRestartRuleSystem : GameRuleSystem
|
||||
SubscribeLocalEvent<GameRunLevelChangedEvent>(RunLevelChanged);
|
||||
}
|
||||
|
||||
public override void Started(GameRuleConfiguration config)
|
||||
public override void Started()
|
||||
{
|
||||
if (config is not MaxTimeRestartRuleConfiguration maxTimeRestartConfig)
|
||||
if (Configuration is not MaxTimeRestartRuleConfiguration maxTimeRestartConfig)
|
||||
return;
|
||||
|
||||
RoundMaxTime = maxTimeRestartConfig.RoundMaxTime;
|
||||
RoundEndDelay = maxTimeRestartConfig.RoundEndDelay;
|
||||
|
||||
@@ -34,7 +35,7 @@ public sealed class MaxTimeRestartRuleSystem : GameRuleSystem
|
||||
RestartTimer();
|
||||
}
|
||||
|
||||
public override void Ended(GameRuleConfiguration _)
|
||||
public override void Ended()
|
||||
{
|
||||
StopTimer();
|
||||
}
|
||||
@@ -62,7 +63,7 @@ public sealed class MaxTimeRestartRuleSystem : GameRuleSystem
|
||||
|
||||
private void RunLevelChanged(GameRunLevelChangedEvent args)
|
||||
{
|
||||
if (!Enabled)
|
||||
if (!RuleAdded)
|
||||
return;
|
||||
|
||||
switch (args.New)
|
||||
|
||||
Reference in New Issue
Block a user