Merge remote-tracking branch 'upstream/stable' into ed-upstream-sync

# Conflicts:
#	Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs
This commit is contained in:
Ed
2025-04-15 00:44:29 +03:00
463 changed files with 17534 additions and 10124 deletions

View File

@@ -74,6 +74,8 @@ public partial class InventorySystem
SubscribeLocalEvent<InventoryComponent, RefreshEquipmentHudEvent<ShowCriminalRecordIconsComponent>>(RefRelayInventoryEvent);
SubscribeLocalEvent<InventoryComponent, GetVerbsEvent<EquipmentVerb>>(OnGetEquipmentVerbs);
SubscribeLocalEvent<InventoryComponent, GetVerbsEvent<InnateVerb>>(OnGetInnateVerbs);
}
protected void RefRelayInventoryEvent<T>(EntityUid uid, InventoryComponent component, ref T args) where T : IInventoryRelayEvent
@@ -128,6 +130,17 @@ 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 enumerator = new InventorySlotEnumerator(component, SlotFlags.WITHOUT_POCKET);
while (enumerator.NextItem(out var item))
{
RaiseLocalEvent(item, ev);
}
}
}
/// <summary>