Zariteis vor 4 Jahren
Commit
8cd0babe40
41 geänderte Dateien mit 1465 neuen und 0 gelöschten Zeilen
  1. 512 0
      .gitignore
  2. BIN
      Assets/bStorageLockedSmall.png
  3. BIN
      Assets/menuStorage2x1x2.png
  4. BIN
      Assets/menuStorage3x3x3.png
  5. BIN
      Assets/menuStorage6x5x27.png
  6. BIN
      Assets/menuStorage6x7x14.png
  7. BIN
      Assets/menuStorage6x7x14vert.png
  8. BIN
      Assets/menuStorage6x8x14.png
  9. BIN
      Assets/menuStorage6x8x14vert.png
  10. BIN
      Assets/menuStorage6x8x28.png
  11. BIN
      Assets/menuStorage6x8x70.png
  12. BIN
      Assets/menuStorageButtonBig.png
  13. BIN
      Assets/menuStorageButtonBig2.png
  14. BIN
      Assets/menustorage6x5x27
  15. BIN
      Assets/menustorage6x7x14
  16. BIN
      Assets/menustorage6x8x14
  17. BIN
      Assets/menustorage6x8x28
  18. BIN
      Assets/menustorage6x8x70
  19. BIN
      Assets/storageSelectSmall.png
  20. 21 0
      Core.cs
  21. 3 0
      Manifest.ini
  22. 1 0
      ModInfo.txt
  23. 172 0
      Patches/Patch_GameScript_InitializeStorage.cs
  24. 31 0
      Patches/Patch_GameScript_LoadGame.cs
  25. 61 0
      Patches/Patch_GameScript_MultiPachSlots.cs
  26. 51 0
      Patches/Patch_GameScript_RefreshSlotStorage.cs
  27. 31 0
      Patches/Patch_GameScript_SaveGame.cs
  28. 18 0
      Patches/Patch_GameScript_SelectPage.cs
  29. 30 0
      Patches/Patch_GameScript_ShiftClickStorage.cs
  30. 43 0
      Patches/Patch_GameScript_Storage.cs
  31. 41 0
      Patches/Patch_GameScript_Update.cs
  32. 57 0
      Patches/Patch_GameScript_UpgradeStorage.cs
  33. 41 0
      Patches/RePatch_GameScript_RefreshStoragePage.cs
  34. 57 0
      Patches/RePatch_GameScript_Update.cs
  35. 34 0
      PositionSet.cs
  36. 10 0
      Properties/AssemblyInfo.cs
  37. 8 0
      Properties/launchSettings.json
  38. 49 0
      StorageExpansion.cs
  39. 164 0
      StorageExpansion.csproj
  40. 22 0
      StorageExpansion.sln
  41. 8 0
      StorageSizeEnum.cs

+ 512 - 0
.gitignore

@@ -0,0 +1,512 @@
+### Csharp ###
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+# User-specific files
+*.rsuser
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Mono auto generated files
+mono_crash.*
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+[Ll]ogs/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUnit
+*.VisualState.xml
+TestResult.xml
+nunit-*.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_h.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*_wpftmp.csproj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Coverlet is a free, cross platform Code Coverage Tool
+coverage*[.json, .xml, .info]
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# NuGet Symbol Packages
+*.snupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!?*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+# Ionide (cross platform F# VS Code tools) working folder
+.ionide/
+
+### vs ###
+
+# User-specific files
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+
+# Mono auto generated files
+
+# Build results
+
+# Visual Studio 2015/2017 cache/options directory
+# Uncomment if you have tasks that create the project's static files in wwwroot
+
+# Visual Studio 2017 auto generated files
+
+# MSTest test Results
+
+# NUnit
+
+# Build Results of an ATL Project
+
+# Benchmark Results
+
+# .NET Core
+
+# StyleCop
+
+# Files built by Visual Studio
+
+# Chutzpah Test files
+
+# Visual C++ cache files
+
+# Visual Studio profiler
+
+# Visual Studio Trace Files
+
+# TFS 2012 Local Workspace
+
+# Guidance Automation Toolkit
+
+# ReSharper is a .NET coding add-in
+
+# TeamCity is a build add-in
+
+# DotCover is a Code Coverage Tool
+
+# AxoCover is a Code Coverage Tool
+
+# Coverlet is a free, cross platform Code Coverage Tool
+
+# Visual Studio code coverage results
+
+# NCrunch
+
+# MightyMoose
+
+# Web workbench (sass)
+
+# Installshield output folder
+
+# DocProject is a documentation generator add-in
+
+# Click-Once directory
+
+# Publish Web Output
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+
+# NuGet Packages
+# NuGet Symbol Packages
+# The packages folder can be ignored because of Package Restore
+# except build/, which is used as an MSBuild target.
+# Uncomment if necessary however generally it will be regenerated when needed
+# NuGet v3's project.json files produces more ignorable files
+
+# Microsoft Azure Build Output
+
+# Microsoft Azure Emulator
+
+# Windows Store app package directories and files
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+# but keep track of directories ending in .cache
+
+# Others
+
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+
+# RIA/Silverlight projects
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+
+# SQL Server files
+
+# Business Intelligence projects
+
+# Microsoft Fakes
+
+# GhostDoc plugin setting file
+
+# Node.js Tools for Visual Studio
+
+# Visual Studio 6 build log
+
+# Visual Studio 6 workspace options file
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+
+# Visual Studio LightSwitch build output
+
+# Paket dependency manager
+
+# FAKE - F# Make
+
+# CodeRush personal settings
+
+# Python Tools for Visual Studio (PTVS)
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+
+# Telerik's JustMock configuration file
+
+# BizTalk build output
+
+# OpenCover UI analysis results
+
+# Azure Stream Analytics local run output
+
+# MSBuild Binary and Structured Log
+
+# NVidia Nsight GPU debugger configuration file
+
+# MFractors (Xamarin productivity tool) working folder
+
+# Local History for Visual Studio
+
+# BeatPulse healthcheck temp database
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+
+# Ionide (cross platform F# VS Code tools) working folder

