Move Access to ECS (#4826)
* Moved access to ecs * Fixed tests * Moved test to integration * Better IoC * Moved preset ID card * Moved id card to ECS * Moved access component to ECS * Fixed pda access * Final touches Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using Content.Server.Access.Systems;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
@@ -9,22 +11,13 @@ namespace Content.Server.Access.Components
|
||||
/// Simple mutable access provider found on ID cards and such.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(IAccess))]
|
||||
public class AccessComponent : Component, IAccess
|
||||
[Friend(typeof(AccessSystem))]
|
||||
public class AccessComponent : Component
|
||||
{
|
||||
public override string Name => "Access";
|
||||
|
||||
[DataField("tags")]
|
||||
[ViewVariables]
|
||||
private readonly HashSet<string> _tags = new();
|
||||
|
||||
public ISet<string> Tags => _tags;
|
||||
public bool IsReadOnly => false;
|
||||
|
||||
public void SetTags(IEnumerable<string> newTags)
|
||||
{
|
||||
_tags.Clear();
|
||||
_tags.UnionWith(newTags);
|
||||
}
|
||||
public HashSet<string> Tags = new();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user