Browse Source

[RecipeMenuCore] [2.0.2.2] created

Zariteis 4 years ago
parent
commit
6fd017ae94

+ 134 - 0
RecipeMenuCore/API/RecipePage.cs

@@ -0,0 +1,134 @@
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace RecipeMenuCore.API
+{
+  /// <summary>
+  /// Defines a custom RecipePage. Make sure to call Register on it to enable your RecipePage and to add at least one RecipePageEntry using AddRecipePageEntry.
+  /// </summary>
+  public class RecipePage
+  {
+    /// <summary>
+    /// The RecipePageType of this RecipePage
+    /// </summary>
+    public readonly RecipePageType Type;
+
+    /// <summary>
+    /// The Title displayed on top of this RecipePage.
+    /// </summary>
+    public readonly string Title;
+
+    /// <summary>
+    /// The Texture associated with this RecipePage. May be null.
+    /// </summary>
+    public Texture Tex { get; protected set; }
+
+    /// <summary>
+    /// The Material associated with this RecipePage. May be null.
+    /// </summary>
+    public Material Mat { get; protected set; }
+
+    internal List<RecipePageEntry> Rows = new List<RecipePageEntry>();
+
+    /// <summary>
+    /// Use to create a new RecipePage. Make sure to call Register on it to enable your RecipePage.
+    /// </summary>
+    public RecipePage(RecipePageType Type, string Title, Texture Tex)
+    {
+      this.Type = Type;
+      this.Title = Title;
+      this.Tex = Tex;
+    }
+
+    /// <summary>
+    /// Use to create a new RecipePage. Make sure to call Register on it to enable your RecipePage.
+    /// </summary>
+    public RecipePage(RecipePageType Type, string Title, Material Mat)
+    {
+      this.Type = Type;
+      this.Title = Title;
+      this.Mat = Mat;
+    }
+
+    /// <summary>
+    /// Used to register the page and make it show.
+    /// </summary>
+    public virtual RecipePage Register()
+    {
+      PostRegister();
+      switch (Type)
+      {
+        case RecipePageType.GearForge:
+          Core.pageGearForgeInfoList.Add(this);
+          break;
+        case RecipePageType.AlchemyStation:
+          Core.pageAlchemyStationInfoList.Add(this);
+          break;
+        case RecipePageType.UltimateForge:
+          Core.pageUltimateForgeInfoList.Add(this);
+          break;
+      }
+      return this;
+    }
+
+    protected void PostRegister()
+    {
+      if (Mat == null)
+      {
+        Mat = new Material(Shader.Find("Unlit/Transparent"))
+        {
+          mainTexture = Tex
+        };
+      }
+      else
+      {
+        Tex = Mat.mainTexture;
+      }
+    }
+
+    /// <summary>
+    /// Used to register the RecipePage to make it show up.
+    /// </summary>
+    public RecipePageType GetEntryType()
+    {
+      return Type;
+    }
+
+    /// <summary>
+    /// Adds a new RecipePageEntry to the RecipePage.
+    /// </summary>
+    public void AddRecipePageEntry(RecipePageEntry row)
+    {
+      Rows.Add(row);
+    }
+
+    /// <summary>
+    /// Returns the list of avalible RecipePageEntry on this RecipePage.
+    /// </summary>
+    public RecipePageEntry[] GetRecipePageEntries()
+    {
+      return Rows.ToArray();
+    }
+  }
+
+  /// <summary>
+  /// This indicates what types of recipes are avalible.
+  /// </summary>
+  public enum RecipePageType
+  {
+    /// <summary>
+    /// This recipe is for the Gear Forge.
+    /// </summary>
+    GearForge,
+
+    /// <summary>
+    /// This recipe is for the Alchemy Station.
+    /// </summary>
+    AlchemyStation,
+
+    /// <summary>
+    /// This recipe is for the Ultimate Forge.
+    /// </summary>
+    UltimateForge
+  }
+}

+ 42 - 0
RecipeMenuCore/API/RecipePageEntry.cs

