internal static void Postfix(ref SeaTruckMotor __instance) { SeaTruckConfig config = QPatch.Config; Console.WriteLine($"[UnSlowSeaTruck] Original steeringMultiplier: {__instance.steeringMultiplier}"); Console.WriteLine($"[UnSlowSeaTruck] Original acceleration: {__instance.acceleration}"); __instance.steeringMultiplier *= config.SteeringMultiplier; // better steering __instance.acceleration *= config.AccelerationMultiplier; // better acceleration Console.WriteLine($"[UnSlowSeaTruck] Modified steeringMultiplier: {__instance.steeringMultiplier} [Config:{config.SteeringMultiplier}] (More is faster)"); Console.WriteLine($"[UnSlowSeaTruck] Modified acceleration: {__instance.acceleration} [Config:{config.AccelerationMultiplier}] (More is faster)"); }
public static void Patch() { var assembly = Assembly.GetExecutingAssembly(); Console.WriteLine("[UnSlowSeaTruck] Patching v" + assembly.GetName().Version.ToString(3)); Config = ConfigMgr.LoadConfig <SeaTruckConfig>(); Console.WriteLine($"[UnSlowSeaTruck] Configured WeightOverride: {Config.WeightOverride}"); Harmony.CreateAndPatchAll(assembly, $"com.{assembly.GetName().Name}.psmod"); ConfigMgr.SaveConfig(Config); }