From 67d1d90db2778155a0e90473dc2746e9ae4520d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Majdand=C5=BEi=C4=87?= Date: Wed, 17 Apr 2024 13:23:24 +0200 Subject: [PATCH] Add house flipper mods --- Projects/HouseFlipper/HouseFlipper.sln | 16 +++ .../HouseFlipper/BeamPropertiesManager.cs | 79 ++++++++++++ Projects/HouseFlipper/HouseFlipper/Class1.cs | 121 ++++++++++++++++++ .../HouseFlipper/FuelPropertiesManager.cs | 55 ++++++++ .../GeneratorPropertiesManager.cs | 58 +++++++++ .../HomingAndVelocityProjectilePatch.cs | 22 ++++ .../HouseFlipper/HouseFlipper.csproj | 78 +++++++++++ .../HouseFlipper/MagnetPropertiesManager.cs | 81 ++++++++++++ .../HouseFlipper/MinerPropertiesManager.cs | 86 +++++++++++++ Projects/HouseFlipper/HouseFlipper/Patches.cs | 24 ++++ .../HouseFlipper/Properties/AssemblyInfo.cs | 35 +++++ .../HouseFlipper/SeekingProjectileManager.cs | 24 ++++ .../HouseFlipper/ThrusterPropertiesManager.cs | 89 +++++++++++++ .../HouseFlipper/WeaponPropertiesManager.cs | 51 ++++++++ .../HouseFlipper/WheelPropertiesManager.cs | 63 +++++++++ .../WirelessChargerPropertiesManager.cs | 60 +++++++++ ...amework,Version=v4.8.AssemblyAttributes.cs | 4 + ...ouseFlipper.csproj.AssemblyReference.cache | Bin 0 -> 13136 bytes ...le_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs | 0 ...le_5937a670-0e60-4077-877b-f7221da3dda1.cs | 0 ...le_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs | 0 .../TerraTech.csproj.FileListAbsolute.txt | 11 ++ ...aTech.csprojResolveAssemblyReference.cache | Bin 0 -> 86092 bytes .../TerraTech.sln.DotSettings.user | 11 ++ Projects/HouseFlipper/libs/test.txt | 6 + 25 files changed, 974 insertions(+) create mode 100644 Projects/HouseFlipper/HouseFlipper.sln create mode 100644 Projects/HouseFlipper/HouseFlipper/BeamPropertiesManager.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/Class1.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/FuelPropertiesManager.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/GeneratorPropertiesManager.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/HomingAndVelocityProjectilePatch.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/HouseFlipper.csproj create mode 100644 Projects/HouseFlipper/HouseFlipper/MagnetPropertiesManager.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/MinerPropertiesManager.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/Patches.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/Properties/AssemblyInfo.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/SeekingProjectileManager.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/ThrusterPropertiesManager.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/WeaponPropertiesManager.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/WheelPropertiesManager.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/WirelessChargerPropertiesManager.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/obj/Debug/HouseFlipper.csproj.AssemblyReference.cache create mode 100644 Projects/HouseFlipper/HouseFlipper/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs create mode 100644 Projects/HouseFlipper/HouseFlipper/obj/Debug/TerraTech.csproj.FileListAbsolute.txt create mode 100644 Projects/HouseFlipper/HouseFlipper/obj/Debug/TerraTech.csprojResolveAssemblyReference.cache create mode 100644 Projects/HouseFlipper/TerraTech.sln.DotSettings.user create mode 100644 Projects/HouseFlipper/libs/test.txt diff --git a/Projects/HouseFlipper/HouseFlipper.sln b/Projects/HouseFlipper/HouseFlipper.sln new file mode 100644 index 0000000..19c10fa --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HouseFlipper", "HouseFlipper\HouseFlipper.csproj", "{EE5EFB7F-A4DC-44F0-967B-F71ECA2D46AE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EE5EFB7F-A4DC-44F0-967B-F71ECA2D46AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EE5EFB7F-A4DC-44F0-967B-F71ECA2D46AE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EE5EFB7F-A4DC-44F0-967B-F71ECA2D46AE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EE5EFB7F-A4DC-44F0-967B-F71ECA2D46AE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/Projects/HouseFlipper/HouseFlipper/BeamPropertiesManager.cs b/Projects/HouseFlipper/HouseFlipper/BeamPropertiesManager.cs new file mode 100644 index 0000000..0f05b08 --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper/BeamPropertiesManager.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using HarmonyLib; + +namespace TerraTech { + [HarmonyPatch] + public class BeamPropertiesManager { + private static Dictionary strenghts = new Dictionary(); + private static Dictionary radii = new Dictionary(); + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleItemHolderBeam), "OnAttached")] + static void PostfixCreate(ModuleItemHolderBeam __instance) { + // Console.WriteLine("ModuleItemHolderBeam.OnAttached"); + if (!strenghts.ContainsKey(__instance)) { + strenghts.Add(__instance, GetStrength(__instance)); + radii.Add(__instance, GetRadius(__instance)); + // Console.WriteLine("Patching {0}; m_BeamStrength: {1}; m_Pickup.m_PickupRange: {2}", __instance.name, GetStrength(__instance), GetRadius(__instance)); + DoPatchSingle(__instance); + // Console.WriteLine("Patched {0}; m_BeamStrength: {1}; m_Pickup.m_PickupRange: {2}", __instance.name, GetStrength(__instance), GetRadius(__instance)); + } + } + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleItemHolderBeam), "OnDetaching")] + static void PostfixDestroy(ModuleItemHolderBeam __instance) { + // Console.WriteLine("ModuleItemHolderBeam.OnDetaching"); + // Console.WriteLine("Restoring {0}; m_BeamStrength: {1}; m_Pickup.m_PickupRange: {2}", __instance.name, GetStrength(__instance), GetRadius(__instance)); + DoRestoreSingle(__instance); + // Console.WriteLine("Restored {0}; m_BeamStrength: {1}; m_Pickup.m_PickupRange: {2}", __instance.name, GetStrength(__instance), GetRadius(__instance)); + strenghts.Remove(__instance); + radii.Remove(__instance); + } + + public static void DoPatch() { + // Console.WriteLine("Modifying {0} ModuleItemHolderBeam", strenghts.Count); + foreach (KeyValuePair keyValuePair in strenghts) { + DoRestoreSingle(keyValuePair.Key); + DoPatchSingle(keyValuePair.Key); + } + } + + static void DoPatchSingle(ModuleItemHolderBeam moduleItemHolderBeam) { + SetStrength(moduleItemHolderBeam, strenghts[moduleItemHolderBeam] * Main.beamStrenghtMultiplier.Value); + SetRadius(moduleItemHolderBeam, radii[moduleItemHolderBeam] * Main.beamRadiusMultiplier.Value); + } + + static void DoRestoreSingle(ModuleItemHolderBeam moduleItemHolderBeam) { + if (strenghts.ContainsKey(moduleItemHolderBeam)) { + SetStrength(moduleItemHolderBeam, strenghts[moduleItemHolderBeam]); + SetRadius(moduleItemHolderBeam, radii[moduleItemHolderBeam]); + } + } + + private static float GetStrength(ModuleItemHolderBeam moduleItemHolderBeam) { + return Traverse.Create(moduleItemHolderBeam).Field("m_BeamStrength").GetValue() as float? ?? 0f; + } + + private static void SetStrength(ModuleItemHolderBeam moduleItemHolderBeam, float value) { + Traverse.Create(moduleItemHolderBeam).Field("m_BeamStrength").SetValue(value); + } + + private static float GetRadius(ModuleItemHolderBeam moduleItemHolderBeam) { + ModuleItemPickup moduleItemPickup = Traverse.Create(moduleItemHolderBeam).Field("m_Pickup").GetValue() as ModuleItemPickup; + if (moduleItemPickup) { + float radius = Traverse.Create(moduleItemPickup).Field("m_PickupRange").GetValue() as float? ?? 0f; + return radius; + } + return 0f; + } + + private static void SetRadius(ModuleItemHolderBeam moduleItemHolderBeam, float value) { + ModuleItemPickup moduleItemPickup = Traverse.Create(moduleItemHolderBeam).Field("m_Pickup").GetValue() as ModuleItemPickup; + if (moduleItemPickup) { + Traverse.Create(moduleItemPickup).Field("m_PickupRange").SetValue(value); + } + } + } +} \ No newline at end of file diff --git a/Projects/HouseFlipper/HouseFlipper/Class1.cs b/Projects/HouseFlipper/HouseFlipper/Class1.cs new file mode 100644 index 0000000..9cc05d5 --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper/Class1.cs @@ -0,0 +1,121 @@ +using System.Linq; +using BepInEx; +using BepInEx.Configuration; +using HarmonyLib; +using HarmonyLib.Tools; + +// TODO: Make shield and repair bigger +// TODO: Maybe make props faster, thrusters work fine + +namespace HouseFlipper { + [BepInPlugin(pluginGuid, pluginName, pluginVersion)] + public class Main : BaseUnityPlugin { + private const string pluginGuid = "CykaMod"; + private const string pluginName = "CykaMod"; + private const string pluginVersion = "1.0.0"; + + public static ConfigEntry xpMultiplier; + public static ConfigEntry moneyMultiplier; + public static ConfigEntry energyGenMultiplier; + public static ConfigEntry heartbeatIntervalMultiplier; + public static ConfigEntry shootingSpeedMultiplier; + public static ConfigEntry muzzleVelocityMultiplier; + public static ConfigEntry allProjectilesHoming; + public static ConfigEntry magnetStrenghtMultiplier; + public static ConfigEntry magnetRadiusMultiplier; + public static ConfigEntry beamStrenghtMultiplier; + public static ConfigEntry beamRadiusMultiplier; + public static ConfigEntry fuelTankRefillMultiplier; + public static ConfigEntry fuelTankCapacityMultiplier; + public static ConfigEntry minerGroundArea; + public static ConfigEntry minerMiningSpeed; + public static ConfigEntry wheelTorqueMultiplier; + public static ConfigEntry wheelSpeedMultiplier; + public static ConfigEntry jetThrustMultiplier; + public static ConfigEntry seekingProjectileVisionConeAngleMultiplier; + public static ConfigEntry seekingProjectileVisionRangeMultiplier; + public static ConfigEntry seekingProjectileTurningSpeedMultiplier; + public static ConfigEntry wirelessChargingRadiusMultiplier; + public static ConfigEntry wirelessChargingPowerPerArcMultiplier; + public static ConfigEntry wirelessChargingArcFiringIntervalMultiplier; + + public void Awake() { + xpMultiplier = Config.Bind("General", "XP Multiplier", 1f, new ConfigDescription("XP Multiplier", new AcceptableValueRange(1f, 32f))); + moneyMultiplier = Config.Bind("General", "Money Multiplier", 1f, + new ConfigDescription("Money Multiplier", new AcceptableValueRange(1f, 32f))); + energyGenMultiplier = Config.Bind("General", "Energy Generation Multiplier", 1f, + new ConfigDescription("Energy Generation Multiplier", new AcceptableValueRange(1f, 64f))); + heartbeatIntervalMultiplier = Config.Bind("General", "Heartbeat Interval Multiplier", 1f, + new ConfigDescription("Heartbeat Interval Multiplier", new AcceptableValueRange(0.1f, 2f))); + + shootingSpeedMultiplier = Config.Bind("Weapons", "Shooting Speed Multiplier", 1f, + new ConfigDescription("Shooting Speed Multiplier", new AcceptableValueRange(0.2f, 8f))); + muzzleVelocityMultiplier = Config.Bind("Weapons", "Muzzle Velocity Multiplier", 1f, + new ConfigDescription("Muzzle Velocity Multiplier", new AcceptableValueRange(0.2f, 32f))); + seekingProjectileVisionConeAngleMultiplier = Config.Bind("Weapons", "Seeking Projectile Cone Vision Angle Multiplier", 1f, + new ConfigDescription("Seeking Projectile Cone Vision Angle Multiplier", new AcceptableValueRange(0.2f, 32f))); + seekingProjectileVisionRangeMultiplier = Config.Bind("Weapons", "Seeking Projectile Vision Range Multiplier", 1f, + new ConfigDescription("Seeking Projectile Vision Range Multiplier", new AcceptableValueRange(0.2f, 32f))); + seekingProjectileTurningSpeedMultiplier = Config.Bind("Weapons", "Seeking Projectile Turn Speed Multiplier", 1f, + new ConfigDescription("Seeking Projectile Turn Speed Multiplier", new AcceptableValueRange(0.2f, 32f))); + + magnetStrenghtMultiplier = Config.Bind("Attractors", "Magnet Strength Multiplier", 1f, + new ConfigDescription("Magnet Strength Multiplier", new AcceptableValueRange(1f, 16f))); + magnetRadiusMultiplier = Config.Bind("Attractors", "Magnet Radius Multiplier", 1f, + new ConfigDescription("Magnet Radius Multiplier", new AcceptableValueRange(1f, 16f))); + beamStrenghtMultiplier = Config.Bind("Attractors", "Beam Strength Multiplier", 1f, + new ConfigDescription("Beam Strength Multiplier", new AcceptableValueRange(1f, 16f))); + beamRadiusMultiplier = Config.Bind("Attractors", "Beam Radius Multiplier", 1f, + new ConfigDescription("Beam Radius Multiplier", new AcceptableValueRange(1f, 16f))); + + wirelessChargingRadiusMultiplier = Config.Bind("Power", "Wireless Charger Radius Multiplier", 1f, + new ConfigDescription("Wireless Charger Radius Multiplier", new AcceptableValueRange(0.2f, 16f))); + wirelessChargingArcFiringIntervalMultiplier = Config.Bind("Power", "Wireless Charger Arc Firing Interval", 1f, + new ConfigDescription("Wireless Charger Arc Firing Interval", new AcceptableValueRange(0.02f, 16f))); + wirelessChargingPowerPerArcMultiplier = Config.Bind("Power", "Wireless Charger Power Per Arc", 1f, + new ConfigDescription("Wireless Charger Power Per Arc", new AcceptableValueRange(0.2f, 16f))); + + fuelTankRefillMultiplier = Config.Bind("Propulsion", "Fuel Tank Refill Rate Multiplier", 1f, + new ConfigDescription("Fuel Tank Refill Rate Multiplier", new AcceptableValueRange(1f, 32f))); + fuelTankCapacityMultiplier = Config.Bind("Propulsion", "Fuel Tank Capacity Multiplier", 1f, + new ConfigDescription("Fuel Tank Capacity Multiplier", new AcceptableValueRange(1f, 32f))); + wheelTorqueMultiplier = Config.Bind("Propulsion", "Wheel Torque Multiplier", 1f, + new ConfigDescription("Wheel Torque Multiplier", new AcceptableValueRange(1f, 32f))); + wheelSpeedMultiplier = Config.Bind("Propulsion", "Wheel Max RPM Multiplier", 1f, + new ConfigDescription("Wheel Max RPM Multiplier", new AcceptableValueRange(1f, 32f))); + jetThrustMultiplier = Config.Bind("Propulsion", "Jet Thrust Multiplier", 1f, + new ConfigDescription("Jet Thrust Multiplier", new AcceptableValueRange(1f, 32f))); + + minerGroundArea = Config.Bind("Production", "Miner Ground Deposit Scan Area", 1f, + new ConfigDescription("Miner Ground Deposit Scan Area", new AcceptableValueRange(1f, 32f))); + minerMiningSpeed = Config.Bind("Production", "Miner Mining Speed", 1f, + new ConfigDescription("Miner Mining Speed", new AcceptableValueRange(1f, 32f))); + + allProjectilesHoming = Config.Bind("General", "Make All Projectiles Home", false); + + shootingSpeedMultiplier.SettingChanged += (sender, args) => WeaponPropertiesManager.DoPatch(); + energyGenMultiplier.SettingChanged += (sender, args) => GeneratorPropertiesManager.DoPatch(); + magnetStrenghtMultiplier.SettingChanged += (sender, args) => MagnetPropertiesManager.DoPatch(); + magnetRadiusMultiplier.SettingChanged += (sender, args) => MagnetPropertiesManager.DoPatch(); + beamStrenghtMultiplier.SettingChanged += (sender, args) => BeamPropertiesManager.DoPatch(); + beamRadiusMultiplier.SettingChanged += (sender, args) => BeamPropertiesManager.DoPatch(); + fuelTankRefillMultiplier.SettingChanged += (sender, args) => FuelPropertiesManager.DoPatch(); + fuelTankCapacityMultiplier.SettingChanged += (sender, args) => FuelPropertiesManager.DoPatch(); + wheelTorqueMultiplier.SettingChanged += (sender, args) => WheelPropertiesManager.DoPatch(); + wheelSpeedMultiplier.SettingChanged += (sender, args) => WheelPropertiesManager.DoPatch(); + jetThrustMultiplier.SettingChanged += (sender, args) => ThrusterPropertiesManager.DoPatch(); + minerGroundArea.SettingChanged += (sender, args) => MinerPropertiesManager.DoPatch(); + minerMiningSpeed.SettingChanged += (sender, args) => MinerPropertiesManager.DoPatch(); + wirelessChargingPowerPerArcMultiplier.SettingChanged += (sender, args) => WirelessChargerPropertiesManager.DoPatch(); + wirelessChargingArcFiringIntervalMultiplier.SettingChanged += (sender, args) => WirelessChargerPropertiesManager.DoPatch(); + wirelessChargingRadiusMultiplier.SettingChanged += (sender, args) => WirelessChargerPropertiesManager.DoPatch(); + + 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"); + } + } +} \ No newline at end of file diff --git a/Projects/HouseFlipper/HouseFlipper/FuelPropertiesManager.cs b/Projects/HouseFlipper/HouseFlipper/FuelPropertiesManager.cs new file mode 100644 index 0000000..7aa9140 --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper/FuelPropertiesManager.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using HarmonyLib; + +namespace TerraTech { + [HarmonyPatch] + public class FuelPropertiesManager { + private static Dictionary refillRate = new Dictionary(); + private static Dictionary capacity = new Dictionary(); + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleFuelTank), "OnAttached")] + static void PostfixCreate(ModuleFuelTank __instance) { + // Console.WriteLine("ModuleFuelTank.OnAttached"); + if (!refillRate.ContainsKey(__instance)) { + refillRate.Add(__instance, __instance.m_RefillRate); + capacity.Add(__instance, __instance.m_Capacity); + // Console.WriteLine("Patching {0}; m_RefillRate: {1}; m_Capacity: {2}", __instance.name, __instance.m_RefillRate, __instance.m_Capacity); + DoPatchSingle(__instance); + // Console.WriteLine("Patched {0}; m_RefillRate: {1}; m_Capacity: {2}", __instance.name, __instance.m_RefillRate, __instance.m_Capacity); + } + } + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleFuelTank), "OnDetaching")] + static void PostfixDestroy(ModuleFuelTank __instance) { + // Console.WriteLine("ModuleFuelTank.OnAttached"); + // Console.WriteLine("Restoring {0}; m_RefillRate: {1}; m_Capacity: {2}", __instance.name, __instance.m_RefillRate, __instance.m_Capacity); + DoRestoreSingle(__instance); + // Console.WriteLine("Restored {0}; m_RefillRate: {1}; m_Capacity: {2}", __instance.name, __instance.m_RefillRate, __instance.m_Capacity); + refillRate.Remove(__instance); + capacity.Remove(__instance); + } + + public static void DoPatch() { + // Console.WriteLine("Modifying {0} ModuleFuelTank", refillRate.Count); + foreach (KeyValuePair keyValuePair in refillRate) { + DoRestoreSingle(keyValuePair.Key); + DoPatchSingle(keyValuePair.Key); + } + } + + static void DoPatchSingle(ModuleFuelTank moduleFuelTank) { + moduleFuelTank.m_RefillRate = refillRate[moduleFuelTank] * Main.fuelTankRefillMultiplier.Value; + moduleFuelTank.m_Capacity = capacity[moduleFuelTank] * Main.fuelTankCapacityMultiplier.Value; + } + + static void DoRestoreSingle(ModuleFuelTank moduleFuelTank) { + if (refillRate.ContainsKey(moduleFuelTank)) { + moduleFuelTank.m_RefillRate = refillRate[moduleFuelTank]; + moduleFuelTank.m_Capacity = capacity[moduleFuelTank]; + } + } + } +} \ No newline at end of file diff --git a/Projects/HouseFlipper/HouseFlipper/GeneratorPropertiesManager.cs b/Projects/HouseFlipper/HouseFlipper/GeneratorPropertiesManager.cs new file mode 100644 index 0000000..3dd068f --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper/GeneratorPropertiesManager.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using HarmonyLib; + +namespace TerraTech { + [HarmonyPatch] + public class GeneratorPropertiesManager { + private static Dictionary generators = new Dictionary(); + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleEnergy), "OnAttached")] + static void PostfixCreate(ModuleEnergy __instance) { + // Console.WriteLine("ModuleEnergy.OnAttached"); + if (!generators.ContainsKey(__instance)) { + generators.Add(__instance, GetValue(__instance)); + // Console.WriteLine("Patching {0}; m_OutputPerSecond: {1}", __instance.name, GetValue(__instance)); + DoPatchSingle(__instance); + // Console.WriteLine("Patched {0}; m_OutputPerSecond: {1}", __instance.name, GetValue(__instance)); + } + } + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleEnergy), "OnDetaching")] + static void PostfixDestroy(ModuleEnergy __instance) { + // Console.WriteLine("ModuleEnergy.OnDetaching"); + // Console.WriteLine("Restoring {0}; m_OutputPerSecond: {1}", __instance.name, GetValue(__instance)); + DoRestoreSingle(__instance); + // Console.WriteLine("Restored {0}; m_OutputPerSecond: {1}", __instance.name, GetValue(__instance)); + generators.Remove(__instance); + } + + public static void DoPatch() { + // Console.WriteLine("Modifying {0} ModuleEnergy", generators.Count); + foreach (KeyValuePair keyValuePair in generators) { + DoRestoreSingle(keyValuePair.Key); + DoPatchSingle(keyValuePair.Key); + } + } + + static void DoPatchSingle(ModuleEnergy moduleEnergy) { + SetValue(moduleEnergy, generators[moduleEnergy] * Main.energyGenMultiplier.Value); + } + + static void DoRestoreSingle(ModuleEnergy moduleEnergy) { + if (generators.ContainsKey(moduleEnergy)) { + SetValue(moduleEnergy, generators[moduleEnergy]); + } + } + + private static float GetValue(ModuleEnergy moduleEnergy) { + return Traverse.Create(moduleEnergy).Field("m_OutputPerSecond").GetValue() as float? ?? 0f; + } + + private static void SetValue(ModuleEnergy moduleEnergy, float value) { + Traverse.Create(moduleEnergy).Field("m_OutputPerSecond").SetValue(value); + } + } +} \ No newline at end of file diff --git a/Projects/HouseFlipper/HouseFlipper/HomingAndVelocityProjectilePatch.cs b/Projects/HouseFlipper/HouseFlipper/HomingAndVelocityProjectilePatch.cs new file mode 100644 index 0000000..b88dca9 --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper/HomingAndVelocityProjectilePatch.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; +using HarmonyLib; +using UnityEngine; + +namespace TerraTech { + [HarmonyPatch(typeof(Projectile), "Fire")] + public class HomingAndVelocityProjectilePatch { + private static Dictionary velocities = new Dictionary(); + + static void Prefix(Vector3 fireDirection, ref FireData fireData, ref ModuleWeaponGun weapon, Tank shooter, ref bool seekingRounds, bool replayRounds) { + if (Main.allProjectilesHoming.Value) { + seekingRounds = true; + } + if (!velocities.ContainsKey(fireData)) { + velocities.Add(fireData, fireData.m_MuzzleVelocity); + fireData.m_MuzzleVelocity *= Main.muzzleVelocityMultiplier.Value; + } else if (velocities[fireData] != fireData.m_MuzzleVelocity * Main.muzzleVelocityMultiplier.Value) { + fireData.m_MuzzleVelocity = velocities[fireData] * Main.muzzleVelocityMultiplier.Value; + } + } + } +} \ No newline at end of file diff --git a/Projects/HouseFlipper/HouseFlipper/HouseFlipper.csproj b/Projects/HouseFlipper/HouseFlipper/HouseFlipper.csproj new file mode 100644 index 0000000..257846a --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper/HouseFlipper.csproj @@ -0,0 +1,78 @@ + + + + + Debug + AnyCPU + {EE5EFB7F-A4DC-44F0-967B-F71ECA2D46AE} + Library + Properties + TerraTech + TerraTech + v4.8 + 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/HouseFlipper/HouseFlipper/MagnetPropertiesManager.cs b/Projects/HouseFlipper/HouseFlipper/MagnetPropertiesManager.cs new file mode 100644 index 0000000..121beb4 --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper/MagnetPropertiesManager.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using HarmonyLib; + +namespace TerraTech { + [HarmonyPatch] + public class MagnetPropertiesManager { + private static Dictionary strenghts = new Dictionary(); + private static Dictionary radii = new Dictionary(); + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleItemHolderMagnet), "OnAttached")] + static void PostfixCreate(ModuleItemHolderMagnet __instance) { + // Console.WriteLine("ModuleItemHolderMagnet.OnAttached"); + if (!strenghts.ContainsKey(__instance)) { + strenghts.Add(__instance, GetStrength(__instance)); + radii.Add(__instance, GetRadius(__instance)); + // Console.WriteLine("Patching {0}; m_Strength: {1}; m_Pickup.m_PickupRange: {2}", __instance.name, GetStrength(__instance), GetRadius(__instance)); + DoPatchSingle(__instance); + // Console.WriteLine("Patched {0}; m_Strength: {1}; m_Pickup.m_PickupRange: {2}", __instance.name, GetStrength(__instance), GetRadius(__instance)); + } + } + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleItemHolderMagnet), "OnDetaching")] + static void PostfixDestroy(ModuleItemHolderMagnet __instance) { + // Console.WriteLine("ModuleItemHolderMagnet.OnDetaching"); + // Console.WriteLine("Restoring {0}; m_Strength: {1}; m_Pickup.m_PickupRange: {2}", __instance.name, GetStrength(__instance), GetRadius(__instance)); + DoRestoreSingle(__instance); + // Console.WriteLine("Restored {0}; m_Strength: {1}; m_Pickup.m_PickupRange: {2}", __instance.name, GetStrength(__instance), GetRadius(__instance)); + strenghts.Remove(__instance); + radii.Remove(__instance); + } + + public static void DoPatch() { + // Console.WriteLine("Modifying {0} ModuleItemHolderMagnet", strenghts.Count); + foreach (KeyValuePair keyValuePair in strenghts) { + DoRestoreSingle(keyValuePair.Key); + DoPatchSingle(keyValuePair.Key); + } + } + + static void DoPatchSingle(ModuleItemHolderMagnet moduleItemHolderMagnet) { + SetStrength(moduleItemHolderMagnet, strenghts[moduleItemHolderMagnet] * Main.magnetStrenghtMultiplier.Value); + SetRadius(moduleItemHolderMagnet, radii[moduleItemHolderMagnet] * Main.magnetRadiusMultiplier.Value); + } + + static void DoRestoreSingle(ModuleItemHolderMagnet moduleItemHolderMagnet) { + if (strenghts.ContainsKey(moduleItemHolderMagnet)) { + SetStrength(moduleItemHolderMagnet, strenghts[moduleItemHolderMagnet]); + } + if (radii.ContainsKey(moduleItemHolderMagnet)) { + SetRadius(moduleItemHolderMagnet, radii[moduleItemHolderMagnet]); + } + } + + private static float GetStrength(ModuleItemHolderMagnet moduleItemHolderMagnet) { + return Traverse.Create(moduleItemHolderMagnet).Field("m_Strength").GetValue() as float? ?? 0f; + } + + private static void SetStrength(ModuleItemHolderMagnet moduleItemHolderMagnet, float value) { + Traverse.Create(moduleItemHolderMagnet).Field("m_Strength").SetValue(value); + } + + private static float GetRadius(ModuleItemHolderMagnet moduleItemHolderMagnet) { + ModuleItemPickup moduleItemPickup = Traverse.Create(moduleItemHolderMagnet).Field("m_Pickup").GetValue() as ModuleItemPickup; + if (moduleItemPickup) { + float radius = Traverse.Create(moduleItemPickup).Field("m_PickupRange").GetValue() as float? ?? 0f; + return radius; + } + return 0f; + } + + private static void SetRadius(ModuleItemHolderMagnet moduleItemHolderMagnet, float value) { + ModuleItemPickup moduleItemPickup = Traverse.Create(moduleItemHolderMagnet).Field("m_Pickup").GetValue() as ModuleItemPickup; + if (moduleItemPickup) { + Traverse.Create(moduleItemPickup).Field("m_PickupRange").SetValue(value); + } + } + } +} \ No newline at end of file diff --git a/Projects/HouseFlipper/HouseFlipper/MinerPropertiesManager.cs b/Projects/HouseFlipper/HouseFlipper/MinerPropertiesManager.cs new file mode 100644 index 0000000..090e47b --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper/MinerPropertiesManager.cs @@ -0,0 +1,86 @@ +using System; +using System.Collections.Generic; +using HarmonyLib; + +namespace TerraTech { + [HarmonyPatch] + public class MinerPropertiesManager { + private static Dictionary area = new Dictionary(); + private static Dictionary speed = new Dictionary(); + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleItemProducer), "GetClosestResourceReservoirInRange")] + static void PostfixCreate(ModuleItemProducer __instance) { + // Console.WriteLine("ModuleItemProducer.GetClosestResourceReservoirInRange"); + if (!area.ContainsKey(__instance)) { + area.Add(__instance, GetArea(__instance)); + speed.Add(__instance, GetSpeed(__instance)); + // Console.WriteLine("Patching {0}; m_ResourceGroundRadius: {1}; m_SecPerItemProduced: {2}", __instance.name, GetArea(__instance), + // GetSpeed(__instance)); + DoPatchSingle(__instance); + // Console.WriteLine("Patched {0}; m_ResourceGroundRadius: {1}; m_SecPerItemProduced: {2}", __instance.name, GetArea(__instance), + // GetSpeed(__instance)); + } else { + if (GetArea(__instance) == area[__instance]) { + // Console.WriteLine("{0} area reset, patching again... m_ResourceGroundRadius: {1}; m_SecPerItemProduced: {2}", __instance.name, + // GetArea(__instance), GetSpeed(__instance)); + DoPatchSingle(__instance); + // Console.WriteLine("Patched {0}; m_ResourceGroundRadius: {1}; m_SecPerItemProduced: {2}", __instance.name, GetArea(__instance), + // GetSpeed(__instance)); + } + if (GetSpeed(__instance) == speed[__instance]) { + // Console.WriteLine("{0} speed reset, patching again... m_ResourceGroundRadius: {1}; m_SecPerItemProduced: {2}", __instance.name, + // GetArea(__instance), GetSpeed(__instance)); + DoPatchSingle(__instance); + // Console.WriteLine("Patched {0}; m_ResourceGroundRadius: {1}; m_SecPerItemProduced: {2}", __instance.name, GetArea(__instance), + // GetSpeed(__instance)); + } + } + } + + [HarmonyPostfix] + [HarmonyPatch(typeof(ModuleItemProducer), "OnDetaching")] + static void PostfixDestroy(ModuleItemProducer __instance) { + // Console.WriteLine("ModuleItemProducer.OnRecycle"); + DoRestoreSingle(__instance); + area.Remove(__instance); + speed.Remove(__instance); + } + + public static void DoPatch() { + // Console.WriteLine("Modifying {0} ModuleItemProducer", area.Count); + foreach (KeyValuePair keyValuePair in area) { + DoRestoreSingle(keyValuePair.Key); + DoPatchSingle(keyValuePair.Key); + } + } + + static void DoPatchSingle(ModuleItemProducer moduleItemProducer) { + SetArea(moduleItemProducer, area[moduleItemProducer] * Main.minerGroundArea.Value); + SetSpeed(moduleItemProducer, speed[moduleItemProducer] / Main.minerMiningSpeed.Value); + } + + static void DoRestoreSingle(ModuleItemProducer moduleItemProducer) { + if (area.ContainsKey(moduleItemProducer)) { + SetArea(moduleItemProducer, area[moduleItemProducer]); + SetSpeed(moduleItemProducer, speed[moduleItemProducer]); + } + } + + private static float GetArea(ModuleItemProducer moduleItemProducer) { + return Traverse.Create(moduleItemProducer).Field("m_ResourceGroundRadius").GetValue() as float? ?? 0f; + } + + private static void SetArea(ModuleItemProducer moduleItemProducer, float value) { + Traverse.Create(moduleItemProducer).Field("m_ResourceGroundRadius").SetValue(value); + } + + private static float GetSpeed(ModuleItemProducer moduleItemProducer) { + return Traverse.Create(moduleItemProducer).Field("m_SecPerItemProduced").GetValue() as float? ?? 0f; + } + + private static void SetSpeed(ModuleItemProducer moduleItemProducer, float value) { + Traverse.Create(moduleItemProducer).Field("m_SecPerItemProduced").SetValue(value); + } + } +} \ No newline at end of file diff --git a/Projects/HouseFlipper/HouseFlipper/Patches.cs b/Projects/HouseFlipper/HouseFlipper/Patches.cs new file mode 100644 index 0000000..8bc5ea8 --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper/Patches.cs @@ -0,0 +1,24 @@ +using HarmonyLib; + +namespace TerraTech { + [HarmonyPatch] + public class Patches { + [HarmonyPrefix] + [HarmonyPatch(typeof(ManLicenses), "AddXP")] + static void XPMulti(FactionSubTypes corporation, ref int xp, bool showUI = true) { + xp = (int)(xp * Main.xpMultiplier.Value); + } + + [HarmonyPrefix] + [HarmonyPatch(typeof(ManPlayer), "AddMoney")] + static void MoneyMulti(ref int amount) { + amount = (int)(amount * Main.moneyMultiplier.Value); + } + + [HarmonyPrefix] + [HarmonyPatch(typeof(TechHolders), "SetHeartbeatInterval")] + static void HeartbeatMulti(ref float interval) { + interval *= Main.heartbeatIntervalMultiplier.Value; + } + } +} \ No newline at end of file diff --git a/Projects/HouseFlipper/HouseFlipper/Properties/AssemblyInfo.cs b/Projects/HouseFlipper/HouseFlipper/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ca6f22b --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper/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("TerraTech")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("TerraTech")] +[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("EE5EFB7F-A4DC-44F0-967B-F71ECA2D46AE")] + +// 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/HouseFlipper/HouseFlipper/SeekingProjectileManager.cs b/Projects/HouseFlipper/HouseFlipper/SeekingProjectileManager.cs new file mode 100644 index 0000000..7a41c5a --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper/SeekingProjectileManager.cs @@ -0,0 +1,24 @@ +using System; +using HarmonyLib; + +namespace TerraTech { + public class SeekingProjectileManager { + [HarmonyPatch(typeof(SeekingProjectile), "OnSpawn")] + class Patch { + static void Postfix(SeekingProjectile __instance) { + Console.WriteLine("SeekingProjectile created"); + SetField(__instance, "m_VisionConeAngle", Main.seekingProjectileVisionConeAngleMultiplier.Value * GetField(__instance, "m_VisionConeAngle")); + SetField(__instance, "m_VisionRange", Main.seekingProjectileVisionRangeMultiplier.Value * GetField(__instance, "m_VisionRange")); + SetField(__instance, "m_TurnSpeed", Main.seekingProjectileTurningSpeedMultiplier.Value * GetField(__instance, "m_TurnSpeed")); + } + } + + private static float GetField(SeekingProjectile seekingProjectile, string field) { + return Traverse.Create(seekingProjectile).Field(field).GetValue() as float? ?? 0f; + } + + private static void SetField(SeekingProjectile seekingProjectile, string field, float value) { + Traverse.Create(seekingProjectile).Field(field).SetValue(value); + } + } +} \ No newline at end of file diff --git a/Projects/HouseFlipper/HouseFlipper/ThrusterPropertiesManager.cs b/Projects/HouseFlipper/HouseFlipper/ThrusterPropertiesManager.cs new file mode 100644 index 0000000..7443f17 --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper/ThrusterPropertiesManager.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections.Generic; +using HarmonyLib; + +namespace TerraTech { + [HarmonyPatch] + public class ThrusterPropertiesManager { + private static Dictionary> boosters = new Dictionary>(); + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleBooster), "OnAttached")] + static void PostfixCreate(ModuleBooster __instance) { + // Console.WriteLine("ModuleBooster.OnAttached"); + if (!boosters.ContainsKey(__instance)) { + boosters.Add(__instance, Map(__instance)); + // Console.WriteLine("Patching {0}; force: {1}", __instance.name, GetForceAsString(__instance)); + DoPatchSingle(__instance); + // Console.WriteLine("Patched {0}; force: {1}", __instance.name, GetForceAsString(__instance)); + } + } + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleBooster), "OnDetaching")] + static void PostfixDestroy(ModuleBooster __instance) { + // Console.WriteLine("ModuleBooster.OnDetaching"); + // Console.WriteLine("Restoring {0}; force: {1}", __instance.name, GetForceAsString(__instance)); + DoRestoreSingle(__instance); + // Console.WriteLine("Restored {0}; force: {1}", __instance.name, GetForceAsString(__instance)); + boosters.Remove(__instance); + } + + public static void DoPatch() { + // Console.WriteLine("Modifying {0} ModuleBooster", boosters.Count); + foreach (KeyValuePair> keyValuePair in boosters) { + DoRestoreSingle(keyValuePair.Key); + DoPatchSingle(keyValuePair.Key); + } + } + + static void DoPatchSingle(ModuleBooster moduleBooster) { + List jets = GetValue(moduleBooster); + for (var i = 0; i < jets.Count; i++) { + boosters[moduleBooster][jets[i]] = GetValue(jets[i]); + SetValue(jets[i], GetValue(jets[i]) * Main.jetThrustMultiplier.Value); + } + SetValue(moduleBooster, jets); + } + + static void DoRestoreSingle(ModuleBooster moduleBooster) { + if (boosters.ContainsKey(moduleBooster)) { + foreach (BoosterJet boosterJet in GetValue(moduleBooster)) { + SetValue(boosterJet, boosters[moduleBooster][boosterJet]); + } + } + } + + private static Dictionary Map(ModuleBooster moduleBooster) { + Dictionary jets = new Dictionary(); + foreach (BoosterJet boosterJet in GetValue(moduleBooster)) { + jets.Add(boosterJet, GetValue(boosterJet)); + } + return jets; + } + + private static List GetValue(ModuleBooster moduleBooster) { + return Traverse.Create(moduleBooster).Field("jets").GetValue() as List; + } + + private static void SetValue(ModuleBooster moduleBooster, List value) { + Traverse.Create(moduleBooster).Field("jets").SetValue(value); + } + + private static float GetValue(BoosterJet boosterJet) { + return Traverse.Create(boosterJet).Field("m_Force").GetValue() as float? ?? 0f; + } + + private static void SetValue(BoosterJet boosterJet, float value) { + Traverse.Create(boosterJet).Field("m_Force").SetValue(value); + } + + private static string GetForceAsString(ModuleBooster moduleBooster) { + string result = ""; + foreach (BoosterJet boosterJet in GetValue(moduleBooster)) { + result += GetValue(boosterJet) + ", "; + } + return result; + } + } +} \ No newline at end of file diff --git a/Projects/HouseFlipper/HouseFlipper/WeaponPropertiesManager.cs b/Projects/HouseFlipper/HouseFlipper/WeaponPropertiesManager.cs new file mode 100644 index 0000000..c48c2c4 --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper/WeaponPropertiesManager.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using BepInEx.Configuration; +using HarmonyLib; + +namespace TerraTech { + [HarmonyPatch] + public class WeaponPropertiesManager { + private static Dictionary shotCooldown = new Dictionary(); + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleWeaponGun), "OnAttached")] + static void PostfixCreate(ModuleWeaponGun __instance) { + // Console.WriteLine("ModuleWeaponGun.OnAttached"); + if (!shotCooldown.ContainsKey(__instance)) { + shotCooldown.Add(__instance, __instance.m_ShotCooldown); + // Console.WriteLine("Patching {0}; m_ShotCooldown: {1}", __instance.name, __instance.m_ShotCooldown); + DoPatchSingle(__instance); + // Console.WriteLine("Patched {0}; m_ShotCooldown: {1}", __instance.name, __instance.m_ShotCooldown); + } + } + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleWeaponGun), "OnDetaching")] + static void PostfixDestroy(ModuleWeaponGun __instance) { + // Console.WriteLine("ModuleWeaponGun.OnDetaching"); + // Console.WriteLine("Restoring {0}; m_ShotCooldown: {1}", __instance.name, __instance.m_ShotCooldown); + DoRestoreSingle(__instance); + // Console.WriteLine("Restored {0}; m_ShotCooldown: {1}", __instance.name, __instance.m_ShotCooldown); + shotCooldown.Remove(__instance); + } + + public static void DoPatch() { + // Console.WriteLine("Modifying {0} ModuleWeaponGun", shotCooldown.Count); + foreach (KeyValuePair keyValuePair in shotCooldown) { + DoRestoreSingle(keyValuePair.Key); + DoPatchSingle(keyValuePair.Key); + } + } + + static void DoPatchSingle(ModuleWeaponGun moduleWeaponGun) { + moduleWeaponGun.m_ShotCooldown = shotCooldown[moduleWeaponGun] / Main.shootingSpeedMultiplier.Value; + } + + static void DoRestoreSingle(ModuleWeaponGun moduleWeaponGun) { + if (shotCooldown.ContainsKey(moduleWeaponGun)) { + moduleWeaponGun.m_ShotCooldown = shotCooldown[moduleWeaponGun]; + } + } + } +} \ No newline at end of file diff --git a/Projects/HouseFlipper/HouseFlipper/WheelPropertiesManager.cs b/Projects/HouseFlipper/HouseFlipper/WheelPropertiesManager.cs new file mode 100644 index 0000000..1483a90 --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper/WheelPropertiesManager.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using HarmonyLib; + +namespace TerraTech { + [HarmonyPatch] + public class WheelPropertiesManager { + private static Dictionary torques = new Dictionary(); + private static Dictionary maxRpm = new Dictionary(); + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleWheels), "OnAttached")] + static void PostfixCreate(ModuleWheels __instance) { + // Console.WriteLine("ModuleWheels.OnAttached"); + if (!torques.ContainsKey(__instance)) { + torques.Add(__instance, __instance.m_TorqueParams.torqueCurveMaxTorque); + maxRpm.Add(__instance, __instance.m_TorqueParams.torqueCurveMaxRpm); + // Console.WriteLine("Patching {0}; m_TorqueParams.torqueCurveMaxTorque: {1}; m_TorqueParams.torqueCurveMaxRpm: {2}", __instance.name, + // __instance.m_TorqueParams.torqueCurveMaxTorque, + // __instance.m_TorqueParams.torqueCurveMaxRpm); + DoPatchSingle(__instance); + // Console.WriteLine("Patched {0}; m_TorqueParams.torqueCurveMaxTorque: {1}; m_TorqueParams.torqueCurveMaxRpm: {2}", __instance.name, + // __instance.m_TorqueParams.torqueCurveMaxTorque, + // __instance.m_TorqueParams.torqueCurveMaxRpm); + } + } + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleWheels), "OnDetaching")] + static void PostfixDestroy(ModuleWheels __instance) { + // Console.WriteLine("ModuleWheels.OnDetaching"); + // Console.WriteLine("Restoring {0}; m_TorqueParams.torqueCurveMaxTorque: {1}; m_TorqueParams.torqueCurveMaxRpm: {2}", __instance.name, + // __instance.m_TorqueParams.torqueCurveMaxTorque, + // __instance.m_TorqueParams.torqueCurveMaxRpm); + DoRestoreSingle(__instance); + // Console.WriteLine("Restored {0}; m_TorqueParams.torqueCurveMaxTorque: {1}; m_TorqueParams.torqueCurveMaxRpm: {2}", __instance.name, + // __instance.m_TorqueParams.torqueCurveMaxTorque, + // __instance.m_TorqueParams.torqueCurveMaxRpm); + torques.Remove(__instance); + maxRpm.Remove(__instance); + } + + public static void DoPatch() { + // Console.WriteLine("Modifying {0} ModuleWheels", torques.Count); + foreach (KeyValuePair keyValuePair in torques) { + DoRestoreSingle(keyValuePair.Key); + DoPatchSingle(keyValuePair.Key); + } + } + + static void DoPatchSingle(ModuleWheels moduleWheels) { + moduleWheels.m_TorqueParams.torqueCurveMaxRpm = maxRpm[moduleWheels] * Main.wheelSpeedMultiplier.Value; + moduleWheels.m_TorqueParams.torqueCurveMaxTorque = torques[moduleWheels] * Main.wheelTorqueMultiplier.Value; + } + + static void DoRestoreSingle(ModuleWheels moduleWheels) { + if (torques.ContainsKey(moduleWheels)) { + moduleWheels.m_TorqueParams.torqueCurveMaxTorque = torques[moduleWheels]; + moduleWheels.m_TorqueParams.torqueCurveMaxRpm = maxRpm[moduleWheels]; + } + } + } +} \ No newline at end of file diff --git a/Projects/HouseFlipper/HouseFlipper/WirelessChargerPropertiesManager.cs b/Projects/HouseFlipper/HouseFlipper/WirelessChargerPropertiesManager.cs new file mode 100644 index 0000000..92aedcb --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper/WirelessChargerPropertiesManager.cs @@ -0,0 +1,60 @@ +using System.Collections.Generic; +using HarmonyLib; + +// TODO: Fix this, no workey +namespace TerraTech { + [HarmonyPatch] + public class WirelessChargerPropertiesManager { + private static Dictionary radius = new Dictionary(); + private static Dictionary transferPerArc = new Dictionary(); + private static Dictionary arcFiringInterval = new Dictionary(); + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleRemoteCharger), "OnAttached")] + static void PostfixCreate(ModuleRemoteCharger __instance) { + // Console.WriteLine("ModuleRemoteCharger.OnAttached"); + if (!radius.ContainsKey(__instance)) { + radius.Add(__instance, __instance.m_ChargingRadius); + transferPerArc.Add(__instance, __instance.m_PowerTransferPerArc); + arcFiringInterval.Add(__instance, __instance.m_ArcFiringInterval); + // Console.WriteLine("Patching {0}; m_RefillRate: {1}; m_Capacity: {2}", __instance.name, __instance.m_RefillRate, __instance.m_Capacity); + DoPatchSingle(__instance); + // Console.WriteLine("Patched {0}; m_RefillRate: {1}; m_Capacity: {2}", __instance.name, __instance.m_RefillRate, __instance.m_Capacity); + } + } + + [HarmonyPrefix] + [HarmonyPatch(typeof(ModuleRemoteCharger), "OnDetaching")] + static void PostfixDestroy(ModuleRemoteCharger __instance) { + // Console.WriteLine("ModuleRemoteCharger.OnAttached"); + // Console.WriteLine("Restoring {0}; m_RefillRate: {1}; m_Capacity: {2}", __instance.name, __instance.m_RefillRate, __instance.m_Capacity); + DoRestoreSingle(__instance); + // Console.WriteLine("Restored {0}; m_RefillRate: {1}; m_Capacity: {2}", __instance.name, __instance.m_RefillRate, __instance.m_Capacity); + radius.Remove(__instance); + transferPerArc.Remove(__instance); + arcFiringInterval.Remove(__instance); + } + + public static void DoPatch() { + // Console.WriteLine("Modifying {0} ModuleRemoteCharger", radius.Count); + foreach (KeyValuePair keyValuePair in radius) { + DoRestoreSingle(keyValuePair.Key); + DoPatchSingle(keyValuePair.Key); + } + } + + static void DoPatchSingle(ModuleRemoteCharger moduleRemoteCharger) { + moduleRemoteCharger.m_ChargingRadius = radius[moduleRemoteCharger] * Main.wirelessChargingRadiusMultiplier.Value; + moduleRemoteCharger.m_PowerTransferPerArc = radius[moduleRemoteCharger] * Main.wirelessChargingPowerPerArcMultiplier.Value; + moduleRemoteCharger.m_ArcFiringInterval = radius[moduleRemoteCharger] * Main.wirelessChargingArcFiringIntervalMultiplier.Value; + } + + static void DoRestoreSingle(ModuleRemoteCharger moduleRemoteCharger) { + if (radius.ContainsKey(moduleRemoteCharger)) { + moduleRemoteCharger.m_ChargingRadius = radius[moduleRemoteCharger]; + moduleRemoteCharger.m_PowerTransferPerArc = radius[moduleRemoteCharger]; + moduleRemoteCharger.m_ArcFiringInterval = radius[moduleRemoteCharger]; + } + } + } +} \ No newline at end of file diff --git a/Projects/HouseFlipper/HouseFlipper/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs b/Projects/HouseFlipper/HouseFlipper/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs new file mode 100644 index 0000000..15efebf --- /dev/null +++ b/Projects/HouseFlipper/HouseFlipper/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] diff --git a/Projects/HouseFlipper/HouseFlipper/obj/Debug/HouseFlipper.csproj.AssemblyReference.cache b/Projects/HouseFlipper/HouseFlipper/obj/Debug/HouseFlipper.csproj.AssemblyReference.cache new file mode 100644 index 0000000000000000000000000000000000000000..c8675f73c02a7a4f24bc222255f8942faf74a731 GIT binary patch literal 13136 zcmcIr&2QX96kkJVLedgKo1)SdfWMoC#DNd-aX>=iQgP;l#GA3b>v5BAvNP+$uGe;+-@N&~H}C!4 z7zD^|I2Z->1#D3-@Ycfm z96XPq!CMOd{rlI*SCLi zI&u6V_JgchnRA<+^M}aVCclyX;CHk^c+-S_VdBF1s|BrQU8^qzhz9kd?P7w1keZ=K z>s4$c3ZwfBSz%D0Mm{EJn+-Rq2sz8$bCd?%mUjr7mP$Cg1u?2+q}`c=?Df$Z@!&Lrff~kXn|j!0zM^t^&K5s4xJh-#n}@pSbwv=dH^i zX~<{>A#(MSN0Ig-++lN)KlUqZaKR&1<%%(LhJl^)wYo#A&l_e_kC)Nq+^Zri?{7KYd@ zZ7%oMZ8QUt4~XV#Okftxd9biIvLipsd!hOG62W0}maKz+b4UY#A_qNxg!~2ZYxpO7 zAHSw)C$jQth*A?1l_Dz}%>Y}0q)1`ZE11}l@=ozl>lH5ued<{#2ryaK69?+rmLsv$ z8rlvQP_O~Pw`);j*=ebmG{lyJV$YNu`YTzP#d&I2;N)dEh=OU|uf3f44( zpzA>oFQTo`BW%^xZv`IF4ks_oOYEfE>)A0DBO9|YE8``@C8m~xR%Ia~XjWdBUn)y# zb}TzoX=%b*DI2Or5~D4ZrOoylAEjQjZ3@0>HXwP+Vs^aEnVr2N!LAuX)}#^=MOlCyuA(hWk-f_Er@cnn$s^OOLKai~ zGk0rS2$8PC)@Y2RDheP;ve1G_%ymTf8dgUzowhtzr;gd6$hsdP9WqVRWyM0E6BKqW z_N^=~*m_b$1oC@Wq$IKNZdNcqUqOv30@Z_XWo1QDx)9x#p(2ruyQj12vI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916EsJBXJv`T2TN(fmbc<{*6+~wqTw<9rW+TmMlwG2FjP?ynVu?)|Ov`JScCIv<` snjAc6KQxz`EYiCZlVTdBNMD;s=zRqdJr)Tb+^eaZyeTnh@7?bEe~&{%EdT%j literal 0 HcmV?d00001 diff --git a/Projects/HouseFlipper/TerraTech.sln.DotSettings.user b/Projects/HouseFlipper/TerraTech.sln.DotSettings.user new file mode 100644 index 0000000..bad6624 --- /dev/null +++ b/Projects/HouseFlipper/TerraTech.sln.DotSettings.user @@ -0,0 +1,11 @@ + + True + True + True + True + True + True + <AssemblyExplorer /> + C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe + 262144 + \ No newline at end of file diff --git a/Projects/HouseFlipper/libs/test.txt b/Projects/HouseFlipper/libs/test.txt new file mode 100644 index 0000000..ff57a33 --- /dev/null +++ b/Projects/HouseFlipper/libs/test.txt @@ -0,0 +1,6 @@ +0Harmony.dll* +Assembly-CSharp.dll* +BepInEx.dll* +UnityEngine.CoreModule.dll* +UnityEngine.dll* +test.txt