@@ -0,0 +1,42 @@
+namespace RecipeMenuCore.API
+{
+  public class RecipePageEntry
+  {
+    /// <summary>
+    /// The ultimate items in UltimateFore recipes or the inputs in other recipes.
+    /// </summary>
+    public int[] ItemIdExtension { get; protected set; }
+
+    /// <summary>
+    /// The normal item in UltimateFore recipes or the output in other recipes.
+    /// </summary>
+    public int ItemIdBase { get; protected set; }
+
+    /// <summary>
+    /// The MinAmount of items created from a recipe.
+    /// </summary>
+    public int MinAmount { get; protected set; }
+
+    /// <summary>
+    /// The MaxBonusAmount to be added to the base value.
+    /// </summary>
+    public int MaxBonusAmount { get; protected set; }
+
+    /// <summary>
+    /// Use to create a new RecipePageEntry.
+    /// </summary>
+    /// <param name="id1">The first ultimate item in UltimateFore recipes or the first input in other recipes.</param>
+    /// <param name="id2">The second ultimate item in UltimateFore recipes or the second input in other recipes.</param>
+    /// <param name="id3">The third ultimate item in UltimateFore recipes or the third input in other recipes.</param>
+    /// <param name="idBase">The normal item in UltimateFore recipes or the output in other recipes.</param>
+    /// <param name="min">The minimum amount of items created from a recipe.</param>
+    /// <param name="maxBonus">The maximum bonus amount of items created from a recipe.</param>
+    public RecipePageEntry(int id1, int id2, int id3, int idBase, int min = 1, int maxBonus = 0)
+    {
+      ItemIdExtension = new int[] { id1, id2, id3 };
+      ItemIdBase = idBase;
+      MinAmount = min;
+      MaxBonusAmount = maxBonus;
+    }
+  }
+}

BIN
RecipeMenuCore/Assets/hoverItem.png


+ 16 - 0
RecipeMenuCore/Core.cs

@@ -0,0 +1,16 @@
+using GadgetCore;
+using GadgetCore.API;
+using RecipeMenuCore.API;
+using System.Collections.Generic;
+
+namespace RecipeMenuCore
+{
+  internal static class Core
+  {
+    public static List<RecipePage> pageGearForgeInfoList = new List<RecipePage>();
+    public static List<RecipePage> pageAlchemyStationInfoList = new List<RecipePage>();
+    public static List<RecipePage> pageUltimateForgeInfoList = new List<RecipePage>();
+
+    public static GadgetLogger logger;
+  }
+}

+ 3 - 0
RecipeMenuCore/Manifest.ini

@@ -0,0 +1,3 @@
+[Metadata]
+Name=Recipe Menu Core
+Assembly=RecipeMenuCore.dll

+ 1 - 0
RecipeMenuCore/ModInfo.txt

@@ -0,0 +1 @@
+A utility mod providing recipe menu extension.

+ 96 - 0
RecipeMenuCore/Patches/Patch_GameScript_HoverRecipeSelect.cs

