// ReSharper disable once RedundantAssignment
 public static bool Prefix(HardpointDataDef hardpointDataDef, BaseComponentRef componentRef, string prefabBase, string location, ref List <string> usedPrefabNames, ref string __result)
 {
     try
     {
         if (componentRef is MechComponentRef && componentRef.ComponentDefType == ComponentType.Weapon)
         {
             var mechComponentRef = (MechComponentRef)componentRef;
             __result = calculator != null?calculator.GetPrefabName(mechComponentRef) : null;
         }
         return(__result == null);
     }
     catch (Exception e)
     {
         Control.mod.Logger.LogError(e);
         return(true);
     }
 }