BIN
Assets/bStorageLockedSmall.png


BIN
Assets/menuStorage2x1x2.png


BIN
Assets/menuStorage3x3x3.png


BIN
Assets/menuStorage6x5x27.png


BIN
Assets/menuStorage6x7x14.png


BIN
Assets/menuStorage6x7x14vert.png


BIN
Assets/menuStorage6x8x14.png


BIN
Assets/menuStorage6x8x14vert.png


BIN
Assets/menuStorage6x8x28.png


BIN
Assets/menuStorage6x8x70.png


BIN
Assets/menuStorageButtonBig.png


BIN
Assets/menuStorageButtonBig2.png


BIN
Assets/menustorage6x5x27


BIN
Assets/menustorage6x7x14


BIN
Assets/menustorage6x8x14


BIN
Assets/menustorage6x8x28


BIN
Assets/menustorage6x8x70


BIN
Assets/storageSelectSmall.png


+ 21 - 0
Core.cs

@@ -0,0 +1,21 @@
+using GadgetCore;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using UnityEngine;
+
+namespace StorageExpansion
+{
+  internal static class Core
+  {
+    public static GadgetLogger logger;
+
+    public static int settingAmountPages = 14;
+    public static int settingAmountSlots = 8 * 6;
+
+    public static string firstPrefabPath = null;
+
+    public static StorageSizeEnum settingSizeEnum = StorageSizeEnum.Large;
+  }
+}

+ 3 - 0
Manifest.ini

@@ -0,0 +1,3 @@
+[Metadata]
+Name=Storage Expansion
+Assembly=StorageExpansion.dll

+ 1 - 0
ModInfo.txt

@@ -0,0 +1 @@
+Increases the available storage space.

+ 172 - 0
Patches/Patch_GameScript_InitializeStorage.cs

