mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* 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
22 lines
810 B
C#
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;
|
|
}
|
|
}
|