Upload from upload_mods.ps1

This commit is contained in:
Nathaniel Cosford
2025-06-04 16:44:53 +09:30
commit f1fbbe67bb
1722 changed files with 165268 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
namespace Harmony.InventoryRebirth
{
internal class InventoryPatches
{
[HarmonyPatch(typeof(Inventory))]
[HarmonyPatch("PUBLIC_SLOTS")]
[HarmonyPatch(MethodType.Getter)]
public static class PUBLIC_SLOTSPatch
{
public static void Postfix(Inventory __instance, ref int __result
)
{
__result = 20;
}
}
[HarmonyPatch(typeof(Inventory))]
[HarmonyPatch("updateHoldingItem")]
public class updateHoldingItem
{
public static bool Prefix(Inventory __instance,
global::EntityAlive ___entity
)
{
//Log.Out("InventoryPatches-updateHoldingItem START");
if (___entity is EntityPlayer)
{
EntityPlayerLocal primaryPlayer = GameManager.Instance.World.GetPrimaryPlayer();
if (primaryPlayer != null && primaryPlayer.entityId == ___entity.entityId)
{
//Log.Out("InventoryPatches-updateHoldingItem ___entity: " + ___entity.EntityName);
RebirthUtilities.checkCraftingProgression(__instance, ___entity);
RebirthVariables.isCraftableItem = RebirthUtilities.IsCraftableItem();
}
}
return true;
}
}
}
}