public static void Prefix(InventoryGui __instance) { if (!Configuration.Current.Player.IsEnabled || !Configuration.Current.Player.autoRepair) { return; } CraftingStation curr_crafting_station = Player.m_localPlayer.GetCurrentCraftingStation(); if (curr_crafting_station != null) { int repair_count = 0; while (__instance.HaveRepairableItems()) { __instance.RepairOneItem(); ++repair_count; } if (repair_count > 0) { curr_crafting_station.m_repairItemDoneEffects.Create(curr_crafting_station.transform.position, Quaternion.identity, null, 1.0f); } } }