CatStation/Content.Server/GameTicking/Rules/SandboxRuleSystem.cs
Pieter-Jan Briers 5168b5f3d4
IoC source gen compatibility (#43863)
* IoC source gen compatibility

Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter.

* Missed a spot
2026-05-09 03:29:58 +00:00

22 lines
810 B
C#

using Content.Server.GameTicking.Rules.Components;
using Content.Server.Sandbox;
using Content.Shared.GameTicking.Components;
namespace Content.Server.GameTicking.Rules;
public sealed partial class SandboxRuleSystem : GameRuleSystem<SandboxRuleComponent>
{
[Dependency] private SandboxSystem _sandbox = default!;
protected override void Started(EntityUid uid, SandboxRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args)
{
base.Started(uid, component, gameRule, args);
_sandbox.IsSandboxEnabled = true;
}
protected override void Ended(EntityUid uid, SandboxRuleComponent component, GameRuleComponent gameRule, GameRuleEndedEvent args)
{
base.Ended(uid, component, gameRule, args);
_sandbox.IsSandboxEnabled = false;
}
}