public override void Hurt(bool pvp, bool quiet, double damage, int hitDirection, bool crit) { if (!pvp) { attemptedMedal = default; } }
public void ProbeMedal(string name) { var medal = new Medal(name, Difficulty, attemptedMedal.order); if (attemptedMedal.Equals(medal) && !medals.Any(n => n.name == medal.name && n.difficulty >= medal.difficulty)) { medals.RemoveAll(n => n.name == medal.name && n.difficulty < medal.difficulty); medals.Add(medal); medals.Sort((a, b) => a.order > b.order ? 1 : 0); attemptedMedal = default; Main.NewText("Medal earned!", new Color(255, 255, 100)); } }
public override void Load(TagCompound tag) { medals.Clear(); var list = new List <Medal>(); var list2 = tag.GetList <TagCompound>("medals"); foreach (TagCompound c in list2) { list.Add(Medal.Deserialize(c)); } medals = list; }
public void QualifyForMedal(string name, float order) { var medal = new Medal(name, Difficulty, order); QualifyForMedal(medal); }
public void QualifyForMedal(Medal medal) { attemptedMedal = medal; }