Add origin member to class (#41250)

* Add origin member to class

* whitespace

* Add comments

Added some doc polish while I was here.

* Update comments

Clarification and accuracy

* Apply suggestions from code review

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
Connor Huffine
2026-01-07 17:31:13 -05:00
committed by GitHub
parent 3633cdb537
commit a9b953cdfe

View File

@@ -219,11 +219,27 @@ public record struct BeforeDamageChangedEvent(DamageSpecifier Damage, EntityUid?
public sealed class DamageModifyEvent(DamageSpecifier damage, EntityUid? origin = null)
: EntityEventArgs, IInventoryRelayEvent
{
// Whenever locational damage is a thing, this should just check only that bit of armour.
/// <inheritdoc/>
/// <remarks>
/// Whenever locational damage is a thing, this should just check only that bit of armor.
/// </remarks>
public SlotFlags TargetSlots => ~SlotFlags.POCKET;
/// <summary>
/// Contains the original damage, prior to any modifers.
/// </summary>
public readonly DamageSpecifier OriginalDamage = damage;
/// <summary>
/// Contains the damage after modifiers have been applied.
/// This is the damage that will be inflicted.
/// </summary>
public DamageSpecifier Damage = damage;
/// <summary>
/// Contains the entity which caused the damage, if any was responsible.
/// </summary>
public readonly EntityUid? Origin = origin;
}
public sealed class DamageChangedEvent : EntityEventArgs