@@ -0,0 +1,172 @@
+using GadgetCore.API;
+using HarmonyLib;
+using System;
+using UnityEngine;
+
+namespace StorageExpansion.Patches
+{
+
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("InitializeStorage")]
+  [HarmonyGadget("StorageExpansion")]
+  public static class Patch_GameScript_InitializeStorage
+  {
+    [HarmonyPrefix]
+    public static bool Prefix(GameScript __instance, ref Item[] ___storage, ref GameObject ___storageSelect, ref GameObject[] ___storageButton,
+      ref GameObject ___menuStorage, ref GameObject[] ___storageIcon, ref GameObject[] ___storageIconBack, ref TextMesh[] ___txtQStorage, ref TextMesh[] ___txtStorageCost)
+    {
+      if (Core.firstPrefabPath == null)
+      {
+        Core.firstPrefabPath = GetPrefabname();
+        SetSizes();
+      }
+      var path = Core.firstPrefabPath;
+      try
+      {
+        var asset = GadgetCoreAPI.LoadAssetBundle(path);
+
+        var storageMenuOld = GameObject.Find("Main Camera").transform.Find("menuStorage").gameObject;
+        GameObject.DestroyImmediate(storageMenuOld);
+
+        var storageMenuNew = UnityEngine.Object.Instantiate((GameObject)asset.LoadAsset("assets/resources/menustorage.prefab"));
+        storageMenuNew.SetActive(false);
+        storageMenuNew.name = "menuStorage";
+        storageMenuNew.transform.SetParent(GameObject.Find("Main Camera").transform);
+        storageMenuNew.transform.localPosition = new Vector3(8, 1.5f, 2);
+        storageMenuNew.transform.localScale = new Vector3(16, 16, 1);
+      }
+      catch (System.Exception e) { Core.logger.Log(e.Message); }
+
+      ___storage = new Item[Core.settingAmountPages * Core.settingAmountSlots];
+      for (int i = 0; i < (Core.settingAmountPages * Core.settingAmountSlots); i++)
+      {
+        ___storage[i] = new Item(0, 0, 0, 0, 0, new int[3], new int[3]);
+      }
+
+      ___storageButton = new GameObject[Core.settingAmountPages];
+
+      ___storageIcon = new GameObject[Core.settingAmountSlots];
+      ___storageIconBack = new GameObject[Core.settingAmountSlots];
+      ___txtQStorage = new TextMesh[Core.settingAmountSlots];
+
+      var storageMenu = GameObject.Find("Main Camera").transform.Find("menuStorage").gameObject;
+      ___menuStorage = storageMenu;
+      ___storageSelect = storageMenu.transform.FindChild("-").gameObject;
+
+      ___txtStorageCost[0] = storageMenu.transform.FindChild("bStorageU").GetChild(0).GetComponent<TextMesh>();
+      ___txtStorageCost[1] = storageMenu.transform.FindChild("bStorageU").GetChild(0).GetChild(0).GetComponent<TextMesh>();
+
+      for (int i = 0; i < Core.settingAmountSlots; i++)
+      {
+        ___storageIcon[i] = storageMenu.transform.FindChild("" + i).gameObject;
+        ___txtQStorage[i] = storageMenu.transform.FindChild("" + i).GetChild(0).GetComponent<TextMesh>();
+        ___txtQStorage[i].text = "";
+        ___storageIconBack[i] = storageMenu.transform.FindChild("" + i).GetChild(1).gameObject;
+      }
+      for (int i = 0; i < Core.settingAmountPages; i++)
+      {
+        ___storageButton[i] = storageMenu.transform.FindChild("page" + i).gameObject;
+      }
+      postBuildQuickStackButton();
+      return false;
+    }
+
+    private static void SetSizes()
+    {
+      switch (Core.settingSizeEnum)
+      {
+        //case StorageSizeEnum.UltraSmall:
+        //  Core.settingAmountPages = 2;
+        //  Core.settingAmountSlots = 2;
+        //  break;
+        //case StorageSizeEnum.Smaller:
+        //  Core.settingAmountPages = 3;
+        //  Core.settingAmountSlots = 3 * 3;
+        //  break;
+        case StorageSizeEnum.Large:
+          Core.settingAmountPages = 14;
+          Core.settingAmountSlots = 7 * 6;
+          break;
+        case StorageSizeEnum.Larger:
+          Core.settingAmountPages = 14;
+          Core.settingAmountSlots = 8 * 6;
+          break;
+        case StorageSizeEnum.MegaLarge:
+          Core.settingAmountPages = 28;
+          Core.settingAmountSlots = 8 * 6;
+          break;
+        case StorageSizeEnum.UltraLarge:
+          Core.settingAmountPages = 70;
+          Core.settingAmountSlots = 8 * 6;
+          break;
+        case StorageSizeEnum.PagesOnly:
+          Core.settingAmountPages = 27;
+          Core.settingAmountSlots = 5 * 6;
+          break;
+        default:
+          Core.settingAmountPages = 14;
+          Core.settingAmountSlots = 7 * 6;
+          break;
+      }
+    }
+
+    private static string GetPrefabname()
+    {
+      switch (Core.settingSizeEnum)
+      {
+        //case StorageSizeEnum.UltraSmall:
+        //  return "menustorage2x1x2";
+        //case StorageSizeEnum.Smaller:
+        //  return "menustorage3x3x3";
+        case StorageSizeEnum.Large:
+          return "menustorage6x7x14";
+        case StorageSizeEnum.Larger:
+          return "menustorage6x8x14";
+        case StorageSizeEnum.MegaLarge:
+          return "menustorage6x8x28";
+        case StorageSizeEnum.UltraLarge:
+          return "menustorage6x8x70";
+        case StorageSizeEnum.PagesOnly:
+          return "menustorage6x5x27";
+        default:
+          return "menustorage6x7x14";
+      }
+    }
+
+    private static void postBuildQuickStackButton()
+    {
+      Type t = null;
+      foreach (var a in AppDomain.CurrentDomain.GetAssemblies())
+      {
+        if (a.FullName.StartsWith("QuickStack,"))
+        {
+          t = a.GetType("QuickStack.StackButtonScript");
+          break;
+        }
+      }
+      bool isEnabled = false;
+      foreach (var gadget in GadgetCore.API.Gadgets.ListAllEnabledGadgets())
+        if (gadget.Info?.ModName == "Quick Stack")
+        {
+          isEnabled = true;
+          break;
+        }
+      if (t != null && isEnabled)
+      {
+        var storageMenu = GameObject.Find("Main Camera").transform.Find("menuStorage").gameObject;
+        var pagge0 = storageMenu.transform.Find("page0");
+        var btn = UnityEngine.Object.Instantiate(pagge0, pagge0.transform.parent).gameObject;
+        btn.name = "button_quick_stack";
+
+        Component.Destroy(btn.GetComponentInChildren<ButtonMenu>());
+        btn.AddComponent(t);
+
+        btn.GetComponentInChildren<BoxCollider>().size = new Vector3(2, 2, 2);
+
+        btn.transform.SetParent(storageMenu.transform);
+        btn.transform.localPosition = new Vector3(-0.5075f, 0.3595f, 0);
+        btn.transform.localScale = new Vector3(1f / 16f, 1f / 16f, 1);
+      }
+    }
+  }
+}

+ 31 - 0
Patches/Patch_GameScript_LoadGame.cs

@@ -0,0 +1,31 @@
+using GadgetCore.API;
+using HarmonyLib;
+
+namespace StorageExpansion.Patches
+{
+
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("LoadGame")]
+  [HarmonyGadget("StorageExpansion")]
+  public static class Patch_GameScript_LoadGame
+  {
+    [HarmonyPrefix]
+    public static void Prefix(GameScript __instance, Item[] ___storage)
+		{
+			for (int i = 0; i < Core.settingAmountPages * Core.settingAmountSlots; i++)
+			{
+				___storage[i].id = PreviewLabs.PlayerPrefs.GetInt("storage" + i + "id");
+				___storage[i].q = PreviewLabs.PlayerPrefs.GetInt("storage" + i + "q");
+				___storage[i].exp = PreviewLabs.PlayerPrefs.GetInt("storage" + i + "exp");
+				___storage[i].tier = PreviewLabs.PlayerPrefs.GetInt("storage" + i + "tier");
+				___storage[i].corrupted = PreviewLabs.PlayerPrefs.GetInt("storage" + i + "corrupted");
+				___storage[i].aspect[0] = PreviewLabs.PlayerPrefs.GetInt("storage" + i + "a0");
+				___storage[i].aspect[1] = PreviewLabs.PlayerPrefs.GetInt("storage" + i + "a1");
+				___storage[i].aspect[2] = PreviewLabs.PlayerPrefs.GetInt("storage" + i + "a2");
+				___storage[i].aspectLvl[0] = PreviewLabs.PlayerPrefs.GetInt("storage" + i + "aL0");
+				___storage[i].aspectLvl[1] = PreviewLabs.PlayerPrefs.GetInt("storage" + i + "aL1");
+				___storage[i].aspectLvl[2] = PreviewLabs.PlayerPrefs.GetInt("storage" + i + "aL2");
+			}
+		}
+  }
+}