@@ -0,0 +1,96 @@
+using HarmonyLib;
+using GadgetCore.API;
+using UnityEngine;
+using System.Collections;
+using System.Reflection;
+using System.Collections.Generic;
+
+namespace RecipeMenuCore.Patches
+{
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("HoverRecipeSelect")]
+  [HarmonyGadget("RecipeMenuCore")]
+  public static class Patch_GameScript_HoverRecipeSelect
+  {
+    [HarmonyPrefix]
+    public static bool Prefix(GameScript __instance, int id, int ___craftType, ref int ___curRecipePage, GameObject ___itemexpbar, Item[] ___storage, GameObject[] ___aspectObj, TextMesh ___itemName,
+      GameObject ___hoverItem, TextMesh[] ___itemStat, GameObject ___txtStats, TextMesh ___itemDesc, Material ___hoverItemMat2, Material ___hoverItemMat1, GameObject ___hoverDroid,
+      TextMesh[] ___txtHoverStat, TextMesh ___txtHoverStatInfo, TextMesh[] ___itemAspect, TextMesh ___itemLevel)
+    {
+      var item = new Item(GetItemId(id, ___craftType, ___curRecipePage), 1, 0, 0, 0, new int[3], new int[3]);
+      var itemInfo = ItemRegistry.GetItem(item.id);
+
+      ___txtHoverStat[0].text = string.Empty;
+      ___txtHoverStat[1].text = ___txtHoverStat[0].text;
+      ___txtHoverStatInfo.text = string.Empty;
+      ___aspectObj[0].SetActive(false);
+      ___aspectObj[1].SetActive(false);
+      ___aspectObj[2].SetActive(false);
+      ___itemAspect[0].text = string.Empty;
+      ___itemAspect[1].text = string.Empty;
+      ___itemAspect[2].text = string.Empty;
+      ___itemLevel.text = string.Empty;
+
+      if (Camera.main.ScreenToWorldPoint(Input.mousePosition).y < MenuScript.player.transform.position.y - 4.5f)
+        ___hoverItem.transform.localPosition = new Vector3(5f, 0f, -4.55f);
+      else
+        ___hoverItem.transform.localPosition = new Vector3(5f, -4f, -4.55f);
+
+      ___hoverDroid.SetActive(false);
+      ___itemexpbar.SetActive(false);
+
+      if (item.id > 0)
+      {
+        ___itemName.text = itemInfo.Name;
+        ___itemName.color = Color.white;
+        ___itemDesc.text = itemInfo.Desc;
+
+        bool hasStats = false;
+        int[] gearBaseStats = ItemRegistry.GetItem(item.id).Stats.GetStatArray();
+        for (int i = 0; i < 6; i++)
+        {
+          if (gearBaseStats[i] > 0)
+          {
+            ___itemStat[i].text = "+" + gearBaseStats[i];
+            hasStats = true;
+          }
+          else
+            ___itemStat[i].text = string.Empty;
+        }
+        ___txtStats.SetActive(hasStats);
+        ___hoverItem.SetActive(true);
+        if (hasStats)
+          ___hoverItem.GetComponent<Renderer>().material = hoverItem;
+        else
+          ___hoverItem.GetComponent<Renderer>().material = ___hoverItemMat1;
+      }
+      else
+      {
+        ___hoverItem.SetActive(false);
+      }
+      return false;
+    }
+
+    private static Material hoverItem = new Material(Shader.Find("Unlit/Transparent"))
+    {
+      mainTexture = GadgetCoreAPI.LoadTexture2D("hoverItem.png")
+    };
+
+    private static int GetItemId(int index, int craftType, int curRecipePage)
+    {
+      if (craftType == 0 && curRecipePage >= 6)
+      {
+        return Core.pageGearForgeInfoList[curRecipePage - 6].GetRecipePageEntries()[index].ItemIdBase;
+      }
+      else if (craftType == 1 && curRecipePage >= 2)
+      {
+        return Core.pageAlchemyStationInfoList[curRecipePage - 2].GetRecipePageEntries()[index].ItemIdBase;
+      }
+      else if (craftType == 2 && curRecipePage >= 6)
+      {
+        return Core.pageUltimateForgeInfoList[curRecipePage - 6].GetRecipePageEntries()[index].ItemIdBase;
+      }
+      return 1;
+    }
+  }
+}

+ 34 - 0
RecipeMenuCore/Patches/Patch_GameScript_RecipeDown.cs

@@ -0,0 +1,34 @@
+using HarmonyLib;
+using GadgetCore.API;
+using UnityEngine;
+using System.Collections;
+
+namespace RecipeMenuCore.Patches
+{
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("RecipeDown")]
+  [HarmonyGadget("RecipeMenuCore")]
+  public static class Patch_GameScript_RecipeDown
+  {
+    [HarmonyPrefix]
+    public static bool Prefix(GameScript __instance, int ___craftType, ref int ___curRecipePage)
+    {
+      int pages = 1;
+      switch (___craftType)
+      {
+        case 0:
+          pages = 6 + Core.pageGearForgeInfoList.Count;
+          break;
+        case 1:
+          pages = 2 + Core.pageAlchemyStationInfoList.Count;
+          break;
+        case 2:
+          pages = 6 + Core.pageUltimateForgeInfoList.Count;
+          break;
+      }
+      ___curRecipePage = (___curRecipePage + pages - 1) % pages;
+      __instance.RefreshRecipe();
+      return false;
+    }
+  }
+}

+ 34 - 0
RecipeMenuCore/Patches/Patch_GameScript_RecipeUp.cs

