| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- using UnityEngine;
- using GadgetCore.API;
- using GadgetCore.API.ConfigMenu;
- using UnityEngine.SceneManagement;
- namespace StorageExpansion
- {
- [Gadget("StorageExpansion", RequiredOnClients: false, LoadBefore: new string[] { "QuickStack" })]
- public class StorageExpansion : Gadget<StorageExpansion>
- {
- public const string MOD_VERSION = "1.2"; // 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)");
- }
- Core.settingSizeEnum = Config.ReadEnum("StorageSize", StorageSizeEnum.Large, requiresRestart: true, comments: new string[] { });
- Config.Save();
- }
- public override string GetModDescription()
- {
- return "Increases the available storage space.";
- }
- protected override void Initialize()
- {
- Logger.Log("Storage Expansion v" + Info.Mod.Version);
- Core.logger = Logger;
- }
- }
- }
|