mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-04 05:17:28 +00:00
Cleanup and small update to the stethoscope! (#36210)
* First commit * Address most of the review!
This commit is contained in:
committed by
deltanedas
parent
0fdb024752
commit
fb8a2426b2
@@ -68,6 +68,8 @@ public partial class InventorySystem
|
||||
SubscribeLocalEvent<InventoryComponent, RefreshEquipmentHudEvent<Content.Shared._DV.Overlays.ShowTriageIconsComponent>>(RefRelayInventoryEvent); // DeltaV - Medical Records
|
||||
|
||||
SubscribeLocalEvent<InventoryComponent, GetVerbsEvent<EquipmentVerb>>(OnGetEquipmentVerbs);
|
||||
SubscribeLocalEvent<InventoryComponent, GetVerbsEvent<InnateVerb>>(OnGetInnateVerbs);
|
||||
|
||||
}
|
||||
|
||||
protected void RefRelayInventoryEvent<T>(EntityUid uid, InventoryComponent component, ref T args) where T : IInventoryRelayEvent
|
||||
@@ -122,6 +124,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>
|
||||
|
||||
Reference in New Issue
Block a user