@@ -0,0 +1,34 @@
+using HarmonyLib;
+using GadgetCore.API;
+using UnityEngine;
+using System.Collections;
+
+namespace RecipeMenuCore.Patches
+{
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("RecipeUp")]
+  [HarmonyGadget("RecipeMenuCore")]
+  public static class Patch_GameScript_RecipeUp
+  {
+    [HarmonyPrefix]
+    public static bool Prefix(GameScript __instance, int ___craftType, ref int ___curRecipePage)
+    {
+      int pages = 1;
+      switch (___craftType)
+      {
+        case 0:
+          pages = 6 + Core.pageGearForgeInfoList.Count;
+          break;
+        case 1:
+          pages = 2 + Core.pageAlchemyStationInfoList.Count;
+          break;
+        case 2:
+          pages = 6 + Core.pageUltimateForgeInfoList.Count;
+          break;
+      }
+      ___curRecipePage = (___curRecipePage + 1) % pages;
+      __instance.RefreshRecipe();
+      return false;
+    }
+  }
+}

+ 66 - 0
RecipeMenuCore/Patches/Patch_GameScript_RefreshRecipe.cs

@@ -0,0 +1,66 @@
+using HarmonyLib;
+using GadgetCore.API;
+using UnityEngine;
+using System.Collections;
+
+namespace RecipeMenuCore.Patches
+{
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("RefreshRecipe")]
+  [HarmonyGadget("RecipeMenuCore")]
+  public static class Patch_GameScript_RefreshRecipe
+  {
+    [HarmonyPrefix]
+    public static bool Prefix(GameScript __instance, int ___craftType, int ___curRecipePage)
+    {
+      if (___craftType == 0)
+      {
+        __instance.txtRecipeName[0].text = string.Empty + __instance.GetRecipeName0(___curRecipePage);
+        __instance.txtRecipeUnlocked[0].text = "Page " + (___curRecipePage + 1) + "/" + (6 + Core.pageGearForgeInfoList.Count);
+      }
+      else if (___craftType == 1)
+      {
+        __instance.txtRecipeName[0].text = string.Empty + __instance.GetRecipeName1(___curRecipePage);
+        __instance.txtRecipeUnlocked[0].text = "Page " + (___curRecipePage + 1) + "/" + (2 + Core.pageAlchemyStationInfoList.Count);
+      }
+      else if (___craftType == 2)
+      {
+        __instance.txtRecipeName[0].text = string.Empty + __instance.GetRecipeName2(___curRecipePage);
+        __instance.txtRecipeUnlocked[0].text = "Page " + (___curRecipePage + 1) + "/" + (6 + Core.pageUltimateForgeInfoList.Count);
+      }
+      __instance.txtRecipeUnlocked[0].gameObject.GetComponent<Animation>().Play();
+      __instance.txtRecipeName[0].gameObject.GetComponent<Animation>().Play();
+      __instance.txtRecipeName[1].text = __instance.txtRecipeName[0].text;
+      __instance.txtRecipeUnlocked[1].text = __instance.txtRecipeUnlocked[0].text;
+      if ((___craftType != 0 || ___curRecipePage <= 5)
+        && (___craftType != 1 || ___curRecipePage <= 1)
+        && (___craftType != 2 || ___curRecipePage <= 5))
+      {
+        __instance.menuRecipe.GetComponent<Renderer>().material = (Material)Resources.Load(string.Concat(new object[] { "mat/r", ___curRecipePage, "t", ___craftType }));
+      }
+      else
+      {
+        if (___craftType == 0)
+        {
+          __instance.txtRecipeName[0].text = Core.pageGearForgeInfoList[___curRecipePage - 6].Title;
+          __instance.txtRecipeName[1].text = __instance.txtRecipeName[0].text;
+          __instance.menuRecipe.GetComponent<Renderer>().material = Core.pageGearForgeInfoList[___curRecipePage - 6].Mat;
+        }
+        else if (___craftType == 1)
+        {
+          __instance.txtRecipeName[0].text = Core.pageAlchemyStationInfoList[___curRecipePage - 2].Title;
+          __instance.txtRecipeName[1].text = __instance.txtRecipeName[0].text;
+          __instance.menuRecipe.GetComponent<Renderer>().material = Core.pageAlchemyStationInfoList[___curRecipePage - 2].Mat;
+        }
+        else if (___craftType == 2)
+        {
+          __instance.txtRecipeName[0].text = Core.pageUltimateForgeInfoList[___curRecipePage - 6].Title;
+          __instance.txtRecipeName[1].text = __instance.txtRecipeName[0].text;
+          __instance.menuRecipe.GetComponent<Renderer>().material = Core.pageUltimateForgeInfoList[___curRecipePage - 6].Mat;
+        }
+      }
+      __instance.RefreshRecipeUnlock();
+      return false;
+    }
+  }
+}

