using System.Linq;
using Content.Shared.Disease;
namespace Content.Server.Disease.Components
{
[RegisterComponent]
///
/// Allows the enity to be infected with diseases.
/// Please use only on mobs.
///
public sealed class DiseaseCarrierComponent : Component
{
///
/// Shows the CURRENT diseases on the carrier
///
[ViewVariables(VVAccess.ReadWrite)]
public List Diseases = new();
///
/// The carrier's resistance to disease
///
[DataField("diseaseResist")]
[ViewVariables(VVAccess.ReadWrite)]
public float DiseaseResist = 0f;
///
/// Diseases the carrier has had, used for immunity.
///
[ViewVariables(VVAccess.ReadWrite)]
public List PastDiseases = new();
///
/// All the diseases the carrier has or has had.
/// Checked against when trying to add a disease
///
[ViewVariables(VVAccess.ReadWrite)]
public List AllDiseases => PastDiseases.Concat(Diseases).ToList();
}
}