Refactor Game Modes (#5819)
This commit is contained in:
committed by
GitHub
parent
8be5c25bd4
commit
8831d08229
21
Content.Server/GameTicking/Rules/SandboxRuleSystem.cs
Normal file
21
Content.Server/GameTicking/Rules/SandboxRuleSystem.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Content.Server.Sandbox;
|
||||
using Robust.Shared.IoC;
|
||||
|
||||
namespace Content.Server.GameTicking.Rules;
|
||||
|
||||
public class SandboxRuleSystem : GameRuleSystem
|
||||
{
|
||||
[Dependency] private readonly ISandboxManager _sandbox = default!;
|
||||
|
||||
public override string Prototype => "Sandbox";
|
||||
|
||||
public override void Added()
|
||||
{
|
||||
_sandbox.IsSandboxEnabled = true;
|
||||
}
|
||||
|
||||
public override void Removed()
|
||||
{
|
||||
_sandbox.IsSandboxEnabled = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user