| 12345678910111213141516171819202122 |
- using GadgetCore.API;
- using HarmonyLib;
- using System.Reflection;
- using UnityEngine;
- namespace Subworlds.Patches
- {
- [HarmonyPatch(typeof(GameScript))]
- [HarmonyPatch("GetGearAspect")]
- [HarmonyGadget("SubworldCore")]
- public static class Patch_GameScript_GetGearAspect
- {
- [HarmonyPostfix]
- public static void Postfix(GameScript __instance, int id, ref string __result)
- {
- ItemInfo itemInfo = ItemRegistry.GetItem(id + 200);
- if (itemInfo != null)
- __result = itemInfo.GetName();
- }
- }
- }
|