From 2f42e410e8edf480c1529f3db19fcb0fd98d5148 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Thu, 26 Sep 2024 14:35:55 +0200 Subject: [PATCH] Update airportceo --- Projects/AirportCEO/AirportCEO/DaveCEO.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Projects/AirportCEO/AirportCEO/DaveCEO.cs b/Projects/AirportCEO/AirportCEO/DaveCEO.cs index 823eca7..c8cb8e6 100644 --- a/Projects/AirportCEO/AirportCEO/DaveCEO.cs +++ b/Projects/AirportCEO/AirportCEO/DaveCEO.cs @@ -1,4 +1,5 @@ -using System.Linq; +using System; +using System.Linq; using BepInEx; using BepInEx.Configuration; using HarmonyLib; @@ -11,11 +12,11 @@ namespace DaveCEO { private const string pluginGuid = "DaveCEO"; private const string pluginName = "DaveCEO"; private const string pluginVersion = "1.0.0"; - - public static ConfigEntry spawnTimer; + + public static ConfigEntry moneyMultiplier; public void Awake() { - spawnTimer = Config.Bind("General", "SpawnTimer", 10f); + moneyMultiplier = Config.Bind("General", "MoneyMultiplier", 1f); Logger.LogInfo("Cyka mod loaded"); HarmonyFileLog.Enabled = true; @@ -28,4 +29,13 @@ namespace DaveCEO { } } } + + [HarmonyPatch] + public class Patches { + [HarmonyPrefix] + [HarmonyPatch(typeof(EconomyController), "AddFunds")] + public static void Prefix(ref float sum) { + sum *= Main.moneyMultiplier.Value; + } + } } \ No newline at end of file