Initial Commit
This commit is contained in:
36
Patches/InventoryPatches.cs
Normal file
36
Patches/InventoryPatches.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Collections.Generic;
|
||||
using HarmonyLib;
|
||||
|
||||
namespace UnlockAll.Patches;
|
||||
|
||||
public static class InventoryPatches
|
||||
{
|
||||
public static CraftingMode ActiveCraftingMode;
|
||||
|
||||
[HarmonyPatch(typeof(InventoryUI), "updateCraftingRecipes")]
|
||||
[HarmonyPrefix]
|
||||
public static bool UpdateCraftingRecipesPrefix()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(InventoryUI), "updateCraftingRecipes")]
|
||||
[HarmonyPostfix]
|
||||
public static void UpdateCraftingRecipesPostfix(InventoryUI __instance, ref int __result)
|
||||
{
|
||||
List<RecipeConfig> allRecipes = ConfigManager.GetAllByType<RecipeConfig>();
|
||||
List<RecipeConfig> validRecipes = new();
|
||||
|
||||
List<InventoryItemRow> _inventoryRows = Traverse.Create(__instance).Field("_inventoryRows").GetValue<List<InventoryItemRow>>();
|
||||
|
||||
for (int index = 0; index < allRecipes.Count; ++index)
|
||||
{
|
||||
RecipeConfig recipe = allRecipes[index];
|
||||
|
||||
if (recipe != null)
|
||||
{
|
||||
CraftingMode recipeMode
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
12
Patches/PlayerFishingControllerPatches.cs
Normal file
12
Patches/PlayerFishingControllerPatches.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using HarmonyLib;
|
||||
|
||||
namespace UnlockAll.Patches;
|
||||
|
||||
public class PlayerFishingControllerPatches
|
||||
{
|
||||
[HarmonyPatch(typeof(PlayerFishingController), "pickFish")]
|
||||
public static bool PickFishPrefix()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
15
Patches/PlayerPatches.cs
Normal file
15
Patches/PlayerPatches.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using HarmonyLib;
|
||||
|
||||
namespace UnlockAll.Patches;
|
||||
|
||||
public static class PlayerPatches
|
||||
{
|
||||
[HarmonyPatch(typeof(Player), "CanCraftRecipe")]
|
||||
[HarmonyPrefix]
|
||||
public static bool PlayerPrefix(ref bool __result)
|
||||
{
|
||||
__result = true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
25
Patches/RecipeConfigPatches.cs
Normal file
25
Patches/RecipeConfigPatches.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using HarmonyLib;
|
||||
|
||||
namespace UnlockAll.Patches;
|
||||
|
||||
public static class RecipeConfigPatches
|
||||
{
|
||||
[HarmonyPatch(typeof(RecipeConfig), "CraftingRequirementsMet")]
|
||||
[HarmonyPrefix]
|
||||
public static bool UnlockPrefix(ref bool __result)
|
||||
{
|
||||
__result = true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
[HarmonyPatch(typeof(RecipeConfig), "IsUnlocked")]
|
||||
[HarmonyPrefix]
|
||||
public static bool RecipeIsUnlockedPrefix(ref bool __result)
|
||||
{
|
||||
__result = true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user