+ 61 - 0
Patches/Patch_GameScript_MultiPachSlots.cs

@@ -0,0 +1,61 @@
+using GadgetCore.API;
+using GadgetCore.Util;
+using HarmonyLib;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Reflection.Emit;
+using UnityEngine;
+
+namespace StorageExpansion.Patches
+{
+  internal class SlotsPerPageGetter
+  {
+    public static int SlotsPerPage { get => Core.settingAmountSlots; }
+  }
+
+  [HarmonyPatch()]
+  [HarmonyGadget("StorageExpansion")]
+  public static class Patch_GameScript_MultiPachSlots
+  {
+    [HarmonyTargetMethods]
+    static IEnumerable<MethodBase> TargetMethods()
+    {
+      yield return AccessTools.Method(typeof(GameScript), "Update");
+      yield return AccessTools.Method(typeof(GameScript), "PlaceItemStorage");
+      yield return AccessTools.Method(typeof(GameScript), "PlaceOneItemStorage");
+      yield return AccessTools.Method(typeof(GameScript), "SelectItemStorage");
+      //yield return AccessTools.Method(typeof(GameScript), "ShiftClickStorage");
+      //yield return AccessTools.Method(typeof(GameScript), "ShiftClick");
+      yield return AccessTools.Method(typeof(GameScript), "SplitItemStorage");
+      yield return AccessTools.Method(typeof(GameScript), "CombineItemStorage");
+      yield return AccessTools.Method(typeof(GameScript), "SwapItemStorage");
+      //yield return AccessTools.Method(typeof(GameScript), "RefreshSlotStorage");
+      yield return AccessTools.Method(typeof(GameScript), "HoverItemStorage");
+    
+      yield return AccessTools.Method(typeof(GadgetCoreAPI).Assembly.GetType("GadgetCore.Patches.Patch_GameScript_RefreshSlotStorage"), "Prefix");
+      yield return AccessTools.Method(typeof(GadgetCoreAPI).Assembly.GetType("GadgetCore.Patches.Patch_GameScript_RefreshSlotStorage"), "Postfix");
+      yield return AccessTools.Method(typeof(GadgetCoreAPI).Assembly.GetType("GadgetCore.Patches.Patch_GameScript_ShiftClick"), "Prefix");
+      yield return AccessTools.Method(typeof(GadgetCoreAPI).Assembly.GetType("GadgetCore.Patches.Patch_GameScript_HoverItemStorage"), "Prefix");
+      yield return AccessTools.Method(typeof(GadgetCoreAPI).Assembly.GetType("GadgetCore.Patches.Patch_GameScript_CombineItemStorage"), "Prefix");
+      yield return AccessTools.Method(typeof(GadgetCoreAPI).Assembly.GetType("GadgetCore.Patches.Patch_GameScript_PlaceOneItemStorage"), "Prefix");
+      yield return AccessTools.Method(typeof(GadgetCoreAPI).Assembly.GetType("GadgetCore.Patches.Patch_GameScript_SplitItemStorage"), "Prefix");
+      yield return AccessTools.Method(typeof(GadgetCoreAPI).Assembly.GetType("GadgetCore.Patches.Patch_GameScript_ShiftClickStorage"), "Prefix");
+      yield return AccessTools.Method(typeof(GadgetCoreAPI).Assembly.GetType("GadgetCore.Patches.Patch_GameScript_RefreshStoragePage"), "Prefix");
+      //yield return AccessTools.Method("GadgetCore.Patches.Patch_GameScript_RefreshStoragePage:Prefix"); 
+    }
+
+
+    [HarmonyTranspiler]
+    public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator gen)
+    {
+      var p = TranspilerHelper.CreateProcessor(instructions, gen);
+      var ilRefs = p.FindAllRefsByInsn(new CodeInstruction(OpCodes.Ldc_I4_S, 30));
+      MethodInfo getValue = typeof(SlotsPerPageGetter).GetProperty("SlotsPerPage").GetGetMethod();
+      foreach (var ilRef in ilRefs)
+      {
+        p.InjectInsn(ilRef, new CodeInstruction(OpCodes.Call, getValue), false);
+      }
+      return p.Insns;
+    }
+  }
+}

+ 51 - 0
Patches/Patch_GameScript_RefreshSlotStorage.cs

@@ -0,0 +1,51 @@
+using GadgetCore.API;
+using HarmonyLib;
+using System.Collections;
+using System.Reflection;
+using UnityEngine;
+
+namespace StorageExpansion.Patches
+{
+
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("RefreshSlotStorage")]
+  [HarmonyGadget("StorageExpansion")]
+  public static class Patch_GameScript_RefreshSlotStorage
+	{
+    [HarmonyPrefix]
+    public static bool Prefix(GameScript __instance, int i, Item[] ___storage, GameObject[] ___storageIconBack, GameObject[] ___storageIcon,
+			int ___curStoragePage, TextMesh[] ___txtQStorage)
+		{ 
+			int num = i + ___curStoragePage * Core.settingAmountSlots;
+			___storageIcon[i].GetComponent<Renderer>().material = (Material)Resources.Load("i/i" + ___storage[num].id);
+			AnimIcon animIcon = (AnimIcon)___storageIconBack[i].GetComponent("AnimIcon");
+			if (___storage[num].id < 300 || ___storage[num].id >= 2000)
+			{
+				___storageIconBack[i].SetActive(false);
+				animIcon.anim = 0;
+			}
+			else
+			{
+				___storageIconBack[i].GetComponent<Renderer>().material = (Material)Resources.Load("iBack" + ___storage[num].tier);
+				if (___storage[num].tier == 3)
+				{
+					animIcon.anim = 1;
+				}
+				else
+				{
+					animIcon.anim = 0;
+				}
+				___storageIconBack[i].SetActive(true);
+			}
+			if (___storage[num].q > 1)
+			{
+				___txtQStorage[i].text = string.Empty + ___storage[num].q;
+			}
+			else
+			{
+				___txtQStorage[i].text = string.Empty;
+			}
+      return false;
+    }
+  }
+}

