Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Felinid Thievery #1102

Merged
merged 17 commits into from
May 9, 2024
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
4 changes: 3 additions & 1 deletion Content.Client/Inventory/StrippableBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
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;
Expand All @@ -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;
Expand Down Expand Up @@ -198,7 +200,7 @@ private void AddInventoryButton(EntityUid invUid, string slotId, InventoryCompon
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));
Expand Down
12 changes: 12 additions & 0 deletions Content.Shared/Strip/Components/ThievingComponent.cs
WarMechanic marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
1 change: 1 addition & 0 deletions Content.Shared/Strip/ThievingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ private void OnBeforeStrip(EntityUid uid, ThievingComponent component, BeforeStr
{
args.Stealth |= component.Stealthy;
args.Additive -= component.StripTimeReduction;
args.Multiplier *= component.StripTimeMultiplier;
}
}
3 changes: 2 additions & 1 deletion Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@
range: 500
- type: StationLimitedNetwork
- type: Thieving
stripTimeReduction: 9999
stripTimeMultiplier: 0
stealthy: true
ignoreStripHidden: true
- type: Stripping
- type: SolutionScanner
- type: IgnoreUIRange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading