Skip to content

Commit a05b0b5

Browse files
authored
Fix K9 identity concealment issue (#5954)
## Short description <!-- What do you propose to change with your PR? --> Adds an AlwaysIdentifiableComponent to the IdentitySystem to ignore the IdentitySystem's concealment code. ## Why we need to add this <!-- What is the reason for adding these changes? Please post links to Discussions as well as Bug Reports here. Please describe how this will change the game balance. --> I added #5816 to allow smart corgis and animals to begin to leverage the identity system. K9s do NOT have an ID slot and as such immediately fail to identify with their sec mask on. With this change, K9s will be always identifiable. This isn't a permanent solution to the matter; there is an in-flight bit of dev work going on in the 'Security K9' channel in #pr-workshop that is working to add collars in lieu of the existing system for K9s (tracking implanter and bespoke job identification code). Collars will act as PDAs with suit coordinates. Until that's done, this will help maintain gameplay-as-intended. The component is also decent for other situations that might spring up where something may need to be always identifiable. ## Media (Video/Screenshots) <!-- If your PR contains in-game changes you must provide screenshots/videos of the changes. --> Fixes this: <img width="388" height="205" alt="image" src="https://github.com/user-attachments/assets/cd8f4b35-9dd3-4a06-95a7-69a2b84aed37" /> ## Checks <!-- check boxes for faster reviewing of your PR --> - [X] I do not require assistance to complete the PR. - [X] Before posting/requesting review of a PR, I have verified that the changes work. - [X] I have added screenshots/videos of the changes, or this PR does not change in-game mechanics. - [X] I affirm that my changes are licensed under the [MIT License](https://github.com/ss14Starlight/space-station-14/blob/Starlight/LICENSE.TXT) and grant permission for use in this repository under its conditions. **Changelog** :cl: Sparlight - fix: K9s will no longer suffer abject identity concealment issues. <!-- If you want the players to know about changes made in this PR, specify them using the template outside the comment. Short and informative. :cl: STARLIGHT TEAM - add: Added Starlight. - remove: Removed SS13. - tweak: Changed SS14. - fix: Fixed Rinary. -->
1 parent d78a1de commit a05b0b5

4 files changed

Lines changed: 35 additions & 4 deletions

File tree

Content.Shared/IdentityManagement/IdentitySystem.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
using Content.Shared.IdentityManagement.Components;
1010
using Content.Shared.Inventory;
1111
using Content.Shared.Inventory.Events;
12-
using Content.Shared.Silicons.Borgs.Components;
1312
using Content.Shared.VoiceMask;
1413
using Robust.Shared.Containers;
1514
using Robust.Shared.Enums;
@@ -198,10 +197,8 @@ private void SetIdentityCriminalIcon(EntityUid uid)
198197
/// </returns>
199198
private string GetIdentityName(EntityUid target, IdentityRepresentation representation)
200199
{
201-
// Starlight Begin - borgs are always identifiable, chassis shape aside (e.g. Borgi)
202-
if (HasComp<BorgChassisComponent>(target))
200+
if (IsAlwaysIdentifiable(target)) // Starlight
203201
return representation.ToStringKnown(true, null);
204-
// Starlight End
205202

206203
var ev = new SeeIdentityAttemptEvent();
207204

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Robust.Shared.GameStates;
2+
3+
namespace Content.Shared._Starlight.IdentityManagement.Components;
4+
5+
/// <summary>
6+
/// The entity's real name always shows, even with an identity-concealing item
7+
/// worn (masks, helmets). Used for mobs that shouldn't be maskable, like the
8+
/// security K9. Mirrors the built-in always-identifiable handling for borgs.
9+
/// </summary>
10+
[RegisterComponent, NetworkedComponent]
11+
public sealed partial class AlwaysIdentifiableComponent : Component
12+
{
13+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
using Content.Shared._Starlight.IdentityManagement.Components;
2+
using Content.Shared.Silicons.Borgs.Components;
3+
4+
// ReSharper disable once CheckNamespace
5+
namespace Content.Shared.IdentityManagement;
6+
7+
public sealed partial class IdentitySystem
8+
{
9+
/// <summary>
10+
/// Whether this entity's real name should always show, ignoring any
11+
/// identity-concealing worn items. Borgs are always identifiable (chassis
12+
/// shape aside, e.g. Borgi); anything with <see cref="AlwaysIdentifiableComponent"/>
13+
/// opts into the same behavior.
14+
/// </summary>
15+
private bool IsAlwaysIdentifiable(EntityUid target)
16+
{
17+
return HasComp<BorgChassisComponent>(target)
18+
|| HasComp<AlwaysIdentifiableComponent>(target);
19+
}
20+
}

Resources/Prototypes/_Starlight/Entities/Mobs/NPCs/k9.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
- type: RandomMetadata
5252
nameSegments:
5353
- NamesCorgi
54+
- type: AlwaysIdentifiable
5455
- type: Grammar
5556
attributes:
5657
gender: epicene

0 commit comments

Comments
 (0)