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]
[Friend(typeof(ExplosionSystem))]
public sealed class ExplosionResistanceComponent : Component
{
///
/// The resistance values for this component, This fraction is added to the total resistance.
///
[DataField("resistance")]
public float GlobalResistance = 0;
///
/// Like , but specified specific to each explosion type for more customizability.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("resistances", customTypeSerializer: typeof(PrototypeIdDictionarySerializer))]
public Dictionary Resistances = new();
}