+ 96 - 0
RecipeMenuCore/Patches/Patch_GameScript_RefreshRecipeUnlock.cs

@@ -0,0 +1,96 @@
+using HarmonyLib;
+using GadgetCore.API;
+using UnityEngine;
+using System.Collections;
+using System.Reflection;
+using System.Collections.Generic;
+
+namespace RecipeMenuCore.Patches
+{
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("RefreshRecipeUnlock")]
+  [HarmonyGadget("RecipeMenuCore")]
+  public static class Patch_GameScript_RefreshRecipeUnlock
+  {
+    [HarmonyPrefix]
+    public static bool Prefix(GameScript __instance, int ___craftType, int ___curRecipePage, GameObject ___ultLocksObj, GameObject ___recipeButtons,
+      GameObject[] ___recipeLock, GameObject[] ___ultLocks)
+    {
+      if (___craftType == 0 || ___craftType == 1)
+      {
+        for (int i = 0; i < 12; i++)
+        {
+          ___recipeButtons.transform.GetChild(i).gameObject.SetActive(true);
+        }
+      }
+      if (___craftType == 0 && ___curRecipePage >= 6)
+      {
+        ___ultLocksObj.SetActive(false);
+        ___recipeButtons.SetActive(true);
+        for (int i = 0; i < 12; i++)
+        {
+          if (Core.pageGearForgeInfoList[___curRecipePage - 6].GetRecipePageEntries().Length > i)
+          {
+            int itemID = Core.pageGearForgeInfoList[___curRecipePage - 6].GetRecipePageEntries()[i].ItemIdBase;
+            if (__instance.RecipeCraftedAlready(itemID, 0))
+              ___recipeLock[i].SetActive(false);
+            else
+              ___recipeLock[i].SetActive(true);
+          }
+          else
+          {
+            ___recipeLock[i].SetActive(false);
+            ___recipeButtons.transform.GetChild(i).gameObject.SetActive(false);
+          }
+        }
+        return false;
+      }
+      else if (___craftType == 1 && ___curRecipePage >= 2)
+      {
+        ___ultLocksObj.SetActive(false);
+        ___recipeButtons.SetActive(true);
+        for (int i = 0; i < 12; i++)
+        {
+          if (Core.pageAlchemyStationInfoList[___curRecipePage - 2].GetRecipePageEntries().Length > i)
+          {
+            int itemID = Core.pageAlchemyStationInfoList[___curRecipePage - 2].GetRecipePageEntries()[i].ItemIdBase;
+            if (__instance.RecipeCraftedAlready(itemID, 0))
+              ___recipeLock[i].SetActive(false);
+            else
+              ___recipeLock[i].SetActive(true);
+          }
+          else
+          {
+            ___recipeLock[i].SetActive(false);
+            ___recipeButtons.transform.GetChild(i).gameObject.SetActive(false);
+          }
+        }
+        return false;
+      }
+      else if (___craftType == 2 && ___curRecipePage >= 6)
+      {
+        ___ultLocksObj.SetActive(true);
+        ___recipeButtons.SetActive(false);
+        for (int i = 0; i < 36; i++)
+        {
+          if (i < 12)
+          {
+            ___recipeLock[i].SetActive(false);
+          }
+          if (Core.pageUltimateForgeInfoList[___curRecipePage - 6].GetRecipePageEntries().Length > i / 3)
+          {
+            int itemID = Core.pageUltimateForgeInfoList[___curRecipePage - 6].GetRecipePageEntries()[i / 3].ItemIdExtension[i % 3];
+            if (__instance.RecipeCraftedAlready(itemID, 0))
+              ___ultLocks[i].SetActive(false);
+            else
+              ___ultLocks[i].SetActive(true);
+          }
+          else
+            ___ultLocks[i].SetActive(false);
+        }
+        return false;
+      }
+      return true;
+    }
+  }
+}

