示例#1
0
        public override void Load(TagCompound tag)
        {
            var downed = tag.GetList <string>("downed");

            downedAbomination  = downed.Contains("abomination");
            downedPuritySpirit = downed.Contains("puritySpirit");
            ExampleTravelingMerchant.Load(tag.GetCompound("traveler"));
        }
示例#2
0
        public override TagCompound Save()
        {
            var downed = new List <string>();

            if (downedAbomination)
            {
                downed.Add("abomination");
            }

            if (downedPuritySpirit)
            {
                downed.Add("puritySpirit");
            }

            return(new TagCompound {
                ["downed"] = downed,
                ["traveler"] = ExampleTravelingMerchant.Save()
            });
        }
示例#3
0
 public override void PreUpdate()
 {
     // Update everything about spawning the traveling merchant from the methods we have in the Traveling Merchant's class
     ExampleTravelingMerchant.UpdateTravelingMerchant();
 }