]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add origin member to class (#41250)
authorConnor Huffine <chuffine@gmail.com>
Wed, 7 Jan 2026 22:31:13 +0000 (17:31 -0500)
committerGitHub <noreply@github.com>
Wed, 7 Jan 2026 22:31:13 +0000 (22:31 +0000)
* 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>
Content.Shared/Damage/Systems/DamageableSystem.Events.cs

index 3e985ba2042a7962696d79f8f0cb68960be5d770..32c67fd0c2c1d823a156df067c67cb721438a44d 100644 (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