| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using UnityEngine;
- using GadgetCore.API;
- using GadgetCore.Util;
- using GadgetCore.API.ConfigMenu;
- namespace MonsterNests
- {
- [Gadget("MonsterNests")]
- public class MonsterNests : Gadget<MonsterNests>
- {
- public const string MOD_VERSION = "1.0"; // Set this to the version of your mod.
- public const string CONFIG_VERSION = "1.0"; // Increment this whenever you change your mod's config file.
- protected override void LoadConfig()
- {
- Config.Load();
- string fileVersion = Config.ReadString("ConfigVersion", CONFIG_VERSION, comments: "The Config Version (not to be confused with mod version)");
- if (fileVersion != CONFIG_VERSION)
- {
- Config.Reset();
- Config.WriteString("ConfigVersion", CONFIG_VERSION, comments: "The Config Version (not to be confused with mod version)");
- }
- Config.Reset();
- Config.Save();
- }
- public override IGadgetConfigMenu GetConfigMenu() { return null; }
- public override string GetModDescription()
- {
- return "A mod that adds some monster nests.";
- }
- protected override void Initialize()
- {
- Logger.Log("Monster Nests v" + Info.Mod.Version);
- Core.logger = Logger;
- Texture2D textureBugspotBig = GadgetCoreAPI.LoadTexture2D("bugspotBig.png");
- Texture2D textureSpiderEgg = GadgetCoreAPI.LoadTexture2D("spiderEgg.png");
- Texture2D textureGoldenShroom = GadgetCoreAPI.LoadTexture2D("goldenShroom.png");
- Core.objectBugspotBig = new ObjectInfo(ObjectType.BUGSPOT, new Item(31, 1, 0, 0, 0, new int[3], new int[3]), 22, textureBugspotBig).Register("bugspotBig");
- Core.objectSpiderEgg = new ObjectInfo(ObjectType.ORE, new Item(3, 1, 0, 0, 0, new int[3], new int[3]), 22, textureSpiderEgg).Register("spiderEgg");
- Core.objectGoldenShroom = new ObjectInfo(ObjectType.PLANT, new Item(12, 1, 0, 0, 0, new int[3], new int[3]), 22, textureGoldenShroom).Register("goldenShroom");
- }
- }
- }
|