public static void Prefix(Mech __instance) { try { AccuracyEffectsFeature.SetupAccuracyStatistics(__instance.StatCollection); } catch (Exception e) { Control.mod.Logger.LogError(e); } }
public static bool Prefix(Weapon weapon, ref float __result) { try { if (weapon.parent is Mech mech) { __result += AccuracyEffectsFeature.AccuracyForLocation( mech.StatCollection, weapon.mechComponentRef.MountedLocation ); return(false); } } catch (Exception e) { Control.Logger.Error.Log(e); } return(true); }