예제 #1
0
        public static void RegisterAnimals(IModHelper helper, IMonitor monitor)
        {
            IMoreAnimals api;

            Assert.ApiExists(helper, "Entoarox.MoreAnimals", out api);
            foreach (var entry in Content.LoadData <string, string>(Content.DataFarmAnimalsContentPath))
            {
                bool hasBaby;
                bool canShear;
                RegisterAnimalType(api, entry, out hasBaby, out canShear);
                monitor.Log(string.Format("Registered {0} (hasBaby:{1}, canShear:{2}) with {3}", (object)entry.Key,
                                          (object)hasBaby, (object)canShear, (object)"Entoarox.MoreAnimals"));
            }
        }
 private static void AssertApiIsReady(IModHelper helper, out IJsonAssets api)
 {
     Assert.ApiExists(helper, "spacechase0.JsonAssets", out api);
     Assert.SaveLoaded();
 }