+ 31 - 0
Patches/Patch_GameScript_SaveGame.cs

@@ -0,0 +1,31 @@
+using GadgetCore.API;
+using HarmonyLib;
+
+namespace StorageExpansion.Patches
+{
+
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("SaveGame")]
+  [HarmonyGadget("StorageExpansion")]
+  public static class Patch_GameScript_SaveGame
+  {
+    [HarmonyPostfix]
+    public static void Postfix(GameScript __instance, int dood, Item[] ___storage)
+		{
+			for (int i = 0; i < Core.settingAmountPages * Core.settingAmountSlots; i++)
+			{
+				PreviewLabs.PlayerPrefs.SetInt("storage" + i + "id", ___storage[i].id);
+				PreviewLabs.PlayerPrefs.SetInt("storage" + i + "q", ___storage[i].q);
+				PreviewLabs.PlayerPrefs.SetInt("storage" + i + "exp", ___storage[i].exp);
+				PreviewLabs.PlayerPrefs.SetInt("storage" + i + "tier", ___storage[i].tier);
+				PreviewLabs.PlayerPrefs.SetInt("storage" + i + "corrupted", ___storage[i].corrupted);
+				PreviewLabs.PlayerPrefs.SetInt("storage" + i + "a0", ___storage[i].aspect[0]);
+				PreviewLabs.PlayerPrefs.SetInt("storage" + i + "a1", ___storage[i].aspect[1]);
+				PreviewLabs.PlayerPrefs.SetInt("storage" + i + "a2", ___storage[i].aspect[2]);
+				PreviewLabs.PlayerPrefs.SetInt("storage" + i + "aL0", ___storage[i].aspectLvl[0]);
+				PreviewLabs.PlayerPrefs.SetInt("storage" + i + "aL1", ___storage[i].aspectLvl[1]);
+				PreviewLabs.PlayerPrefs.SetInt("storage" + i + "aL2", ___storage[i].aspectLvl[2]);
+			}
+		}
+  }
+}

+ 18 - 0
Patches/Patch_GameScript_SelectPage.cs

@@ -0,0 +1,18 @@
+using GadgetCore.API;
+using HarmonyLib;
+
+namespace StorageExpansion.Patches
+{
+
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("SelectPage")]
+  [HarmonyGadget("StorageExpansion")]
+  public static class Patch_GameScript_SelectPage
+  {
+    [HarmonyPrefix]
+    public static bool Prefix(GameScript __instance, int a, int ___storageLevel, ref int ___curStoragePage)
+    {
+      return true;
+    }
+  }
+}

+ 30 - 0
Patches/Patch_GameScript_ShiftClickStorage.cs

@@ -0,0 +1,30 @@
+using GadgetCore.API;
+using HarmonyLib;
+using System.Collections;
+using System.Reflection;
+using UnityEngine;
+
+namespace StorageExpansion.Patches
+{
+
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("ShiftClickStorage")]
+  [HarmonyGadget("StorageExpansion")]
+  public static class Patch_GameScript_ShiftClickStorage
+  {
+
+    [HarmonyPrefix]
+    public static bool Prefix(GameScript __instance, ref bool ___shiftclicking, int ___curStoragePage, ref IEnumerator __result)
+    {
+      __instance.StartCoroutine(__instance.RefreshStoragePage(___curStoragePage));
+      ___shiftclicking = false;
+      __result = FakeRoutine();
+      return false;
+    }
+
+    public static IEnumerator FakeRoutine()
+    {
+      yield break;
+    }
+  }
+}

+ 43 - 0
Patches/Patch_GameScript_Storage.cs

@@ -0,0 +1,43 @@
+using GadgetCore.API;
+using HarmonyLib;
+using UnityEngine;
+
+namespace StorageExpansion.Patches
+{
+
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("Storage")]
+  [HarmonyGadget("StorageExpansion")]
+  public static class Patch_GameScript_Storage
+  {
+    [HarmonyPostfix]
+    public static void Postfix(GameScript __instance, int ___storageLevel, bool ___enteringCombatMode)
+    {
+      if (!___enteringCombatMode)
+      {
+        for (int i = 0; i < __instance.storageButton.Length; i++)
+        {
+          if (i <= ___storageLevel)
+          {
+            __instance.storageButton[i].GetComponent<Renderer>().enabled = false;
+          }
+          else
+          {
+            __instance.storageButton[i].GetComponent<Renderer>().enabled = true;
+          }
+        }
+        int storageUpgradeCost = __instance.GetStorageUpgradeCost(___storageLevel);
+        if (___storageLevel == __instance.storageButton.Length - 1)
+        {
+          __instance.txtStorageCost[0].text = "Max Lvl";
+          __instance.txtStorageCost[1].text = "Max Lvl";
+        }
+        else
+        {
+          __instance.txtStorageCost[0].text = string.Empty + storageUpgradeCost;
+          __instance.txtStorageCost[1].text = string.Empty + storageUpgradeCost;
+        }
+      }
+    }
+  }
+}

