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:
@@ -9,6 +9,7 @@ using JetBrains.Annotations;
|
||||
using Robust.Shared.Console;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Localization;
|
||||
|
||||
namespace Content.Server.GameTicking;
|
||||
|
||||
@@ -71,6 +72,16 @@ public sealed partial class GameTicker
|
||||
var ruleEntity = Spawn(ruleId, MapCoordinates.Nullspace);
|
||||
_sawmill.Info($"Added game rule {ToPrettyString(ruleEntity)}");
|
||||
_adminLogger.Add(LogType.EventStarted, $"Added game rule {ToPrettyString(ruleEntity)}");
|
||||
var str = Loc.GetString("station-event-system-run-event", ("eventName", ToPrettyString(ruleEntity)));
|
||||
#if DEBUG
|
||||
_chatManager.SendAdminAlert(str);
|
||||
#else
|
||||
if (RunLevel == GameRunLevel.InRound) // avoids telling admins the round type before it starts so that can be handled elsewhere.
|
||||
{
|
||||
_chatManager.SendAdminAlert(str);
|
||||
}
|
||||
#endif
|
||||
Log.Info(str);
|
||||
|
||||
var ev = new GameRuleAddedEvent(ruleEntity, ruleId);
|
||||
RaiseLocalEvent(ruleEntity, ref ev, true);
|
||||
|
||||
Reference in New Issue
Block a user