Create a Armor CoeffientQuery (#35024)
* Create a Armor CoeffientQuery - add Armor Coefficent Query Event for InventoryRelay system * CR - cleanup, comments and fix typos * CR - Remove Whitespace * typos * on't --------- Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Inventory;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
@@ -30,3 +31,24 @@ public sealed partial class ArmorComponent : Component
|
||||
/// <param name="Msg"></param>
|
||||
[ByRefEvent]
|
||||
public record struct ArmorExamineEvent(FormattedMessage Msg);
|
||||
|
||||
/// <summary>
|
||||
/// A Relayed inventory event, gets the total Armor for all Inventory slots defined by the Slotflags in TargetSlots
|
||||
/// </summary>
|
||||
public sealed class CoefficientQueryEvent : EntityEventArgs, IInventoryRelayEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// All slots to relay to
|
||||
/// </summary>
|
||||
public SlotFlags TargetSlots { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Total of all Coefficients.
|
||||
/// </summary>
|
||||
public DamageModifierSet DamageModifiers { get; set; } = new DamageModifierSet();
|
||||
|
||||
public CoefficientQueryEvent(SlotFlags slots)
|
||||
{
|
||||
TargetSlots = slots;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user