diff --git a/Projects/TavernMaster/AirportCEO.sln.DotSettings.user b/Projects/TavernMaster/AirportCEO.sln.DotSettings.user new file mode 100644 index 0000000..4c6b6d4 --- /dev/null +++ b/Projects/TavernMaster/AirportCEO.sln.DotSettings.user @@ -0,0 +1,4 @@ + + <AssemblyExplorer> + <Assembly Path="C:\Users\Administrator\RiderProjects\Bepinex\Projects\SupermarketTogether\SupermarketTogether\bin\Release\Assembly-CSharp.dll" /> +</AssemblyExplorer> \ No newline at end of file diff --git a/Projects/TavernMaster/SupermarketSimulator.sln.DotSettings.user b/Projects/TavernMaster/SupermarketSimulator.sln.DotSettings.user new file mode 100644 index 0000000..4c6b6d4 --- /dev/null +++ b/Projects/TavernMaster/SupermarketSimulator.sln.DotSettings.user @@ -0,0 +1,4 @@ + + <AssemblyExplorer> + <Assembly Path="C:\Users\Administrator\RiderProjects\Bepinex\Projects\SupermarketTogether\SupermarketTogether\bin\Release\Assembly-CSharp.dll" /> +</AssemblyExplorer> \ No newline at end of file diff --git a/Projects/TavernMaster/SupermarketTogether.sln.DotSettings.user b/Projects/TavernMaster/SupermarketTogether.sln.DotSettings.user new file mode 100644 index 0000000..4c6b6d4 --- /dev/null +++ b/Projects/TavernMaster/SupermarketTogether.sln.DotSettings.user @@ -0,0 +1,4 @@ + + <AssemblyExplorer> + <Assembly Path="C:\Users\Administrator\RiderProjects\Bepinex\Projects\SupermarketTogether\SupermarketTogether\bin\Release\Assembly-CSharp.dll" /> +</AssemblyExplorer> \ No newline at end of file diff --git a/Projects/TavernMaster/TavernMaster.sln b/Projects/TavernMaster/TavernMaster.sln new file mode 100644 index 0000000..fc46fa1 --- /dev/null +++ b/Projects/TavernMaster/TavernMaster.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TavernMaster", "TavernMaster\TavernMaster.csproj", "{DA9D274E-486F-4F82-84FF-CD9388CB0B09}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DA9D274E-486F-4F82-84FF-CD9388CB0B09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DA9D274E-486F-4F82-84FF-CD9388CB0B09}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DA9D274E-486F-4F82-84FF-CD9388CB0B09}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DA9D274E-486F-4F82-84FF-CD9388CB0B09}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/Projects/TavernMaster/TavernMaster.sln.DotSettings.user b/Projects/TavernMaster/TavernMaster.sln.DotSettings.user new file mode 100644 index 0000000..4c6b6d4 --- /dev/null +++ b/Projects/TavernMaster/TavernMaster.sln.DotSettings.user @@ -0,0 +1,4 @@ + + <AssemblyExplorer> + <Assembly Path="C:\Users\Administrator\RiderProjects\Bepinex\Projects\SupermarketTogether\SupermarketTogether\bin\Release\Assembly-CSharp.dll" /> +</AssemblyExplorer> \ No newline at end of file diff --git a/Projects/TavernMaster/TavernMaster/.editorconfig b/Projects/TavernMaster/TavernMaster/.editorconfig new file mode 100644 index 0000000..7e98c67 --- /dev/null +++ b/Projects/TavernMaster/TavernMaster/.editorconfig @@ -0,0 +1,6 @@ +# CSharp formatting rules: +[*.cs] +csharp_new_line_before_open_brace = none +csharp_new_line_before_else = false +csharp_new_line_before_catch = false +csharp_new_line_before_finally = false \ No newline at end of file diff --git a/Projects/TavernMaster/TavernMaster/Properties/AssemblyInfo.cs b/Projects/TavernMaster/TavernMaster/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..7b22a2f --- /dev/null +++ b/Projects/TavernMaster/TavernMaster/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("DaveCEO")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("DaveCEO")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("DA9D274E-486F-4F82-84FF-CD9388CB0B09")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/Projects/TavernMaster/TavernMaster/TavernDave.cs b/Projects/TavernMaster/TavernMaster/TavernDave.cs new file mode 100644 index 0000000..9fa95d7 --- /dev/null +++ b/Projects/TavernMaster/TavernMaster/TavernDave.cs @@ -0,0 +1,41 @@ +using System.Linq; +using BepInEx; +using BepInEx.Configuration; +using HarmonyLib; +using HarmonyLib.Tools; + +namespace TavernDave { + [BepInPlugin(pluginGuid, pluginName, pluginVersion)] + public class Main : BaseUnityPlugin { + private const string pluginGuid = "TavernDave"; + private const string pluginName = "TavernDave"; + private const string pluginVersion = "1.0.0"; + + public static ConfigEntry moneyMultiplier; + + public void Awake() { + moneyMultiplier = Config.Bind("General", "MoneyMultiplier", 1f); + + Logger.LogInfo("Cyka mod loaded"); + HarmonyFileLog.Enabled = true; + Harmony harmony = new Harmony(pluginGuid); + harmony.PatchAll(); + var originalMethods = harmony.GetPatchedMethods(); + Logger.LogInfo("Patched " + originalMethods.Count() + " methods"); + foreach (var method in originalMethods) { + Logger.LogInfo("Patched " + method.Name); + } + } + } + + [HarmonyPatch] + public class Patches { + [HarmonyPrefix] + [HarmonyPatch(typeof(TavernModel), "ChangeMoney")] + public static void Prefix(ref int value) { + if (value > 0) { + value = (int)(value * Main.moneyMultiplier.Value); + } + } + } +} \ No newline at end of file diff --git a/Projects/TavernMaster/TavernMaster/TavernMaster.csproj b/Projects/TavernMaster/TavernMaster/TavernMaster.csproj new file mode 100644 index 0000000..9c4eb54 --- /dev/null +++ b/Projects/TavernMaster/TavernMaster/TavernMaster.csproj @@ -0,0 +1,62 @@ + + + + + C:/Games/Tavern Master + $(GAME_DIR)/Tavern Master_Data/Managed + $(GAME_DIR)/BepInEx + Debug + AnyCPU + {DA9D274E-486F-4F82-84FF-CD9388CB0B09} + Library + Properties + TavernDave + TavernDave + v4.8.1 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + $(GAME_BEPINEX)/core/0Harmony.dll + + + $(GAME_BEPINEX)/core/BepInEx.dll + + + $(GAME_BEPINEX)/plugins/ConfigurationManager/ConfigurationManager.dll + + + $(GAME_MANAGED)/Assembly-CSharp.dll + + + $(GAME_MANAGED)/UnityEngine.dll + + + $(GAME_MANAGED)/UnityEngine.CoreModule.dll + + + + diff --git a/Projects/TavernMaster/TavernMaster/sync b/Projects/TavernMaster/TavernMaster/sync new file mode 100644 index 0000000..442317f --- /dev/null +++ b/Projects/TavernMaster/TavernMaster/sync @@ -0,0 +1 @@ +bin/Release/TavernDave.dll,"C:\Games\Tavern Master\BepInEx\plugins\TavernDave.dll" \ No newline at end of file