Felinid Thievery (#1102)

* Strip UI can now check for Thieving Component to see hidden items

* Admin Observers can now see hidden items in strip menu

* Felinid pickpocketing buffs

* Revert "Felinid pickpocketing buffs"

This reverts commit cfc6d80719.

* Revert "Admin Observers can now see hidden items in strip menu"

This reverts commit 496188729f.

* Removed mysterious line of code

* Response to review

* Removed more stuff unrelated to topic

* Responded to review regarding syntax

* Added IgnoreStripHidden to Felinids and Admin Observers

* Reimplement strip time multiplier with correct syntax

* Added strip time multiplier to Felinid and Admin Observer
This commit is contained in:
WarMechanic 2024-05-09 14:40:30 +10:00 committed by GitHub
parent 8a150202bd
commit 9b763f3758
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 23 additions and 2 deletions

View File

@ -19,6 +19,7 @@ using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.Player;
using Robust.Shared.Input;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
@ -31,6 +32,7 @@ namespace Content.Client.Inventory
public sealed class StrippableBoundUserInterface : BoundUserInterface
{
[Dependency] private readonly IUserInterfaceManager _ui = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;
private readonly ExamineSystem _examine;
private readonly InventorySystem _inv;
private readonly SharedCuffableSystem _cuffable;
@ -198,7 +200,7 @@ namespace Content.Client.Inventory
var entity = container.ContainedEntity;
// If this is a full pocket, obscure the real entity
if (entity != null && slotDef.StripHidden)
if (entity != null && slotDef.StripHidden && !(EntMan.TryGetComponent<ThievingComponent>(_playerManager.LocalEntity, out var thiefcomponent) && thiefcomponent.IgnoreStripHidden))
entity = _virtualHiddenEntity;
var button = new SlotButton(new SlotData(slotDef, container));

View File

@ -19,4 +19,16 @@ public sealed partial class ThievingComponent : Component
[ViewVariables(VVAccess.ReadWrite)]
[DataField("stealthy")]
public bool Stealthy;
/// <summary>
/// Should the user be able to see hidden items? (i.e pockets)
/// </summary>
[DataField]
public bool IgnoreStripHidden; //DeltaV
/// <summary>
/// A multiplier coefficient for strip time
/// </summary>
[DataField]
public float StripTimeMultiplier = 1f; //DeltaV
}

View File

@ -19,5 +19,6 @@ public sealed class ThievingSystem : EntitySystem
{
args.Stealth |= component.Stealthy;
args.Additive -= component.StripTimeReduction;
args.Multiplier *= component.StripTimeMultiplier;
}
}

View File

@ -83,8 +83,9 @@
range: 500
- type: StationLimitedNetwork
- type: Thieving
stripTimeReduction: 9999
stripTimeMultiplier: 0
stealthy: true
ignoreStripHidden: true
- type: Stripping
- type: SolutionScanner
- type: IgnoreUIRange

View File

@ -64,6 +64,11 @@
Unsexed: MaleFelinid
- type: Felinid
- type: NoShoesSilentFootsteps
- type: Thieving
ignoreStripHidden: true
stealthy: false
stripTimeReduction: 0
stripTimeMultiplier: 0.667
- type: entity
save: false