WorldPlatforms.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using UnityEngine;
  2. using GadgetCore.API;
  3. namespace WorldPlatforms
  4. {
  5. [Gadget("WorldPlatforms")]
  6. public class WorldPlatforms : Gadget<WorldPlatforms>
  7. {
  8. public const string MOD_VERSION = "1.0"; // Set this to the version of your mod.
  9. public const string CONFIG_VERSION = "1.0"; // Increment this whenever you change your mod's config file.
  10. protected override void LoadConfig()
  11. {
  12. Config.Load();
  13. string fileVersion = Config.ReadString("ConfigVersion", CONFIG_VERSION, comments: "The Config Version (not to be confused with mod version)");
  14. if (fileVersion != CONFIG_VERSION)
  15. {
  16. Config.Reset();
  17. Config.WriteString("ConfigVersion", CONFIG_VERSION, comments: "The Config Version (not to be confused with mod version)");
  18. }
  19. Config.Save();
  20. }
  21. public override string GetModDescription()
  22. {
  23. return "A mod that adds some more WorldPlatforms.";
  24. }
  25. protected override void Initialize()
  26. {
  27. Logger.Log("More WorldPlatforms v" + Info.Mod.Version);
  28. Core.logger = Logger;
  29. }
  30. }
  31. }