using Content.Server.Explosion.EntitySystems; using Content.Shared.Explosion; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; namespace Content.Server.Explosion.Components; /// /// Component that provides entities with explosion resistance. /// /// /// This is desirable over just using damage modifier sets, given that equipment like bomb-suits need to /// significantly reduce the damage, but shouldn't be silly overpowered in regular combat. /// [RegisterComponent] [Access(typeof(ExplosionSystem))] public sealed partial class ExplosionResistanceComponent : Component { /// /// The explosive resistance coefficient, This fraction is multiplied into the total resistance. /// [DataField("damageCoefficient")] public float DamageCoefficient = 1; /// /// Modifiers specific to each explosion type for more customizability. /// [ViewVariables(VVAccess.ReadWrite)] [DataField("modifiers", customTypeSerializer: typeof(PrototypeIdDictionarySerializer))] public Dictionary Modifiers = new(); }