public static void Prefix(SimGameState __instance, MechDef def)
        {
            try
            {
                foreach (var mechComponentRef in def.Inventory)
                {
                    if (mechComponentRef.DamageLevel == ComponentDamageLevel.Destroyed)
                    {
                        continue;
                    }

                    SimGameStateAddItemStatPatch.OnAddItemStat(__instance, mechComponentRef);
                }
            }
            catch (Exception e)
            {
                Control.mod.Logger.LogError(e);
            }
        }
 public static IEnumerable <CodeInstruction> Transpiler(IEnumerable <CodeInstruction> instructions)
 {
     return(SimGameStateAddItemStatPatch.Transpiler(instructions));
 }