Skip to content

Commit 0040af3

Browse files
Hides the terminator tracker from stripping UI (#4008)
<!-- IT'S NOT WIZDENS REPO, IF YOU WANT TO ADD YOUR CHANGES ON ALL SERVERS, CREATE PR TO WIZDENS REPO --> ## Short description fixes somthing thats probaly an oversight from the orginal terminator addition ## Why we need to add this makes it nigh impossible to metagame terminators ## Media (Video/Screenshots) <img width="233" height="514" alt="image" src="https://github.com/user-attachments/assets/9611e861-876f-4135-88f6-a9e0b97047d7" /> ## 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: Scarlet lightweaver - tweak: Changed the terminators tracking beacon to be entirely hidden from others in the stripping UI.
1 parent f89e4af commit 0040af3

4 files changed

Lines changed: 31 additions & 0 deletions

File tree

Content.Client/Inventory/StrippableBoundUserInterface.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@ private void AddInventoryButton(EntityUid invUid, string slotId, InventoryCompon
231231
if (!_inv.TryGetSlotContainer(invUid, slotId, out var container, out var slotDef, inv))
232232
return;
233233

234+
// Starlight start
235+
if (slotDef.HideFromStrip && _player.LocalEntity != invUid)
236+
return;
237+
// Starlight end
238+
234239
var entity = container.ContainedEntity;
235240

236241
// If this is a full pocket, obscure the real entity

Content.Shared/Inventory/InventoryTemplatePrototype.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ public sealed partial class SlotDefinition
4646
/// </summary>
4747
[DataField("stripHidden")] public bool StripHidden { get; private set; }
4848

49+
// Starlight start
50+
/// <summary>
51+
/// Whether or not this slot is completely hidden from the strip menu for other players.
52+
/// </summary>
53+
[DataField("hideFromStrip")] public bool HideFromStrip { get; private set; }
54+
// Starlight end
55+
4956
/// <summary>
5057
/// Offset for the clothing sprites.
5158
/// </summary>

Content.Shared/Strip/SharedStrippableSystem.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,15 @@ private bool CanStripInsertInventory(
257257
return false;
258258
}
259259

260+
// Starlight start: server-side HideFromStrip enforcement
261+
if (_inventorySystem.TryGetSlot(target, slot, out var insertSlotDef) &&
262+
insertSlotDef.HideFromStrip &&
263+
user.Owner != target)
264+
{
265+
return false;
266+
}
267+
// Starlight end
268+
260269
var targetIdentity = Identity.Entity(target, EntityManager);
261270

262271
if (_inventorySystem.TryGetSlotEntity(target, slot, out _))
@@ -367,6 +376,15 @@ private bool CanStripRemoveInventory(
367376
EntityUid item,
368377
string slot)
369378
{
379+
// Starlight start: server-side HideFromStrip enforcement
380+
if (_inventorySystem.TryGetSlot(target, slot, out var removeSlotDef) &&
381+
removeSlotDef.HideFromStrip &&
382+
user != target)
383+
{
384+
return false;
385+
}
386+
// Starlight end
387+
370388
if (!_inventorySystem.TryGetSlotEntity(target, slot, out var slotItem))
371389
{
372390
_popupSystem.PopupCursor(Loc.GetString("strippable-component-item-slot-free-message", ("owner", Identity.Entity(target, EntityManager))));

Resources/Prototypes/_Starlight/InventoryTemplates/terminator_inventory_template.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
uiWindowPos: 0,4
9898
strippingWindowPos: 0,3
9999
displayName: Pocket 3
100+
hideFromStrip: true
100101
- name: suitstorage
101102
slotTexture: suit_storage
102103
slotFlags: SUITSTORAGE

0 commit comments

Comments
 (0)