Replace IResettingEntitySystem with RoundRestartCleanupEvent. (#4245)
* Replace IResettingEntitySystem with RoundRestartCleanupEvent. * oops
This commit is contained in:
committed by
GitHub
parent
16e1c2c798
commit
bc7b315b18
@@ -7,11 +7,18 @@ using static Content.Shared.Wires.SharedWiresComponent;
|
||||
|
||||
namespace Content.Server.Wires
|
||||
{
|
||||
public class WireHackingSystem : EntitySystem, IResettingEntitySystem
|
||||
public class WireHackingSystem : EntitySystem
|
||||
{
|
||||
[ViewVariables] private readonly Dictionary<string, WireLayout> _layouts =
|
||||
new();
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<RoundRestartCleanupEvent>(Reset);
|
||||
}
|
||||
|
||||
public bool TryGetLayout(string id, [NotNullWhen(true)] out WireLayout? layout)
|
||||
{
|
||||
return _layouts.TryGetValue(id, out layout);
|
||||
@@ -22,7 +29,7 @@ namespace Content.Server.Wires
|
||||
_layouts.Add(id, layout);
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
public void Reset(RoundRestartCleanupEvent ev)
|
||||
{
|
||||
_layouts.Clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user