using HarmonyLib;

namespace CarMechanicSimulator2021 {
    [HarmonyPatch]
    public class Patches {
        [HarmonyPrefix]
        [HarmonyPatch(typeof(GlobalData), "AddPlayerExp")]
        static void xpMulti(ref float exp) {
            exp *= 10;
        }

        [HarmonyPrefix]
        [HarmonyPatch(typeof(MountObject), "Action")]
        static void mountSpeedMulti(MountObject __instance) {
            float num = 3f;
            float num2 = 1.5f;
            float num3 = num2 * num;
            bool flag = !__instance.reverseMode;
            if (flag)
            {
                __instance.mountState -= Time.deltaTime * num3 * Mathf.Abs(Mathf.Sin(Time.time * 10f));
            }
            else
            {
                __instance.mountState += Time.deltaTime * num3 * Mathf.Abs(Mathf.Sin(Time.time * 10f));
            }
        }
    }
}
