Obfuscates pocket slots from the Strip Menu (#8948)

This commit is contained in:
keronshb
2022-06-19 20:57:32 -04:00
committed by GitHub
parent 50b405cec9
commit 51463d999b
4 changed files with 17 additions and 2 deletions

View File

@@ -190,7 +190,17 @@ namespace Content.Server.Strip
var name = "None";
if (_inventorySystem.TryGetSlotEntity(uid, slot.Name, out var item))
name = Name(item.Value);
{
if (!slot.StripHidden)
{
name = Name(item.Value);
}
else
{
name = Loc.GetString("strippable-bound-user-interface-stripping-menu-obfuscate");
}
}
inventory[(slot.Name, slot.DisplayName)] = name;
}

View File

@@ -32,6 +32,8 @@ public sealed class SlotDefinition
[DataField("displayName", required: true)] public string DisplayName { get; } = string.Empty;
[DataField("stripHidden")] public bool StripHidden { get; }
/// <summary>
/// Offset for the clothing sprites.
/// </summary>

View File

@@ -13,4 +13,5 @@ strip-verb-get-data-text = Strip
## UI
strippable-bound-user-interface-stripping-menu-title = {$ownerName}'s inventory
strippable-bound-user-interface-stripping-menu-handcuffs-button = Restraints
strippable-bound-user-interface-stripping-menu-handcuffs-button = Restraints
strippable-bound-user-interface-stripping-menu-obfuscate = Occupied

View File

@@ -68,6 +68,7 @@
uiWindowPos: 0,3
dependsOn: jumpsuit
displayName: Pocket 1
stripHidden: true
- name: pocket2
slotTexture: pocket
slotFlags: POCKET
@@ -76,6 +77,7 @@
uiWindowPos: 2,3
dependsOn: jumpsuit
displayName: Pocket 2
stripHidden: true
- name: suitstorage
slotTexture: suit_storage
slotFlags: SUITSTORAGE