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:
@@ -34,14 +34,14 @@ public sealed class DeathMatchRuleSystem : GameRuleSystem
|
||||
SubscribeLocalEvent<DamageChangedEvent>(OnHealthChanged);
|
||||
}
|
||||
|
||||
public override void Started(GameRuleConfiguration _)
|
||||
public override void Started()
|
||||
{
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("rule-death-match-added-announcement"));
|
||||
|
||||
_playerManager.PlayerStatusChanged += OnPlayerStatusChanged;
|
||||
}
|
||||
|
||||
public override void Ended(GameRuleConfiguration _)
|
||||
public override void Ended()
|
||||
{
|
||||
_deadCheckTimer = null;
|
||||
_restartTimer = null;
|
||||
@@ -64,7 +64,7 @@ public sealed class DeathMatchRuleSystem : GameRuleSystem
|
||||
|
||||
private void RunDelayedCheck()
|
||||
{
|
||||
if (!Enabled || _deadCheckTimer != null)
|
||||
if (!RuleAdded || _deadCheckTimer != null)
|
||||
return;
|
||||
|
||||
_deadCheckTimer = DeadCheckDelay;
|
||||
@@ -72,7 +72,7 @@ public sealed class DeathMatchRuleSystem : GameRuleSystem
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
if (!Enabled)
|
||||
if (!RuleAdded)
|
||||
return;
|
||||
|
||||
// If the restart timer is active, that means the round is ending soon, no need to check for winners.
|
||||
|
||||
Reference in New Issue
Block a user