CatStation/Content.Shared/Damage/DamageModifierSet.cs
deltanedas cf7fde3d62
Big prototype and datafield cleanup (#45202)
* giant protoid cleanup

* yml changes

* !

---------

Co-authored-by: deltanedas <@deltanedas:goida.zip>
2026-08-12 02:07:22 +00:00

28 lines
1.1 KiB
C#

using Content.Shared.Damage.Components;
using Content.Shared.Damage.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Prototypes;
namespace Content.Shared.Damage
{
/// <summary>
/// A set of coefficients or flat modifiers to damage types. Can be applied to <see cref="DamageSpecifier"/> using <see
/// cref="DamageSpecifier.ApplyModifierSet(DamageSpecifier, DamageModifierSet)"/>. This can be done several times as the
/// <see cref="DamageSpecifier"/> is passed to it's final target. By default the receiving <see cref="DamageableComponent"/>, will
/// also apply it's own <see cref="DamageModifierSet"/>.
/// </summary>
/// <remarks>
/// The modifier will only ever be applied to damage that is being dealt. Healing is unmodified.
/// </remarks>
[DataDefinition]
[Serializable, NetSerializable]
[Virtual]
public partial class DamageModifierSet
{
[DataField]
public Dictionary<ProtoId<DamageTypePrototype>, float> Coefficients = new();
[DataField]
public Dictionary<ProtoId<DamageTypePrototype>, float> FlatReductions = new();
}
}