Example #1
0
 public override void Hurt(bool pvp, bool quiet, double damage, int hitDirection, bool crit)
 {
     if (!pvp)
     {
         attemptedMedal = default;
     }
 }
Example #2
0
        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));
            }
        }
Example #3
0
        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;
        }
Example #4
0
        public void QualifyForMedal(string name, float order)
        {
            var medal = new Medal(name, Difficulty, order);

            QualifyForMedal(medal);
        }
Example #5
0
 public void QualifyForMedal(Medal medal)
 {
     attemptedMedal = medal;
 }