+ 41 - 0
Patches/Patch_GameScript_Update.cs

@@ -0,0 +1,41 @@
+using GadgetCore.API;
+using HarmonyLib;
+using UnityEngine;
+
+namespace StorageExpansion.Patches
+{
+
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("Update")]
+  [HarmonyGadget("StorageExpansion")]
+  public static class Patch_GameScript_Update
+  {
+    [HarmonyPrefix]
+    public static void Prefix(GameScript __instance, ref int ___storageLevel)
+    {
+      if (MenuScript.player)
+      {
+        if (!GameScript.pausing)
+        {
+          if (Input.GetMouseButtonDown(0) && GameScript.inventoryOpen)
+          {
+            var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
+            RaycastHit hit;
+            if (Physics.Raycast(ray, out hit, 7f))
+            {
+              if (hit.transform.gameObject.layer != 16 && hit.transform.gameObject.layer != 17)
+              {
+                string name = hit.transform.gameObject.name;
+                if (name.StartsWith("page"))
+                {
+                  var slot = int.Parse(hit.transform.gameObject.name.Substring("page".Length));
+                  __instance.SelectPage(slot);
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+}

+ 57 - 0
Patches/Patch_GameScript_UpgradeStorage.cs

@@ -0,0 +1,57 @@
+using GadgetCore.API;
+using HarmonyLib;
+using UnityEngine;
+
+namespace StorageExpansion.Patches
+{
+
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("UpgradeStorage")]
+  [HarmonyGadget("StorageExpansion")]
+  public static class Patch_GameScript_UpgradeStorage
+  {
+    [HarmonyPrefix]
+    public static bool Prefix(GameScript __instance, ref int ___storageLevel)
+    {
+			if (___storageLevel < __instance.storageButton.Length)
+			{
+				int storageUpgradeCost = __instance.GetStorageUpgradeCost(___storageLevel);
+				if (__instance.GetCredits() >= storageUpgradeCost)
+				{
+					__instance.RemoveCredits(storageUpgradeCost);
+          ___storageLevel++;
+					PreviewLabs.PlayerPrefs.SetInt("storageLevel", ___storageLevel);
+					__instance.GetComponent<AudioSource>().PlayOneShot((AudioClip)Resources.Load("Au/chesthit2"), Menuu.soundLevel / 10f);
+					Camera.main.GetComponent<Animation>().Play("craft");
+          for (int i = 0; i < __instance.storageButton.Length; i++)
+          {
+            if (i <= ___storageLevel)
+            {
+              __instance.storageButton[i].GetComponent<Renderer>().enabled = false;
+            }
+            else
+            {
+              __instance.storageButton[i].GetComponent<Renderer>().enabled = true;
+            }
+          }
+          int newStorageUpgradeCost = __instance.GetStorageUpgradeCost(___storageLevel);
+          if (___storageLevel == __instance.storageButton.Length - 1)
+          {
+            __instance.txtStorageCost[0].text = "Max Lvl";
+            __instance.txtStorageCost[1].text = "Max Lvl";
+          }
+          else
+          {
+            __instance.txtStorageCost[0].text = string.Empty + newStorageUpgradeCost;
+            __instance.txtStorageCost[1].text = string.Empty + newStorageUpgradeCost;
+          }
+        }
+				else
+				{
+					__instance.Error(3);
+				}
+			}
+			return false;
+    }
+  }
+}

+ 41 - 0
Patches/RePatch_GameScript_RefreshStoragePage.cs

@@ -0,0 +1,41 @@
+using GadgetCore.API;
+using HarmonyLib;
+using System.Collections;
+using System.Reflection;
+using UnityEngine;
+
+namespace StorageExpansion.Patches
+{
+
+  [HarmonyPatch]
+  [HarmonyGadget("StorageExpansion")]
+  public static class RePatch_GameScript_RefreshStoragePage
+  {
+    [HarmonyTargetMethod]
+    static MethodBase TargetMethod()
+    {
+      return AccessTools.Method(typeof(GadgetCoreAPI).Assembly.GetType("GadgetCore.Patches.Patch_GameScript_RefreshStoragePage"), "RefreshStoragePage");
+    }
+
+    public static readonly FieldInfo curStoragePage = typeof(GameScript).GetField("curStoragePage", BindingFlags.NonPublic | BindingFlags.Instance);
+
+    [HarmonyPrefix]
+    public static bool Prefix(GameScript __instance, int p, ref IEnumerator __result)
+    {
+      __result = RefreshStoragePage(__instance, p);
+      return false;
+    }
+
+    private static IEnumerator RefreshStoragePage(GameScript instance, int p)
+    {
+      var __instance = InstanceTracker.GameScript;
+      curStoragePage.SetValue(__instance, p);
+      __instance.storageSelect.transform.position = new Vector3(__instance.storageButton[p].transform.position.x, __instance.storageButton[p].transform.position.y, __instance.storageSelect.transform.position.z);
+      for (int i = 0; i < Core.settingAmountSlots; i++)
+      {
+        __instance.RefreshSlotStorage(i);
+      }
+      yield break;
+    }
+  }
+}

+ 57 - 0
Patches/RePatch_GameScript_Update.cs

@@ -0,0 +1,57 @@
+using GadgetCore.API;
+using GadgetCore.Util;
+using HarmonyLib;
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Reflection.Emit;
+using UnityEngine;
+
+namespace StorageExpansion.Patches
+{
+
+  [HarmonyPatch()]
+  [HarmonyGadget("StorageExpansion")]
+  public static class RePatch_GameScript_Update
+  {
+
+    [HarmonyPrepare]
+    static bool Prepare()
+    {
+      foreach (var a in AppDomain.CurrentDomain.GetAssemblies())
+      {
+        if (a.FullName.StartsWith("QuickStack,"))
+        {
+          return true;
+        }
+      }
+      return false;
+    }
+
+    [HarmonyTargetMethods]
+    static IEnumerable<MethodBase> TargetMethods()
+    {
+      foreach (var a in AppDomain.CurrentDomain.GetAssemblies())
+      {
+        if (a.FullName.StartsWith("QuickStack,"))
+        {
+          yield return AccessTools.Method(a.GetType("QuickStack.Patches.Patch_GameScript_Update"), "Prefix");
+        }
+      }
+      yield break;
+    }
+
+    [HarmonyTranspiler]
+    public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions, ILGenerator gen)
+    {
+      var p = TranspilerHelper.CreateProcessor(instructions, gen);
+      var ilRefs = p.FindAllRefsByInsn(new CodeInstruction(OpCodes.Ldc_I4_S, 30));
+      MethodInfo getValue = typeof(SlotsPerPageGetter).GetProperty("SlotsPerPage").GetGetMethod();
+      foreach (var ilRef in ilRefs)
+      {
+        p.InjectInsn(ilRef, new CodeInstruction(OpCodes.Call, getValue), false);
+      }
+      return p.Insns;
+    }
+  }
+}

+ 34 - 0
PositionSet.cs

@@ -0,0 +1,34 @@
+using UnityEngine;
+
+namespace StorageExpansion
+{
+  internal class PositionSet
+  {
+    internal PositionSet(float slotStartX, float slotStartY, float slotStartZ, int slotWrap, float pageStartX, float pageStartY, float pageStartZ, int pageWrap)
+    {
+      this.slotStartX = slotStartX;
+      this.slotStartY = slotStartY;
+      this.slotStartZ = slotStartZ;
+      this.slotWrap = slotWrap;
+      this.slotPos = new Vector3(slotStartX, slotStartY, slotStartZ);
+
+      this.pageStartX = pageStartX;
+      this.pageStartY = pageStartY;
+      this.pageStartZ = pageStartZ;
+      this.pageWrap = pageWrap;
+      this.pagePos = new Vector3(pageStartX, pageStartY, pageStartZ);
+    }
+
+    public float slotStartX;
+    public float slotStartY;
+    public float slotStartZ;
+    public int slotWrap;
+    public Vector3 slotPos;
+
+    public float pageStartX;
+    public float pageStartY;
+    public float pageStartZ;
+    public int pageWrap;
+    public Vector3 pagePos;
+  }
+}

+ 10 - 0
Properties/AssemblyInfo.cs

@@ -0,0 +1,10 @@
+using System.Reflection;
+using static StorageExpansion.StorageExpansion;
+
+[assembly: AssemblyProduct("StorageExpansion")] //Set this to the full name of the mod including spaces.
+[assembly: AssemblyTitle("StorageExpansion")] //This is only used when mousing over a dll file in Windows explorer.
+[assembly: AssemblyDescription("Increases the available storage space.")] //This is a short description for your mod's assembly.
+[assembly: AssemblyCompany("")] //Set this to your name/nickname and/or website
+[assembly: AssemblyCopyright("© 2021 Zariteis. All rights reserved.")] //Set this to your copyright name.
+[assembly: AssemblyVersion(MOD_VERSION)]
+[assembly: AssemblyFileVersion(MOD_VERSION)]

+ 8 - 0
Properties/launchSettings.json

@@ -0,0 +1,8 @@
+{
+  "profiles": {
+    "StorageExpansion": {
+      "commandName": "Executable",
+      "executablePath": "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Roguelands\\Roguelands.exe"
+    }
+  }
+}

+ 49 - 0
StorageExpansion.cs

@@ -0,0 +1,49 @@
+using UnityEngine;
+using GadgetCore.API;
+using GadgetCore.API.ConfigMenu;
+using UnityEngine.SceneManagement;
+
+namespace StorageExpansion
+{
+  [Gadget("StorageExpansion", LoadBefore: new string[] { "QuickStack" })]
+  public class StorageExpansion : Gadget<StorageExpansion>
+  {
+    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)");
+      }
+
+      Core.settingSizeEnum = Config.ReadEnum("StorageSize", StorageSizeEnum.Large, requiresRestart: true, comments: new string[] { "How large should your storage be?", "!! Restart required !!" });
+
+      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;
+
+      SceneManager.sceneLoaded += OnSceneLoaded;
+    }
+
+    internal static void OnSceneLoaded(Scene scene, LoadSceneMode mode)
+    {
+      if (scene.buildIndex == 1)
+      {
+      }
+    }
+  }
+}

+ 164 - 0
StorageExpansion.csproj

@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project Sdk="Microsoft.NET.Sdk">
+  <ImportGroup>
+    <Import Project="../GamePaths.xml" />
+  </ImportGroup>
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <ProjectGuid>{91AB81DE-EAEE-47D1-93DD-541179208219}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>StorageExpansion</RootNamespace>
+    <AssemblyName>StorageExpansion</AssemblyName>
+    <TargetFrameworks>net35</TargetFrameworks>
+    <FileAlignment>512</FileAlignment>
+    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
+    <Configurations>Release</Configurations>
+    <Authors>Zariteis</Authors>
+    <ApplicationIcon />
+    <StartupObject />
+    <Platforms>x86</Platforms>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <PlatformTarget>x86</PlatformTarget>
+    <DebugType>none</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net35|x86'">
+    <NoWarn>1701;1702</NoWarn>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="0Harmony">
+      <HintPath>$(GamePath)$(ManagedFolder)0Harmony.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="Assembly-CSharp">
+      <HintPath>$(GamePath)$(ManagedFolder)Assembly-CSharp.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="GadgetCore">
+      <HintPath>$(GamePath)$(ManagedFolder)GadgetCore.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="UnityEngine">
+      <HintPath>$(GamePath)$(ManagedFolder)UnityEngine.dll</HintPath>
+      <Private>false</Private>
+    </Reference>
+    <Reference Include="WindowsBase" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="ModInfo.txt">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <UsingTask TaskName="GetFileVersion" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
+    <ParameterGroup>
+      <AssemblyPath ParameterType="System.String" Required="true" />
+      <Version ParameterType="System.String" Output="true" />
+      <TrimmedVersion ParameterType="System.String" Output="true" />
+    </ParameterGroup>
+    <Task>
+      <Using Namespace="System.Diagnostics" />
+      <Using Namespace="System.Text" />
+      <Using Namespace="System.Linq" />
+      <Code Type="Fragment" Language="cs">
+        <![CDATA[
+      this.Version = FileVersionInfo.GetVersionInfo(this.AssemblyPath).FileVersion;  
+      this.TrimmedVersion = this.Version.Split('.').TakeWhile(x => !x.Equals("0")).Aggregate(new StringBuilder(), (a, b) => { if (a.Length > 0) a.Append("."); a.Append(b); return a; }).ToString();
+      if (this.TrimmedVersion.IndexOf('.') == -1) this.TrimmedVersion += ".0";
+    ]]>
+      </Code>
+    </Task>
+  </UsingTask>
+  <Target Name="PostBuild" AfterTargets="PostBuildEvent">
+    <GetFileVersion AssemblyPath="$(TargetPath)">
+      <Output TaskParameter="Version" PropertyName="ModFullVersion" />
+      <Output TaskParameter="TrimmedVersion" PropertyName="AssemblyFileVersion" />
+    </GetFileVersion>
+    <ItemGroup>
+      <OldZip Include="$(TargetDir)$(AssemblyName)_v*.zip" />
+      <OldZip Include="$(GamePath)GadgetCore\Mods\$(AssemblyName)_v*.zip" />
+    </ItemGroup>
+    <Delete Files="@(OldZip)" />
+    <MakeDir Directories="$(TargetDir)..\BuildCache\" />
+    <ZipDirectory SourceDirectory="$(TargetDir)" DestinationFile="$(TargetDir)..\BuildCache\$(AssemblyName)_v$(AssemblyFileVersion).zip" />
+    <Copy SourceFiles="$(TargetDir)..\BuildCache\$(AssemblyName)_v$(AssemblyFileVersion).zip" DestinationFiles="$(TargetDir)$(AssemblyName)_v$(AssemblyFileVersion).zip" />
+    <RemoveDir Directories="$(TargetDir)..\BuildCache\" />
+    <MakeDir Directories="$(GamePath)GadgetCore\Mods\" />
+    <Copy SourceFiles="$(TargetDir)$(AssemblyName)_v$(AssemblyFileVersion).zip" DestinationFiles="$(GamePath)GadgetCore\Mods\$(AssemblyName)_v$(AssemblyFileVersion).zip" />
+    <Message Importance="High" Text="Mod Exported to $(GamePath)GadgetCore\Mods\$(AssemblyName)_v$(AssemblyFileVersion).zip" />
+  </Target>
+  <ItemGroup>
+    <None Update="Assets\menustorage">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\menustorage6x5x27">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\menustorage6x7x14">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\menustorage6x8x14">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\menustorage6x8x28">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\menustorage6x8x70">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Manifest.ini">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Update="System">
+      <Private>false</Private>
+      <SpecificVersion>true</SpecificVersion>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Update="System.Data">
+      <EmbedInteropTypes>false</EmbedInteropTypes>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Update="System.Drawing">
+      <EmbedInteropTypes>false</EmbedInteropTypes>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Update="System.IO.Compression.FileSystem">
+      <EmbedInteropTypes>false</EmbedInteropTypes>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Update="System.Numerics">
+      <EmbedInteropTypes>false</EmbedInteropTypes>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Update="System.Runtime.Serialization">
+      <EmbedInteropTypes>false</EmbedInteropTypes>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Update="System.Xml">
+      <EmbedInteropTypes>false</EmbedInteropTypes>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Update="System.Xml.Linq">
+      <EmbedInteropTypes>false</EmbedInteropTypes>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Assets\" />
+  </ItemGroup>
+</Project>

+ 22 - 0
StorageExpansion.sln

@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.31205.134
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StorageExpansion", "StorageExpansion.csproj", "{91AB81DE-EAEE-47D1-93DD-541179208219}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{91AB81DE-EAEE-47D1-93DD-541179208219}.Release|x86.ActiveCfg = Release|x86
+		{91AB81DE-EAEE-47D1-93DD-541179208219}.Release|x86.Build.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {83BEB5CD-B5EA-4A3B-A851-106FBD2EF307}
+	EndGlobalSection
+EndGlobal

+ 8 - 0
StorageSizeEnum.cs

@@ -0,0 +1,8 @@
+namespace StorageExpansion
+{
+  public enum StorageSizeEnum
+  {
+    //UltraSmall, Smaller, 
+    Large, Larger, MegaLarge, UltraLarge, PagesOnly
+  }
+}