refactor event schedulers to use explicit game rules (#29320)

* works, still has testing values, im sure I did stupid shit.

* shitvent crapfactor

* snap extra word out of existence

* shit I died of old

* remove useless inaccurate design comments

* Oopsie, handle requirement params in RandomRuleSystem too

* I'm a slash slinging hasher

* Address reviews, add admin alerts I forgor

* EntityMan saves the day

* address reviews 1

* eh, I actually don't care about the cargo gifts thing.

* started

* Do reviews

* you actually meant 1.2 lmao

* dependency inheritance is a fickle bitch

* I have no idea.

* Threads are for sheets not computers.

* fix traitor rule test

* fix round type tattling

* break things

* It worky

* Toolshed makes we want to drink depresso.

* Finished?

* remove debug values

* timings

* use defaults

* alphabetize

* bobby drop tables

* Float required fr fr

* continue

* more continence

* uno mas

* obsolution

* cleanup and documentations

* Yell at self

* use the right value defaults

* housekeeping
This commit is contained in:
IProduceWidgets
2024-08-14 01:21:01 -04:00
committed by GitHub
parent 58a33b2593
commit 07ec00ed05
21 changed files with 600 additions and 241 deletions

View File

@@ -77,16 +77,17 @@ public sealed class TraitorRuleTest
await pair.SetAntagPreference(TraitorAntagRoleName, true);
// Add the game rule
var gameRuleEnt = ticker.AddGameRule(TraitorGameRuleProtoId);
Assert.That(entMan.TryGetComponent<TraitorRuleComponent>(gameRuleEnt, out var traitorRule));
// Ready up
ticker.ToggleReadyAll(true);
Assert.That(ticker.PlayerGameStatuses.Values.All(x => x == PlayerGameStatus.ReadyToPlay));
// Start the round
TraitorRuleComponent traitorRule = null;
await server.WaitPost(() =>
{
var gameRuleEnt = ticker.AddGameRule(TraitorGameRuleProtoId);
Assert.That(entMan.TryGetComponent<TraitorRuleComponent>(gameRuleEnt, out traitorRule));
// Ready up
ticker.ToggleReadyAll(true);
Assert.That(ticker.PlayerGameStatuses.Values.All(x => x == PlayerGameStatus.ReadyToPlay));
// Start the round
ticker.StartRound();
// Force traitor mode to start (skip the delay)
ticker.StartGameRule(gameRuleEnt);