public static bool SetHardpoints(MechBayMechInfoWidget __instance, LocalizableText ___jumpjetHardpointText, LocalizableText ___ballisticHardpointText, MechDef ___selectedMech) { try { var hardpoints = __instance.GetComponent <UIModuleHPHandler>(); if (hardpoints == null) { hardpoints = __instance.gameObject.AddComponent <UIModuleHPHandler>(); hardpoints.Init(__instance, ___ballisticHardpointText.gameObject, ___jumpjetHardpointText.gameObject, new Vector2(-5, -58)); } var usage = ___selectedMech.GetHardpointUsage(); hardpoints.SetData(usage); hardpoints.SetJJ(___selectedMech.GetJJCountByMechDef(), ___selectedMech.GetJJMaxByMechDef()); } catch (Exception e) { Control.LogError(e); } return(false); }