+ 193 - 0
RecipeMenuCore/Patches/Patch_GameScript_Update.cs

@@ -0,0 +1,193 @@
+using HarmonyLib;
+using GadgetCore.API;
+using UnityEngine;
+using System.Collections;
+using System.Reflection;
+using System.Collections.Generic;
+
+namespace RecipeMenuCore.Patches
+{
+  [HarmonyPatch(typeof(GameScript))]
+  [HarmonyPatch("Update")]
+  [HarmonyGadget("RecipeMenuCore")]
+  public static class Patch_GameScript_Update
+  {
+    [HarmonyPrefix]
+    public static bool Prefix(GameScript __instance, int ___craftType, int ___curRecipePage, GameObject ___ultLocksObj, GameObject ___recipeButtons,
+      GameObject[] ___recipeLock, int[,] ___ultLocksUnlocked, GameObject[] ___ultLocks, Item[] ___inventory, Item[] ___craft)
+    {
+      bool acted = false;
+      if (MenuScript.player)
+      {
+        if (GameScript.inventoryOpen)
+        {
+          var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
+          RaycastHit hit;
+          if (Physics.Raycast(ray, out hit, 5f))
+          {
+            if (hit.transform.gameObject.tag == "recipe")
+            {
+              __instance.HoverRecipeSelect(int.Parse(hit.transform.gameObject.name));
+              //acted = true;
+            }
+          }
+        }
+        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)
+              {
+                if (hit.transform.gameObject.tag == "recipe")
+                {
+                  var slotID = int.Parse(hit.transform.gameObject.name);
+                  MonoBehaviour.print("hit recipe");
+                  if (___craftType == 0 && ___curRecipePage >= 6)
+                  {
+                    __instance.StartCoroutine(QuickCraft(__instance, ___curRecipePage, slotID, ___craftType, ___inventory, ___craft));
+                    acted = true;
+                  }
+                  else if (___craftType == 1 && ___curRecipePage >= 2)
+                  {
+                    __instance.StartCoroutine(QuickCraft(__instance, ___curRecipePage, slotID, ___craftType, ___inventory, ___craft));
+                    acted = true;
+                  }
+                  else if (___craftType == 2 && ___curRecipePage >= 6)
+                  {
+                    acted = true;
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+      if (acted)
+        return false;
+      return true;
+    }
+
+    private static IEnumerator QuickCraft(GameScript __instance, int ___curRecipePage, int slot, int ___craftType, Item[] ___inventory, Item[] ___craft)
+    {
+      FieldInfo quickCraftingField = typeof(GameScript).GetField("quickCrafting", BindingFlags.NonPublic | BindingFlags.Instance);
+      FieldInfo holdingItemField = typeof(GameScript).GetField("holdingItem", BindingFlags.NonPublic | BindingFlags.Instance);
+
+      if (!(bool)quickCraftingField.GetValue(__instance))
+      {
+        quickCraftingField.SetValue(__instance, true);
+        try
+        {
+          int craftingItemID = 0;
+          int craftingItemAmount = 1;
+          List<int> price = new List<int>();
+          List<int> takePlayerInventory = new List<int>();
+          List<int> takeCraftingInventory = new List<int>();
+          bool hasAllItems = true;
+          if (___craftType == 0)
+          {
+            var recipePageEntry = Core.pageGearForgeInfoList[___curRecipePage - 6].GetRecipePageEntries()[slot];
+            craftingItemID = recipePageEntry.ItemIdBase;
+            for (int i = 0; i < recipePageEntry.ItemIdExtension.Length; i++)
+            {
+              var itemID = recipePageEntry.ItemIdExtension[i];
+              if (itemID > 0)
+                price.Add(itemID);
+            }
+          }
+          else if (___craftType == 1)
+          {
+            var recipePageEntry = Core.pageAlchemyStationInfoList[___curRecipePage - 2].GetRecipePageEntries()[slot];
+            craftingItemID = recipePageEntry.ItemIdBase;
+            craftingItemAmount = Random.Range(recipePageEntry.MinAmount, recipePageEntry.MinAmount + recipePageEntry.MaxBonusAmount);
+            for (int i = 0; i < recipePageEntry.ItemIdExtension.Length; i++)
+            {
+              var itemID = recipePageEntry.ItemIdExtension[i];
+              if (itemID > 0)
+                price.Add(itemID);
+            }
+          }
+          if (craftingItemID == 0 || !__instance.RecipeCraftedAlready(craftingItemID, 0))
+          {
+            yield break;
+          }
+          for (int i = 0; i < price.Count; i++)
+          {
+            int itemSlotPlayerInventory = __instance.ItemExistsSlot(price[i]);
+            int itemSlotCraftingInventory = __instance.ItemExistsCraft(price[i]);
+            if (itemSlotPlayerInventory == -1 && itemSlotCraftingInventory == -1)
+            {
+              hasAllItems = false;
+              break;
+            }
+            else if (itemSlotPlayerInventory != -1)
+              takePlayerInventory.Add(itemSlotPlayerInventory);
+            else if (itemSlotCraftingInventory != -1)
+              takeCraftingInventory.Add(itemSlotCraftingInventory);
+          }
+          if (hasAllItems)
+          {
+            bool hasCrafted = false;
+            Item tempItem = (Item)holdingItemField.GetValue(__instance);
+            if (tempItem == null || tempItem.id == 0 || tempItem.id == craftingItemID)
+            {
+              ItemInfo itemInfo = ItemRegistry.GetItem(craftingItemID);
+              ItemType slotItemType = itemInfo != null ? (itemInfo.Type & (ItemType.EQUIP_MASK | ItemType.TYPE_MASK)) : ItemRegistry.GetDefaultTypeByID(craftingItemID);
+              if ((slotItemType & ItemType.NONSTACKING) == ItemType.STACKING)
+              {
+                if (tempItem == null || tempItem.id == 0)
+                {
+                  holdingItemField.SetValue(__instance, new Item(craftingItemID, craftingItemAmount, 0, 0, 0, new int[3], new int[3]));
+                  hasCrafted = true;
+                }
+                else if (tempItem.q < 9999)
+                {
+                  tempItem.q += craftingItemAmount;
+                  if (tempItem.q > 9999)
+                    tempItem.q = 9999;
+                  hasCrafted = true;
+                }
+              }
+              else
+              {
+                if (tempItem == null || tempItem.id == 0)
+                {
+                  holdingItemField.SetValue(__instance, new Item(craftingItemID, 1, 0, __instance.GetRandomTier(), 0, new int[3], new int[3]));
+                  hasCrafted = true;
+                }
+              }
+            }
+            if (hasCrafted)
+            {
+              Object.Instantiate(Resources.Load("clickBurst"), new Vector3(Camera.main.ScreenToWorldPoint(Input.mousePosition).x, Camera.main.ScreenToWorldPoint(Input.mousePosition).y, 0f), Quaternion.identity);
+              __instance.GetComponent<AudioSource>().PlayOneShot((AudioClip)Resources.Load("Au/create"), Menuu.soundLevel / 10f);
+
+              for (int i = 0; i < takePlayerInventory.Count; i++)
+              {
+                ___inventory[takePlayerInventory[i]].q--;
+                __instance.RefreshSlot(takePlayerInventory[i]);
+              }
+              for (int i = 0; i < takeCraftingInventory.Count; i++)
+              {
+                ___craft[takeCraftingInventory[i]].q--;
+                __instance.RefreshSlotCraft(takeCraftingInventory[i]);
+              }
+            }
+            __instance.RefreshHoldingSlot();
+          }
+          else
+            __instance.Error(6);
+        }
+        catch (System.Exception e) { Core.logger.LogConsole(e); }
+        finally
+        {
+          quickCraftingField.SetValue(__instance, false);
+        }
+      }
+      yield break;
+    }
+  }
+}

+ 10 - 0
RecipeMenuCore/Properties/AssemblyInfo.cs

@@ -0,0 +1,10 @@
+using System.Reflection;
+using static RecipeMenuCore.RecipeMenuCore;
+
+[assembly: AssemblyProduct("RecipeMenuCore")] //Set this to the full name of the mod including spaces.
+[assembly: AssemblyTitle("ScrapYard")] //This is only used when mousing over a dll file in Windows explorer.
+[assembly: AssemblyDescription("A utility mod providing recipe menu extension.")] //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
RecipeMenuCore/Properties/launchSettings.json

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

+ 15 - 0
RecipeMenuCore/README.txt

@@ -0,0 +1,15 @@
+In addition to changing all references to "Template" this and that to a more appropriate name,
+you need to add a file called "GamePaths.xml" to the folder ABOVE where you put this template, with the following content:
+
+<?xml version="1.0" encoding="utf-8"?>
+<Project>
+  <PropertyGroup>
+    <!-- Set this full path to your game folder. Must contain a slash at the end. -->
+    <GamePath>C:\Program Files (x86)\Steam\steamapps\common\Roguelands\</GamePath>
+
+    <!-- Set this partial path to the game's Managed folder. Must contain a slash at the end. -->
+    <ManagedFolder>Roguelands_Data\Managed\</ManagedFolder>
+  </PropertyGroup>
+</Project>
+
+Note that `GamePath` may need to be changed, depending on the nature of your installation.

+ 38 - 0
RecipeMenuCore/RecipeMenuCore.cs

@@ -0,0 +1,38 @@
+using GadgetCore.API;
+using GadgetCore.API.ConfigMenu;
+using RecipeMenuCore.API;
+using System.Collections.Generic;
+
+namespace RecipeMenuCore
+{
+
+  [Gadget("RecipeMenuCore", RequiredOnClients: false)]
+  public class RecipeMenuCore : Gadget<RecipeMenuCore>
+  {
+    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.Reset();
+      Config.Save();
+    }
+
+    public override IGadgetConfigMenu GetConfigMenu() { return null; }
+
+    public override string GetModDescription()
+    {
+      return "A utility mod providing recipe menu extension.";
+    }
+
+    protected override void Initialize()
+    {
+      Logger.Log("Recipe Menu Core v" + Info.Mod.Version);
+      Core.logger = Logger;
+
+      Core.pageGearForgeInfoList = new List<RecipePage>();
+      Core.pageAlchemyStationInfoList = new List<RecipePage>();
+      Core.pageUltimateForgeInfoList = new List<RecipePage>();
+    }
+  }
+}

+ 356 - 0
RecipeMenuCore/RecipeMenuCore.csproj

@@ -0,0 +1,356 @@
+<?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>RecipeMenuCore</RootNamespace>
+    <AssemblyName>RecipeMenuCore</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\ancientCrystal.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\ancientCrystalCM.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bgScrapYard.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bgSpace.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bScrapYardbg0.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bScrapYardbg1.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bScrapYardbg2.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bScrapYardbg3.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bSpacebg0.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bSpacebg1.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bSpacebg2.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bSpacebg3.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\bugspotBig.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\cGreenLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\charBG.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\cOrangeLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\cPlatform.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\cPurpleLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\cWhiteLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\cYellowLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\entranceScrapYard.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\entranceSpace.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\First\one">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\frozenWisp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\goldenShroom.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\hoverItem.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iAirCore.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iCore.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iEarthCore.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iFireCore.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iGreenLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iOrangeLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iPlatform.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iPurpleLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iWaterCore.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iWhiteLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\iYellowLamp.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\meteor1.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\meteor2.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\meteor3.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\meteor4.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\midCoverChunk0.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\midHiddenChunk0.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\midScrapYardChunk0.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\midScrapYardChunk1.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\midSpaceChunk0.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\midSpaceChunk1.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\one">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\plagueBall.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\plagueNest.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\planetScrapYard.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\planetSpace.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\planetSpacePrev.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\sideBigScrapYard.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\sideBigSpace.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\sidesmallScrapYard.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\sideSmallSpace.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\signScrapYard - Kopie.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\signScrapYard.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\signSpace.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\spaceOre.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\spaceOreBig.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\spiderEgg.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\spiderEggCM.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\spiderEggCM2.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\spikePlant.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\spikePlantCM.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\stars.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\tx1.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Update="Assets\tx2.png">
+      <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>