| 1234567891011121314151617181920212223242526272829 |
- using Robust.Shared.Prototypes;
- using Robust.Shared.Serialization;
- using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
- namespace Content.Shared.Damage.Prototypes
- {
- /// <summary>
- /// A Group of <see cref="DamageTypePrototype"/>s.
- /// </summary>
- /// <remarks>
- /// These groups can be used to specify supported damage types of a <see cref="DamageContainerPrototype"/>, or
- /// to change/get/set damage in a <see cref="DamageableComponent"/>.
- /// </remarks>
- [Prototype(2)]
- [Serializable, NetSerializable]
- public sealed partial class DamageGroupPrototype : IPrototype
- {
- [IdDataField] public string ID { get; private set; } = default!;
- [DataField(required: true)]
- private LocId Name { get; set; }
- [ViewVariables(VVAccess.ReadOnly)]
- public string LocalizedName => Loc.GetString(Name);
- [DataField("damageTypes", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer<DamageTypePrototype>))]
- public List<string> DamageTypes { get; private set; } = default!;
- }
- }
|