Fix warnings and code cleanup/fixes (#13570)
This commit is contained in:
@@ -11,7 +11,7 @@ namespace Content.Shared.Access;
|
||||
[Prototype("accessGroup")]
|
||||
public sealed class AccessGroupPrototype : IPrototype
|
||||
{
|
||||
[IdDataFieldAttribute]
|
||||
[IdDataField]
|
||||
public string ID { get; } = default!;
|
||||
|
||||
[DataField("tags", required: true, customTypeSerializer:typeof(PrototypeIdHashSetSerializer<AccessLevelPrototype>))]
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Shared.Access
|
||||
public sealed class AccessLevelPrototype : IPrototype
|
||||
{
|
||||
[ViewVariables]
|
||||
[IdDataFieldAttribute]
|
||||
[IdDataField]
|
||||
public string ID { get; } = default!;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Content.Shared.Access.Systems
|
||||
|
||||
private void OnEmagged(EntityUid uid, AccessReaderComponent reader, GotEmaggedEvent args)
|
||||
{
|
||||
if (reader.Enabled == true)
|
||||
if (reader.Enabled)
|
||||
{
|
||||
reader.Enabled = false;
|
||||
args.Handled = true;
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Content.Shared.Access.Systems
|
||||
/// <summary>
|
||||
/// Replaces the set of access tags we have with the provided set.
|
||||
/// </summary>
|
||||
/// <param name="newTags">The new access tags</param>
|
||||
/// <param name="access">The new access tags</param>
|
||||
public bool TrySetTags(EntityUid uid, IEnumerable<string> newTags, AccessComponent? access = null)
|
||||
{
|
||||
if (!Resolve(uid, ref access))
|
||||
@@ -70,7 +70,7 @@ namespace Content.Shared.Access.Systems
|
||||
/// <summary>
|
||||
/// Gets the set of access tags.
|
||||
/// </summary>
|
||||
/// <param name="newTags">The new access tags</param>
|
||||
/// <param name="access">The new access tags</param>
|
||||
public IEnumerable<string>? TryGetTags(EntityUid uid, AccessComponent? access = null)
|
||||
{
|
||||
return !Resolve(uid, ref access) ? null : access.Tags;
|
||||
|
||||
Reference in New Issue
Block a user