Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions Content.Shared/IdentityManagement/IdentitySystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using Content.Shared.IdentityManagement.Components;
using Content.Shared.Inventory;
using Content.Shared.Inventory.Events;
using Content.Shared.Silicons.Borgs.Components;
using Content.Shared.VoiceMask;
using Robust.Shared.Containers;
using Robust.Shared.Enums;
Expand Down Expand Up @@ -198,10 +197,8 @@ private void SetIdentityCriminalIcon(EntityUid uid)
/// </returns>
private string GetIdentityName(EntityUid target, IdentityRepresentation representation)
{
// Starlight Begin - borgs are always identifiable, chassis shape aside (e.g. Borgi)
if (HasComp<BorgChassisComponent>(target))
if (IsAlwaysIdentifiable(target)) // Starlight
return representation.ToStringKnown(true, null);
// Starlight End

var ev = new SeeIdentityAttemptEvent();

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Robust.Shared.GameStates;

namespace Content.Shared._Starlight.IdentityManagement.Components;

/// <summary>
/// The entity's real name always shows, even with an identity-concealing item
/// worn (masks, helmets). Used for mobs that shouldn't be maskable, like the
/// security K9. Mirrors the built-in always-identifiable handling for borgs.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class AlwaysIdentifiableComponent : Component
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Content.Shared._Starlight.IdentityManagement.Components;
using Content.Shared.Silicons.Borgs.Components;

// ReSharper disable once CheckNamespace
namespace Content.Shared.IdentityManagement;

public sealed partial class IdentitySystem
{
/// <summary>
/// Whether this entity's real name should always show, ignoring any
/// identity-concealing worn items. Borgs are always identifiable (chassis
/// shape aside, e.g. Borgi); anything with <see cref="AlwaysIdentifiableComponent"/>
/// opts into the same behavior.
/// </summary>
private bool IsAlwaysIdentifiable(EntityUid target)
{
return HasComp<BorgChassisComponent>(target)

Check warning on line 17 in Content.Shared/_Starlight/IdentityManagement/IdentitySystem.Starlight.cs

View workflow job for this annotation

GitHub Actions / build

[C# diagnostics] reported by reviewdog 馃惗 Use expression body for method Raw Output: {"level":"warning","locations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Shared/_Starlight/IdentityManagement/IdentitySystem.Starlight.cs"},"region":{"endColumn":61,"endLine":18,"startColumn":9,"startLine":17}}}],"message":{"text":"Use expression body for method"},"properties":{},"relatedLocations":[{"physicalLocation":{"artifactLocation":{"uri":"file:///home/runner/work/space-station-14/space-station-14/Content.Shared/_Starlight/IdentityManagement/IdentitySystem.Starlight.cs"},"region":{"endColumn":6,"endLine":19,"startColumn":5,"startLine":15}}}],"ruleId":"IDE0022","ruleIndex":517}
|| HasComp<AlwaysIdentifiableComponent>(target);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
- type: RandomMetadata
nameSegments:
- NamesCorgi
- type: AlwaysIdentifiable
- type: Grammar
attributes:
gender: epicene
Expand Down
Loading