public static void Prefix(MechRepresentationSimGame __instance) { try { MechHardpointRules_GetComponentPrefabName_Patch.SetupCalculator( __instance.mechDef?.Chassis, __instance.mechDef?.Inventory?.ToList()); } catch (Exception e) { Control.Logger.Error.Log(e); } }
public static void Prefix(Mech __instance) { try { var componentRefs = __instance.Weapons.Union(__instance.supportComponents) .Select(w => w.baseComponentRef as MechComponentRef) .Where(c => c != null) .ToList(); MechHardpointRules_GetComponentPrefabName_Patch.SetupCalculator(__instance.MechDef.Chassis, componentRefs); } catch (Exception e) { Control.Logger.Error.Log(e); } }
public static void Prefix(MechDef __instance) { try { var mechDef = __instance; // missing fixed equipment :/ MechHardpointRules_GetComponentPrefabName_Patch.SetupCalculator( mechDef.Chassis, mechDef.Inventory?.ToList() ); } catch (Exception e) { Control.Logger.Error.Log(e); } }
public static void Postfix(MechRepresentationSimGame __instance) { MechHardpointRules_GetComponentPrefabName_Patch.ResetCalculator(); }
public static void Postfix() { MechHardpointRules_GetComponentPrefabName_Patch.ResetCalculator(); }