mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-04 05:17:28 +00:00
Prevent shoe buffs while crawling (#39648)
Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
This commit is contained in:
committed by
Vanessa
co-authored by
Princess Cheeseballs
parent
f998ea7160
commit
96f9e1fe2d
@@ -25,6 +25,7 @@ using Content.Shared.Overlays;
|
||||
using Content.Shared.Projectiles;
|
||||
using Content.Shared.Radio;
|
||||
using Content.Shared.Slippery;
|
||||
using Content.Shared.Standing;
|
||||
using Content.Shared.Strip.Components;
|
||||
using Content.Shared.Temperature;
|
||||
using Content.Shared.Verbs;
|
||||
@@ -58,6 +59,8 @@ public partial class InventorySystem
|
||||
SubscribeLocalEvent<InventoryComponent, IsUnequippingTargetAttemptEvent>(RelayInventoryEvent);
|
||||
SubscribeLocalEvent<InventoryComponent, ChameleonControllerOutfitSelectedEvent>(RelayInventoryEvent);
|
||||
SubscribeLocalEvent<InventoryComponent, BeforeEmoteEvent>(RelayInventoryEvent);
|
||||
SubscribeLocalEvent<InventoryComponent, StoodEvent>(RelayInventoryEvent);
|
||||
SubscribeLocalEvent<InventoryComponent, DownedEvent>(RelayInventoryEvent);
|
||||
|
||||
// by-ref events
|
||||
SubscribeLocalEvent<InventoryComponent, RefreshFrictionModifiersEvent>(RefRelayInventoryEvent);
|
||||
@@ -116,7 +119,7 @@ public partial class InventorySystem
|
||||
return;
|
||||
|
||||
// this copies the by-ref event if it is a struct
|
||||
var ev = new InventoryRelayedEvent<T>(args);
|
||||
var ev = new InventoryRelayedEvent<T>(args, inventory.Owner);
|
||||
var enumerator = new InventorySlotEnumerator(inventory, args.TargetSlots);
|
||||
while (enumerator.NextItem(out var item))
|
||||
{
|
||||
@@ -132,7 +135,7 @@ public partial class InventorySystem
|
||||
if (args.TargetSlots == SlotFlags.NONE)
|
||||
return;
|
||||
|
||||
var ev = new InventoryRelayedEvent<T>(args);
|
||||
var ev = new InventoryRelayedEvent<T>(args, inventory.Owner);
|
||||
var enumerator = new InventorySlotEnumerator(inventory, args.TargetSlots);
|
||||
while (enumerator.NextItem(out var item))
|
||||
{
|
||||
@@ -143,7 +146,7 @@ public partial class InventorySystem
|
||||
private void OnGetEquipmentVerbs(EntityUid uid, InventoryComponent component, GetVerbsEvent<EquipmentVerb> args)
|
||||
{
|
||||
// Automatically relay stripping related verbs to all equipped clothing.
|
||||
var ev = new InventoryRelayedEvent<GetVerbsEvent<EquipmentVerb>>(args);
|
||||
var ev = new InventoryRelayedEvent<GetVerbsEvent<EquipmentVerb>>(args, uid);
|
||||
var enumerator = new InventorySlotEnumerator(component);
|
||||
while (enumerator.NextItem(out var item, out var slotDef))
|
||||
{
|
||||
@@ -155,7 +158,7 @@ public partial class InventorySystem
|
||||
private void OnGetInnateVerbs(EntityUid uid, InventoryComponent component, GetVerbsEvent<InnateVerb> args)
|
||||
{
|
||||
// Automatically relay stripping related verbs to all equipped clothing.
|
||||
var ev = new InventoryRelayedEvent<GetVerbsEvent<InnateVerb>>(args);
|
||||
var ev = new InventoryRelayedEvent<GetVerbsEvent<InnateVerb>>(args, uid);
|
||||
var enumerator = new InventorySlotEnumerator(component, SlotFlags.WITHOUT_POCKET);
|
||||
while (enumerator.NextItem(out var item))
|
||||
{
|
||||
@@ -178,9 +181,12 @@ public sealed class InventoryRelayedEvent<TEvent> : EntityEventArgs
|
||||
{
|
||||
public TEvent Args;
|
||||
|
||||
public InventoryRelayedEvent(TEvent args)
|
||||
public EntityUid Owner;
|
||||
|
||||
public InventoryRelayedEvent(TEvent args, EntityUid owner)
|
||||
{
|
||||
Args = args;
|
||||
Owner = owner;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user