diff --git a/Projects/MadGamesTycoon2/.vs/MadGamesTycoon2/v16/.suo b/Projects/MadGamesTycoon2/.vs/MadGamesTycoon2/v16/.suo
deleted file mode 100644
index 671294f..0000000
Binary files a/Projects/MadGamesTycoon2/.vs/MadGamesTycoon2/v16/.suo and /dev/null differ
diff --git a/Projects/MadGamesTycoon2/AgainstTheStorm.sln.DotSettings.user b/Projects/MadGamesTycoon2/AgainstTheStorm.sln.DotSettings.user
new file mode 100644
index 0000000..38dd5c1
--- /dev/null
+++ b/Projects/MadGamesTycoon2/AgainstTheStorm.sln.DotSettings.user
@@ -0,0 +1,28 @@
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
\ No newline at end of file
diff --git a/Projects/MadGamesTycoon2/DustlandDelivery.sln.DotSettings.user b/Projects/MadGamesTycoon2/DustlandDelivery.sln.DotSettings.user
new file mode 100644
index 0000000..0d4d5ac
--- /dev/null
+++ b/Projects/MadGamesTycoon2/DustlandDelivery.sln.DotSettings.user
@@ -0,0 +1,33 @@
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
\ No newline at end of file
diff --git a/Projects/MadGamesTycoon2/MadGamesTycoon2.sln b/Projects/MadGamesTycoon2/MadGamesTycoon2.sln
index 3187337..58307bf 100644
--- a/Projects/MadGamesTycoon2/MadGamesTycoon2.sln
+++ b/Projects/MadGamesTycoon2/MadGamesTycoon2.sln
@@ -1,16 +1,16 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CykaMod", "CykaMod\CykaMod.csproj", "{06AA059A-C853-42AD-BBF8-122CFB2EEA29}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {06AA059A-C853-42AD-BBF8-122CFB2EEA29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {06AA059A-C853-42AD-BBF8-122CFB2EEA29}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {06AA059A-C853-42AD-BBF8-122CFB2EEA29}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {06AA059A-C853-42AD-BBF8-122CFB2EEA29}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MadGamesTycoon2", "MadGamesTycoon2\MadGamesTycoon2.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/MadGamesTycoon2/MadGamesTycoon2.sln.DotSettings.user b/Projects/MadGamesTycoon2/MadGamesTycoon2.sln.DotSettings.user
index 70cdd43..ca3e99b 100644
--- a/Projects/MadGamesTycoon2/MadGamesTycoon2.sln.DotSettings.user
+++ b/Projects/MadGamesTycoon2/MadGamesTycoon2.sln.DotSettings.user
@@ -1,16 +1,39 @@
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- True
- <AssemblyExplorer>
- <Assembly Path="C:\Users\Administrator\RiderProjects\Bepinex\Projects\MadGamesTycoon2\CykaMod\Libraries\Assembly-CSharp.dll" />
- <Assembly Path="C:\Users\Administrator\Seafile\Backup-Projects-Rider\RiderProjects\Bepinex\Projects\MadGamesTycoon2\CykaMod\libs\0Harmony.dll" />
-</AssemblyExplorer>
\ No newline at end of file
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
\ No newline at end of file
diff --git a/Projects/MadGamesTycoon2/MadGamesTycoon2/Class1.cs b/Projects/MadGamesTycoon2/MadGamesTycoon2/Class1.cs
index 225c4dc..122801f 100644
--- a/Projects/MadGamesTycoon2/MadGamesTycoon2/Class1.cs
+++ b/Projects/MadGamesTycoon2/MadGamesTycoon2/Class1.cs
@@ -10,8 +10,8 @@ using HarmonyLib.Tools;
namespace CykaMod {
[BepInPlugin(pluginGuid, pluginName, pluginVersion)]
public class Main : BaseUnityPlugin {
- private const string pluginGuid = "CykaMod";
- private const string pluginName = "CykaMod";
+ private const string pluginGuid = "MadGamesTycoon2";
+ private const string pluginName = "MadGamesTycoon2";
private const string pluginVersion = "1.0.0";
public static ConfigEntry skillCap;
@@ -142,7 +142,7 @@ namespace CykaMod {
for (var i = codes.Count - 1; i > 0; i--) {
if (codes[i].opcode == OpCodes.Ldc_I4_3) {
Console.WriteLine("Changing " + codes[i]);
- codes[i] = new CodeInstruction(OpCodes.Ldc_I4, 64);
+ codes[i] = new CodeInstruction(OpCodes.Ldc_I4, 9);
Console.WriteLine("Changed " + codes[i]);
break;
}
diff --git a/Projects/MadGamesTycoon2/MadGamesTycoon2/MadGamesTycoon2.csproj b/Projects/MadGamesTycoon2/MadGamesTycoon2/MadGamesTycoon2.csproj
index 4460980..3294e5d 100644
--- a/Projects/MadGamesTycoon2/MadGamesTycoon2/MadGamesTycoon2.csproj
+++ b/Projects/MadGamesTycoon2/MadGamesTycoon2/MadGamesTycoon2.csproj
@@ -33,9 +33,7 @@
-
-
@@ -47,6 +45,9 @@
..\libs\BepInEx.dll
+
+ ..\libs\ConfigurationManager.dll
+
..\libs\UnityEngine.dll
diff --git a/Projects/MadGamesTycoon2/MadGamesTycoon2/Properties/AssemblyInfo.cs b/Projects/MadGamesTycoon2/MadGamesTycoon2/Properties/AssemblyInfo.cs
index a74bfd2..e756fd4 100644
--- a/Projects/MadGamesTycoon2/MadGamesTycoon2/Properties/AssemblyInfo.cs
+++ b/Projects/MadGamesTycoon2/MadGamesTycoon2/Properties/AssemblyInfo.cs
@@ -4,11 +4,11 @@ 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("CykaMod")]
+[assembly: AssemblyTitle("Regiments")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("CykaMod")]
+[assembly: AssemblyProduct("Regiments")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -19,7 +19,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("06AA059A-C853-42AD-BBF8-122CFB2EEA29")]
+[assembly: Guid("DA9D274E-486F-4F82-84FF-CD9388CB0B09")]
// Version information for an assembly consists of the following four values:
//
diff --git a/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/Assembly-CSharp.dll b/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/Assembly-CSharp.dll
index bf87270..5a5ab98 100644
Binary files a/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/Assembly-CSharp.dll and b/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/Assembly-CSharp.dll differ
diff --git a/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/BepInEx.dll b/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/BepInEx.dll
index 8235e6f..2cb66f8 100644
Binary files a/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/BepInEx.dll and b/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/BepInEx.dll differ
diff --git a/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/ConfigurationManager.dll b/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/ConfigurationManager.dll
new file mode 100644
index 0000000..9f55bad
Binary files /dev/null and b/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/ConfigurationManager.dll differ
diff --git a/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/Sirenix.Serialization.dll b/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/Sirenix.Serialization.dll
new file mode 100644
index 0000000..9d7b6f5
Binary files /dev/null and b/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/Sirenix.Serialization.dll differ
diff --git a/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/UnityEngine.CoreModule.dll b/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/UnityEngine.CoreModule.dll
index 2318d76..22b4309 100644
Binary files a/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/UnityEngine.CoreModule.dll and b/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/UnityEngine.CoreModule.dll differ
diff --git a/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/UnityEngine.dll b/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/UnityEngine.dll
index 0aec466..ec505d8 100644
Binary files a/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/UnityEngine.dll and b/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/UnityEngine.dll differ
diff --git a/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/copyLibs.sh b/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/copyLibs.sh
index 29aad78..3c58797 100644
--- a/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/copyLibs.sh
+++ b/Projects/MadGamesTycoon2/MadGamesTycoon2/libs/copyLibs.sh
@@ -1 +1 @@
-for lib in $(cat libs.txt); do find 'C:\Program Files (x86)\Steam\steamapps\common\Mad Games Tycoon 2' -name "$lib" | sed 's|\\|/|g' | xargs -I% -- cp '%' .; done
+for lib in $(cat libs.txt); do find $1 -name "$lib" | sed 's|\\|/|g' | xargs -I% -- cp '%' .; done
diff --git a/Projects/MadGamesTycoon2/Regiments.sln.DotSettings.user b/Projects/MadGamesTycoon2/Regiments.sln.DotSettings.user
new file mode 100644
index 0000000..caf3465
--- /dev/null
+++ b/Projects/MadGamesTycoon2/Regiments.sln.DotSettings.user
@@ -0,0 +1,21 @@
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
\ No newline at end of file
diff --git a/Projects/MadGamesTycoon2/deploy.sh b/Projects/MadGamesTycoon2/deploy.sh
new file mode 100644
index 0000000..c27608f
--- /dev/null
+++ b/Projects/MadGamesTycoon2/deploy.sh
@@ -0,0 +1 @@
+cp 'C:/Users/Administrator/RiderProjects/Bepinex/Projects/Regiments/Regiments/obj/Release/Regiments.dll' 'C:/Program Files (x86)/Steam/steamapps/common/Regiments/BepInEx/plugins'
\ No newline at end of file
diff --git a/Projects/MadGamesTycoon2/libs/0Harmony.dll b/Projects/MadGamesTycoon2/libs/0Harmony.dll
new file mode 100644
index 0000000..99daef7
Binary files /dev/null and b/Projects/MadGamesTycoon2/libs/0Harmony.dll differ
diff --git a/Projects/MadGamesTycoon2/libs/Assembly-CSharp.dll b/Projects/MadGamesTycoon2/libs/Assembly-CSharp.dll
new file mode 100644
index 0000000..bf87270
Binary files /dev/null and b/Projects/MadGamesTycoon2/libs/Assembly-CSharp.dll differ
diff --git a/Projects/MadGamesTycoon2/libs/BepInEx.dll b/Projects/MadGamesTycoon2/libs/BepInEx.dll
new file mode 100644
index 0000000..8235e6f
Binary files /dev/null and b/Projects/MadGamesTycoon2/libs/BepInEx.dll differ
diff --git a/Projects/MadGamesTycoon2/libs/ConfigurationManager.dll b/Projects/MadGamesTycoon2/libs/ConfigurationManager.dll
new file mode 100644
index 0000000..6845cbf
Binary files /dev/null and b/Projects/MadGamesTycoon2/libs/ConfigurationManager.dll differ
diff --git a/Projects/MadGamesTycoon2/libs/UnityEngine.CoreModule.dll b/Projects/MadGamesTycoon2/libs/UnityEngine.CoreModule.dll
new file mode 100644
index 0000000..2318d76
Binary files /dev/null and b/Projects/MadGamesTycoon2/libs/UnityEngine.CoreModule.dll differ
diff --git a/Projects/MadGamesTycoon2/libs/UnityEngine.dll b/Projects/MadGamesTycoon2/libs/UnityEngine.dll
new file mode 100644
index 0000000..0aec466
Binary files /dev/null and b/Projects/MadGamesTycoon2/libs/UnityEngine.dll differ
diff --git a/Projects/MadGamesTycoon2/libs/copyLibs.sh b/Projects/MadGamesTycoon2/libs/copyLibs.sh
new file mode 100644
index 0000000..29aad78
--- /dev/null
+++ b/Projects/MadGamesTycoon2/libs/copyLibs.sh
@@ -0,0 +1 @@
+for lib in $(cat libs.txt); do find 'C:\Program Files (x86)\Steam\steamapps\common\Mad Games Tycoon 2' -name "$lib" | sed 's|\\|/|g' | xargs -I% -- cp '%' .; done
diff --git a/Projects/MadGamesTycoon2/libs/libs.txt b/Projects/MadGamesTycoon2/libs/libs.txt
new file mode 100644
index 0000000..02f19f0
--- /dev/null
+++ b/Projects/MadGamesTycoon2/libs/libs.txt
@@ -0,0 +1,6 @@
+0Harmony.dll
+Assembly-CSharp.dll
+BepInEx.dll
+ConfigurationManager.dll
+UnityEngine.CoreModule.dll
+UnityEngine.dll
\ No newline at end of file
diff --git a/Projects/MadGamesTycoon2/test123 b/Projects/MadGamesTycoon2/test123
new file mode 100644
index 0000000..e69de29
diff --git a/Projects/MadGamesTycoon2/.gitignore b/Projects/MadGamesTycoon2Broken/.gitignore
similarity index 100%
rename from Projects/MadGamesTycoon2/.gitignore
rename to Projects/MadGamesTycoon2Broken/.gitignore
diff --git a/Projects/MadGamesTycoon2Broken/MadGamesTycoon2.sln b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2.sln
new file mode 100644
index 0000000..2d673b4
--- /dev/null
+++ b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2.sln
@@ -0,0 +1,16 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MadGamesTycoon2", "MadGamesTycoon2\MadGamesTycoon2.csproj", "{06AA059A-C853-42AD-BBF8-122CFB2EEA29}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {06AA059A-C853-42AD-BBF8-122CFB2EEA29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {06AA059A-C853-42AD-BBF8-122CFB2EEA29}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {06AA059A-C853-42AD-BBF8-122CFB2EEA29}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {06AA059A-C853-42AD-BBF8-122CFB2EEA29}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/Projects/MadGamesTycoon2Broken/MadGamesTycoon2.sln.DotSettings.user b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2.sln.DotSettings.user
new file mode 100644
index 0000000..9a5fd41
--- /dev/null
+++ b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2.sln.DotSettings.user
@@ -0,0 +1,22 @@
+
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ True
+ <AssemblyExplorer>
+ <Assembly Path="C:\Users\Administrator\RiderProjects\Bepinex\Projects\MadGamesTycoon2\CykaMod\Libraries\Assembly-CSharp.dll" />
+ <Assembly Path="C:\Users\Administrator\Seafile\Backup-Projects-Rider\RiderProjects\Bepinex\Projects\MadGamesTycoon2\CykaMod\libs\0Harmony.dll" />
+</AssemblyExplorer>
\ No newline at end of file
diff --git a/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/Class1.cs b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/Class1.cs
new file mode 100644
index 0000000..36dd2a5
--- /dev/null
+++ b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/Class1.cs
@@ -0,0 +1,274 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection.Emit;
+using BepInEx;
+using BepInEx.Configuration;
+using HarmonyLib;
+using HarmonyLib.Tools;
+
+namespace CykaMod {
+ [BepInPlugin(pluginGuid, pluginName, pluginVersion)]
+ public class Main : BaseUnityPlugin {
+ private const string pluginGuid = "MadGamesTycoon2";
+ private const string pluginName = "MadGamesTycoon2";
+ private const string pluginVersion = "1.0.0";
+
+ public static ConfigEntry skillCap;
+ public static ConfigEntry workSpeed;
+ public static ConfigEntry workResult;
+ public static ConfigEntry alwaysCritical;
+ public static ConfigEntry gameSpeed;
+ public static ConfigEntry fans;
+ public static ConfigEntry money;
+
+ //
+ // private void Awake()
+ // {
+ // configGreeting = Config.Bind("General", // The section under which the option is shown
+ // "GreetingText", // The key of the configuration option in the configuration file
+ // "Hello, world!", // The default value
+ // "A greeting text to show when the game is launched"); // Description of the option to show in the config file
+ //
+
+ public void Awake() {
+ skillCap = Config.Bind("General", "Skill Cap", 100f);
+ workSpeed = Config.Bind("General", "Work Speed Multiplier", 4f);
+ workResult = Config.Bind("General", "Work Result Multiplier", 4f);
+ alwaysCritical = Config.Bind("General", "Work Always Critical", false);
+ gameSpeed = Config.Bind("General", "Game Speed Multiplier", 3f);
+ fans = Config.Bind("General", "Fans Multiplier", 2);
+ money = Config.Bind("General", "Money Multiplier", 2L);
+
+ 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");
+ }
+
+ public static bool IsMatch(List codes, int index, List matcher) {
+ for (var i = 0; i < matcher.Count; i++) {
+ if (codes[index + i].opcode != matcher[i].opcode) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public static void InsertAt(List codes, int index, List toInsert) {
+ for (var i = 0; i < toInsert.Count; i++) {
+ codes.Insert(index + i, toInsert[i]);
+ }
+ }
+ }
+
+ [HarmonyPatch(typeof(characterScript), "GetSkillCap")]
+ public class SkillCapPatch {
+ static void Postfix(ref float __result) {
+ // Console.WriteLine("GetSkillCap Postfix! Result is " + __result);
+ __result = Main.skillCap.Value;
+ }
+ }
+
+ [HarmonyPatch(typeof(characterScript), "GetSkillCap_Skill")]
+ public class SkillCapSkillPatch {
+ static void Postfix(ref float __result) {
+ // Console.WriteLine("GetSkillCap_Skill Postfix! Result is " + __result);
+ __result = Main.skillCap.Value;
+ }
+ }
+
+ [HarmonyPatch(typeof(characterScript), "GetWorkSpeed")]
+ public class GetWorkSpeedPatch {
+ static void Postfix(ref float __result) {
+ // Console.WriteLine("GetWorkSpeed Postfix! Result is " + __result);
+ __result *= Main.workSpeed.Value;
+ }
+ }
+
+ [HarmonyPatch(typeof(characterScript), "GetWorkResult")]
+ public class GetWorkResultPatch {
+ static void Prefix(ref float f) {
+ // Console.WriteLine("GetWorkResult Postfix! f is " + f);
+ f *= Main.workResult.Value;
+ }
+ }
+
+ [HarmonyPatch(typeof(characterScript), "GetCritic")]
+ public class GetCriticPatch {
+ static void Postfix(ref bool __result) {
+ // Console.WriteLine("GetWorkResult Postfix! f is " + f);
+ if (Main.alwaysCritical.Value) {
+ __result = true;
+ }
+ }
+ }
+
+ [HarmonyPatch(typeof(mainScript), "SetGameSpeed")]
+ public class GameSpeedPatch {
+ static void Prefix(ref float f) {
+ // Console.WriteLine("SetGameSpeed Prefix! Argument is " + f);
+ if (f > 1) {
+ f *= Main.gameSpeed.Value;
+ // Console.WriteLine("Argument modified to " + f);
+ }
+ }
+ }
+
+ [HarmonyPatch(typeof(characterScript), "Learn")]
+ public static class LearnManyPatch {
+ static IEnumerable Transpiler(IEnumerable instructions) {
+ var codes = new List(instructions);
+
+ for (var i = 0; i < 5; i++) {
+ if (codes[i].opcode == OpCodes.Ldc_R4) {
+ Console.WriteLine("Changing " + codes[i]);
+ codes[i].operand = (float)codes[i].operand * 64;
+ Console.WriteLine("Changed " + codes[i]);
+ }
+ }
+
+ return codes.AsEnumerable();
+ }
+ }
+
+ [HarmonyPatch(typeof(arbeitsmarkt), "ArbeitsmarktUpdaten")]
+ public static class ManyEmployeesPatch {
+ static IEnumerable Transpiler(IEnumerable instructions) {
+ var codes = new List(instructions);
+
+ for (var i = codes.Count - 1; i > 0; i--) {
+ if (codes[i].opcode == OpCodes.Ldc_I4_3) {
+ Console.WriteLine("Changing " + codes[i]);
+ codes[i] = new CodeInstruction(OpCodes.Ldc_I4, 64);
+ Console.WriteLine("Changed " + codes[i]);
+ break;
+ }
+ }
+
+ return codes.AsEnumerable();
+ }
+ }
+
+ // [HarmonyPatch(typeof(AILerp), "MovementUpdate")]
+ public class MovementSpeedPatch {
+ static void Prefix(ref float deltaTime) {
+ Console.WriteLine("MovementUpdate Prefix! deltaTime is " + deltaTime);
+ deltaTime *= 16f;
+ }
+ }
+
+ // [HarmonyPatch(typeof(movementScript), "Move")]
+ public static class EmployeeMovementSpeedPatch {
+ static IEnumerable Transpiler(IEnumerable instructions) {
+ var codes = new List(instructions);
+
+ List matcher = new List();
+ matcher.Add(new CodeInstruction(OpCodes.Ldarg_0, null));
+ matcher.Add(new CodeInstruction(OpCodes.Ldfld, null));
+ matcher.Add(new CodeInstruction(OpCodes.Ldarg_0, null));
+ matcher.Add(new CodeInstruction(OpCodes.Ldfld, null));
+ matcher.Add(new CodeInstruction(OpCodes.Mul, null));
+
+ List patch = new List();
+ patch.Add(new CodeInstruction(OpCodes.Ldc_R4, 8));
+ patch.Add(new CodeInstruction(OpCodes.Mul, null));
+
+ for (var i = codes.Count - 1; i > 0; i--) {
+ if (Main.IsMatch(codes, i, matcher)) {
+ Main.InsertAt(codes, i + 5, patch);
+ Console.WriteLine("Movement speed patched");
+ for (var j = 0; j < 15; j++) {
+ Console.WriteLine(codes[i + j]);
+ }
+ break;
+ }
+ }
+ Console.WriteLine("Return");
+ return codes.AsEnumerable();
+ }
+ }
+
+ [HarmonyPatch(typeof(mainScript), "WochenUpdates")]
+ public static class ContractWorkAmount {
+ static IEnumerable Transpiler(IEnumerable instructions) {
+ var codes = new List(instructions);
+ int methodIndex = -1;
+ List pattern = new List();
+
+ List matcher = new List();
+ matcher.Add(new CodeInstruction(OpCodes.Ldarg_0, null));
+ matcher.Add(new CodeInstruction(OpCodes.Ldfld, null));
+ matcher.Add(new CodeInstruction(OpCodes.Ldc_I4_0, null));
+ matcher.Add(new CodeInstruction(OpCodes.Callvirt, null));
+
+ for (var i = 0; i < codes.Count; i++) {
+ if (codes[i].operand != null) {
+ if (codes[i].operand.ToString().Contains("UpdateContractWork")) {
+ methodIndex = i;
+ pattern.Add(codes[i - 3]);
+ pattern.Add(codes[i - 2]);
+ pattern.Add(codes[i - 1]);
+ pattern.Add(codes[i]);
+ break;
+ }
+ }
+ }
+ pattern[2].opcode = OpCodes.Ldc_I4_1;
+
+ for (int i = 0; i < 16; i++) {
+ for (int j = 0; j < pattern.Count; j++) {
+ codes.Insert(methodIndex + i + j, pattern[j]);
+ }
+ }
+
+ return codes.AsEnumerable();
+ }
+ }
+
+ [HarmonyPatch(typeof(platformScript), "SellPlayer")]
+ public static class ConsoleProductionReductionPatch {
+ static IEnumerable Transpiler(IEnumerable instructions) {
+ var codes = new List(instructions);
+
+ List matcher = new List();
+ matcher.Add(new CodeInstruction(OpCodes.Ldarg_0, null));
+ matcher.Add(new CodeInstruction(OpCodes.Ldarg_0, null));
+ matcher.Add(new CodeInstruction(OpCodes.Ldfld, null));
+ matcher.Add(new CodeInstruction(OpCodes.Ldc_R4, null));
+ matcher.Add(new CodeInstruction(OpCodes.Ldc_R4, null));
+ matcher.Add(new CodeInstruction(OpCodes.Call, null));
+ matcher.Add(new CodeInstruction(OpCodes.Add, null));
+ matcher.Add(new CodeInstruction(OpCodes.Stfld, null));
+
+ for (var i = 0; i < codes.Count; i++) {
+ if (Main.IsMatch(codes, i, matcher)) {
+ codes[i + 3].operand = (float)codes[i + 3].operand * 8f;
+ codes[i + 4].operand = (float)codes[i + 4].operand * 8f;
+ Console.WriteLine("ConsoleProductionReductionPatch patched");
+ break;
+ }
+ }
+
+ return codes.AsEnumerable();
+ }
+ }
+
+ [HarmonyPatch(typeof(mainScript), "AddFans")]
+ public static class AddFansPatch {
+ static void Prefix(ref int i) {
+ // Console.WriteLine("GetWorkResult Postfix! f is " + f);
+ i *= Main.fans.Value;
+ }
+ }
+
+ [HarmonyPatch(typeof(mainScript), "Earn")]
+ public static class AddMoneyPatch {
+ static void Prefix(ref long amount) {
+ // Console.WriteLine("GetWorkResult Postfix! f is " + f);
+ amount *= Main.money.Value;
+ }
+ }
+}
diff --git a/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/MadGamesTycoon2.csproj b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/MadGamesTycoon2.csproj
new file mode 100644
index 0000000..b6b9a1a
--- /dev/null
+++ b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/MadGamesTycoon2.csproj
@@ -0,0 +1,66 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {06AA059A-C853-42AD-BBF8-122CFB2EEA29}
+ Library
+ Properties
+ CykaMod
+ MadGamesTycoon2
+ v4.0
+ 512
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+ libs\0Harmony.dll
+
+
+ libs\Assembly-CSharp.dll
+
+
+ libs\BepInEx.dll
+
+
+ libs\ConfigurationManager.dll
+
+
+ libs\UnityEngine.dll
+
+
+ libs\UnityEngine.CoreModule.dll
+
+
+
+
+
\ No newline at end of file
diff --git a/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/Properties/AssemblyInfo.cs b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..e890737
--- /dev/null
+++ b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/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("MadGamesTycoon2")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MadGamesTycoon2")]
+[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("06AA059A-C853-42AD-BBF8-122CFB2EEA29")]
+
+// 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")]
diff --git a/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/0Harmony.dll b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/0Harmony.dll
new file mode 100644
index 0000000..99daef7
Binary files /dev/null and b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/0Harmony.dll differ
diff --git a/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/Assembly-CSharp.dll b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/Assembly-CSharp.dll
new file mode 100644
index 0000000..bf87270
Binary files /dev/null and b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/Assembly-CSharp.dll differ
diff --git a/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/BepInEx.dll b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/BepInEx.dll
new file mode 100644
index 0000000..8235e6f
Binary files /dev/null and b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/BepInEx.dll differ
diff --git a/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/ConfigurationManager.dll b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/ConfigurationManager.dll
new file mode 100644
index 0000000..6845cbf
Binary files /dev/null and b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/ConfigurationManager.dll differ
diff --git a/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/UnityEngine.CoreModule.dll b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/UnityEngine.CoreModule.dll
new file mode 100644
index 0000000..2318d76
Binary files /dev/null and b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/UnityEngine.CoreModule.dll differ
diff --git a/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/UnityEngine.dll b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/UnityEngine.dll
new file mode 100644
index 0000000..0aec466
Binary files /dev/null and b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/UnityEngine.dll differ
diff --git a/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/copyLibs.sh b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/copyLibs.sh
new file mode 100644
index 0000000..29aad78
--- /dev/null
+++ b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/copyLibs.sh
@@ -0,0 +1 @@
+for lib in $(cat libs.txt); do find 'C:\Program Files (x86)\Steam\steamapps\common\Mad Games Tycoon 2' -name "$lib" | sed 's|\\|/|g' | xargs -I% -- cp '%' .; done
diff --git a/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/libs.txt b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/libs.txt
new file mode 100644
index 0000000..02f19f0
--- /dev/null
+++ b/Projects/MadGamesTycoon2Broken/MadGamesTycoon2/libs/libs.txt
@@ -0,0 +1,6 @@
+0Harmony.dll
+Assembly-CSharp.dll
+BepInEx.dll
+ConfigurationManager.dll
+UnityEngine.CoreModule.dll
+UnityEngine.dll
\ No newline at end of file