Merge remote-tracking branch 'upstream/stable' into ed-08-09-2025-upstream-sync
# Conflicts: # .github/CODEOWNERS # Content.IntegrationTests/Tests/CargoTest.cs # Content.Server/Chat/Systems/ChatSystem.cs # Content.Shared/Chat/SharedChatSystem.cs # Content.Shared/Lock/LockSystem.cs # Content.Shared/StatusEffectNew/StatusEffectSystem.Relay.cs # Content.Shared/Storage/Components/EntityStorageComponent.cs # Resources/Prototypes/Entities/Mobs/Customization/Markings/human_hair.yml # Resources/Prototypes/game_presets.yml
This commit is contained in:
@@ -27,6 +27,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;
|
||||
@@ -66,6 +67,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);
|
||||
@@ -123,7 +126,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))
|
||||
{
|
||||
@@ -139,7 +142,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))
|
||||
{
|
||||
@@ -150,7 +153,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))
|
||||
{
|
||||
@@ -162,7 +165,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))
|
||||
{
|
||||
@@ -185,9 +188,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