diff --git a/Projects/AgainstTheStorm/AgainstTheStorm.sln b/Projects/AgainstTheStorm/AgainstTheStorm.sln deleted file mode 100644 index 40f5d04..0000000 --- a/Projects/AgainstTheStorm/AgainstTheStorm.sln +++ /dev/null @@ -1,16 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AgainstTheStorm", "AgainstTheStorm\AgainstTheStorm.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/AgainstTheStorm/AgainstTheStorm.sln.DotSettings.user b/Projects/AgainstTheStorm/AgainstTheStorm.sln.DotSettings.user deleted file mode 100644 index 38dd5c1..0000000 --- a/Projects/AgainstTheStorm/AgainstTheStorm.sln.DotSettings.user +++ /dev/null @@ -1,28 +0,0 @@ - - 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/AgainstTheStorm/AgainstTheStorm/AgainstTheStorm.csproj b/Projects/AgainstTheStorm/AgainstTheStorm/AgainstTheStorm.csproj deleted file mode 100644 index 713705d..0000000 --- a/Projects/AgainstTheStorm/AgainstTheStorm/AgainstTheStorm.csproj +++ /dev/null @@ -1,82 +0,0 @@ - - - - - Debug - AnyCPU - {DA9D274E-486F-4F82-84FF-CD9388CB0B09} - Library - Properties - AgainstTheStorm - AgainstTheStorm - v4.8.1 - 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\MainAssembly.dll - - - libs\Sirenix.Serialization.dll - - - - - - - libs\UnityEngine.dll - - - libs\UnityEngine.CoreModule.dll - - - - - - - - - - - - - - - diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/Class1.cs b/Projects/AgainstTheStorm/AgainstTheStorm/Class1.cs deleted file mode 100644 index 129feb6..0000000 --- a/Projects/AgainstTheStorm/AgainstTheStorm/Class1.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System.Linq; -using BepInEx; -using BepInEx.Configuration; -using HarmonyLib; -using HarmonyLib.Tools; - -namespace AgainstTheStorm { - [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 ProductionMultiplier; - public static ConfigEntry DepositChargesMultiplier; - public static ConfigEntry VillagerSpeedMultiplier; - public static ConfigEntry ProductionSpeedMultiplier; - public static ConfigEntry NewcomverRateMultiplier; - public static ConfigEntry VillagerCapacityMultiplier; - public static ConfigEntry TraderRateMultiplier; - public static ConfigEntry TraderMerchMultiplier; - public static ConfigEntry HearthRangeMultiplier; - public static ConfigEntry HouseCapacityMultiplier; - public static ConfigEntry NewcomerBonusMultiplier; - public static ConfigEntry GameSpeedMultiplier; - public static ConfigEntry AdditionalNewcomerBonus; - public static ConfigEntry MetaCurrencyMultiplier; - public static ConfigEntry TradeRouteSpeedMultiplier; - - // public static ConfigEntry wheelTorqueMultiplier; - // public static ConfigEntry wheelSpeedMultiplier; - // public static ConfigEntry jetThrustMultiplier; - - public void Awake() { - ProductionMultiplier = Config.Bind("General", "ProductionMultiplier", 1, - new ConfigDescription("ProductionMultiplier", new AcceptableValueRange(1, 512))); - DepositChargesMultiplier = Config.Bind("General", "DepositChargesMultiplier", 1, - new ConfigDescription("DepositChargesMultiplier", new AcceptableValueRange(1, 512))); - VillagerSpeedMultiplier = Config.Bind("General", "VillagerSpeedMultiplier", 1f, - new ConfigDescription("VillagerSpeedMultiplier", new AcceptableValueRange(1f, 128f))); - ProductionSpeedMultiplier = Config.Bind("General", "ProductionSpeedMultiplier", 1f, - new ConfigDescription("ProductionSpeedMultiplier", new AcceptableValueRange(1f, 256f))); - NewcomverRateMultiplier = Config.Bind("General", "NewcomverRateMultiplier", 1f, - new ConfigDescription("NewcomverRateMultiplier", new AcceptableValueRange(1f, 128f))); - VillagerCapacityMultiplier = Config.Bind("General", "VillagerCapacityMultiplier", 1, - new ConfigDescription("VillagerCapacityMultiplier", new AcceptableValueRange(1, 32))); - TraderRateMultiplier = Config.Bind("General", "TraderRateMultiplier", 1f, - new ConfigDescription("TraderRateMultiplier", new AcceptableValueRange(1f, 128f))); - TraderMerchMultiplier = Config.Bind("General", "TraderMerchMultiplier", 1, - new ConfigDescription("TraderMerchMultiplier", new AcceptableValueRange(1, 128))); - HearthRangeMultiplier = Config.Bind("General", "HearthRangeMultiplier", 1f, - new ConfigDescription("HearthRangeMultiplier", new AcceptableValueRange(1f, 128f))); - HouseCapacityMultiplier = Config.Bind("General", "HouseCapacityMultiplier", 1f, - new ConfigDescription("HouseCapacityMultiplier", new AcceptableValueRange(1f, 32f))); - NewcomerBonusMultiplier = Config.Bind("General", "NewcomerBonusMultiplier", 1f, - new ConfigDescription("NewcomerBonusMultiplier", new AcceptableValueRange(1f, 32f))); - GameSpeedMultiplier = Config.Bind("General", "GameSpeedMultiplier", 1, - new ConfigDescription("GameSpeedMultiplier", new AcceptableValueRange(1, 32))); - AdditionalNewcomerBonus = Config.Bind("General", "AdditionalNewcomerBonus", 0, - new ConfigDescription("AdditionalNewcomerBonus", new AcceptableValueRange(0, 512))); - MetaCurrencyMultiplier = Config.Bind("General", "MetaCurrencyMultiplier", 1f, - new ConfigDescription("MetaCurrencyMultiplier", new AcceptableValueRange(1f, 512f))); - TradeRouteSpeedMultiplier = Config.Bind("General", "TradeRouteSpeedMultiplier", 1f, - new ConfigDescription("TradeRouteSpeedMultiplier", new AcceptableValueRange(1f, 512f))); - // 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(); - - 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"); - } - } -} diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/Patches.cs b/Projects/AgainstTheStorm/AgainstTheStorm/Patches.cs deleted file mode 100644 index 3ac02f4..0000000 --- a/Projects/AgainstTheStorm/AgainstTheStorm/Patches.cs +++ /dev/null @@ -1,458 +0,0 @@ -using System; -using System.Collections.Generic; -using Eremite.Buildings; -using Eremite.Model; -using Eremite.Model.Meta; -using Eremite.Services; -using HarmonyLib; - -// Patch maxSupPoints in PlatoonSupplyModule -// Patch Operational Authority point gain - -namespace AgainstTheStorm { - [HarmonyPatch] - public class Patches { - static Dictionary baseValues = new Dictionary(); - - [HarmonyPrefix] - [HarmonyPatch(typeof(BonusEmbarkRangeMetaRewardModel), "OnConsume")] - static void Test(BonusEmbarkRangeMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(BonusFarmAreaMetaRewardModel), "OnConsume")] - static void Test(BonusFarmAreaMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ConstructionSpeedMetaRewardModel), "OnConsume")] - static void Test(ConstructionSpeedMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(CornerstonesRerollsMetaRewardModel), "OnConsume")] - static void Test(CornerstonesRerollsMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(CurrencyMultiplayerMetaRewardModel), "OnConsume")] - static void Test(CurrencyMultiplayerMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(EmbarkGoodsAmountMetaRewardModel), "OnConsume")] - static void Test(EmbarkGoodsAmountMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(FarmingRateMetaRewardModel), "OnConsume")] - static void Test(FarmingRateMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(FuelRateMetaRewardModel), "OnConsume")] - static void Test(FuelRateMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(GlobalBuildingStorageMetaRewardModel), "OnConsume")] - static void Test(GlobalBuildingStorageMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(GlobalCapacityMetaRewardModel), "OnConsume")] - static void Test(GlobalCapacityMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(GlobalExtraProductionChanceMetaRewardModel), "OnConsume")] - static void Test(GlobalExtraProductionChanceMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(GlobalProductionSpeedMetaRewardModel), "OnConsume")] - static void Test(GlobalProductionSpeedMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(GracePeriodMetaRewardModel), "OnConsume")] - static void Test(GracePeriodMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(GrassAmountMetaRewardModel), "OnConsume")] - static void Test(GrassAmountMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(HearthSacraficeTimeRateMetaRewardModel), "OnConsume")] - static void Test(HearthSacraficeTimeRateMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(NewcommersGoodsRateMetaRewardModel), "OnConsume")] - static void Test(NewcommersGoodsRateMetaRewardModel __instance) { - DoPatch(__instance); - } - - // [HarmonyPrefix] - // [HarmonyPatch(typeof(PreparationPointsMetaRewardModel), "OnConsume")] - // static void Test(PreparationPointsMetaRewardModel __instance) { - // DoPatch(__instance); - // } - - [HarmonyPrefix] - [HarmonyPatch(typeof(RawDepositsChargesMetaRewardModel), "OnConsume")] - static void Test(RawDepositsChargesMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(RelicsWorkingSpeedMetaRewardModel), "OnConsume")] - static void Test(RelicsWorkingSpeedMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ReputationPenaltyRateMetaRewardModel), "OnConsume")] - static void Test(ReputationPenaltyRateMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ReputationRewardPicksMetaRewardModel), "OnConsume")] - static void Test(ReputationRewardPicksMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(SeasonRewardsAmountMetaRewardModel), "OnConsume")] - static void Test(SeasonRewardsAmountMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(TownsVisionRangeMetaRewardModel), "OnConsume")] - static void Test(TownsVisionRangeMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(TraderIntervalMetaRewardModel), "OnConsume")] - static void Test(TraderIntervalMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(TraderMerchAmountMetaRewardModel), "OnConsume")] - static void Test(TraderMerchAmountMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(TraderMerchandisePriceReductionMetaRewardModel), "OnConsume")] - static void Test(TraderMerchandisePriceReductionMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(TradeRoutesLimitMetaReward), "OnConsume")] - static void Test(TradeRoutesLimitMetaReward __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(TraderSellPriceMetaRewardModel), "OnConsume")] - static void Test(TraderSellPriceMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(VillagersSpeedMetaRewardModel), "OnConsume")] - static void Test(VillagersSpeedMetaRewardModel __instance) { - DoPatch(__instance); - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(ProductionCalculator), nameof(ProductionCalculator.GetProductionMultiplier))] - static void PatchProductionCalculator(ref int __result) { - // Console.WriteLine("ProdMulti {0}", __result); - __result *= Main.ProductionMultiplier.Value; - } - - // There seems to be a lot of good shit in effetsService!! - [HarmonyPostfix] - [HarmonyPatch(typeof(EffectsService), nameof(EffectsService.GetRawDepositsChargesBonus))] - static void PatchEffectsService(ref int __result) { - __result *= Main.DepositChargesMultiplier.Value; - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(EffectsService), nameof(EffectsService.GetActorSpeed))] - static void PatchEffectsService2(ref float __result) { - __result *= Main.VillagerSpeedMultiplier.Value; - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(EffectsService), nameof(EffectsService.GetBuildingProductionRate))] - static void PatchEffectsService3(ref float __result) { - __result *= Main.ProductionSpeedMultiplier.Value; - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(EffectsService), nameof(EffectsService.GetNewcomersIntervalRate))] - static void PatchEffectsService4(ref float __result) { - __result *= Main.NewcomverRateMultiplier.Value; - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(EffectsService), nameof(EffectsService.GetVillagerCapacity))] - static void PatchEffectsService5(ref int __result) { - __result *= Main.VillagerCapacityMultiplier.Value; - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(EffectsService), nameof(EffectsService.GetTraderIntervalRate))] - static void PatchEffectsService6(ref float __result) { - __result *= Main.TraderRateMultiplier.Value; - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(EffectsService), nameof(EffectsService.GetTraderMerchsAmount))] - static void PatchEffectsService7(ref int __result) { - __result *= Main.TraderMerchMultiplier.Value; - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(EffectsService), nameof(EffectsService.GetHearthRange))] - static void PatchEffectsService8(ref float __result) { - __result *= Main.HearthRangeMultiplier.Value; - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(EffectsService), nameof(EffectsService.GetHouseCapacity), typeof(HouseModel))] - static void PatchEffectsService9(ref int __result) { - __result = (int)(Main.HouseCapacityMultiplier.Value * __result); - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(EffectsService), nameof(EffectsService.GetHouseCapacity), typeof(House))] - static void PatchEffectsService9_2(ref int __result) { - __result = (int)(Main.HouseCapacityMultiplier.Value * __result); - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(EffectsService), nameof(EffectsService.GetNewcomersBonus))] - static void PatchEffectsService10(ref int __result) { - __result = (int)(Main.NewcomerBonusMultiplier.Value * __result); - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(EffectsService), nameof(EffectsService.GetNewcomersRaceBonus))] - static void PatchEffectsService11(ref int __result) { - __result += Main.AdditionalNewcomerBonus.Value; - } - - [HarmonyPostfix] - [HarmonyPatch(typeof(EffectsService), nameof(EffectsService.GetTradeRoutesSpeed))] - static void PatchEffectsService12(ref float __result) { - __result += Main.TradeRouteSpeedMultiplier.Value; - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(TimeScaleService), "SetScale")] - static void PatchGameSpeeds(ref float scale) { - scale *= Main.GameSpeedMultiplier.Value; - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(MetaEconomyService), nameof(MetaEconomyService.Add))] - static void PatchMetaCurrencyGain(ref MetaCurrency currency) { - currency.amount = (int)(currency.amount * Main.MetaCurrencyMultiplier.Value); - } - - static void DoPatch(BasePercentageMetaReward model) { - string upgName = model.displayName.ToString(); - if (!baseValues.ContainsKey(upgName)) { - Console.WriteLine("Base value does not exist yet for {0} (class: {1}), adding", upgName, - model.GetType().Name); - baseValues.Add(upgName, model.amount); - } - - if (Math.Abs(baseValues[upgName] - model.amount) < 0.01f) { - float newValue = baseValues[upgName] * 64; - Console.WriteLine("Base value is different for {0}, updating from {1} to {2}", upgName, - baseValues[upgName], - newValue); - baseValues[upgName] = newValue; - } - else { - Console.WriteLine("Base value is the same for {0}, skipping {1}", upgName, baseValues[upgName]); - } - } - - static void DoPatch(BaseFlatMetaReward model) { - string upgName = model.displayName.ToString(); - if (!baseValues.ContainsKey(upgName)) { - Console.WriteLine("Base value does not exist yet for {0} (class: {1}), adding", upgName, - model.GetType().Name); - baseValues.Add(upgName, model.amount); - } - - if (Math.Abs(baseValues[upgName] - model.amount) < 0.01f) { - float newValue = baseValues[upgName] * 64; - Console.WriteLine("Base value is different for {0}, updating from {1} to {2}", upgName, - baseValues[upgName], - newValue); - baseValues[upgName] = newValue; - } - else { - Console.WriteLine("Base value is the same for {0}, skipping {1}", upgName, baseValues[upgName]); - } - } - - // [HarmonyPrefix] - // [HarmonyPatch(typeof(TacAidPointsController), "AddTP")] - // static void TpMultiplier(ref float val) { - // if (val == 0) { - // return; - // } - // - // float multiplier = Main.TPMultiplier.Value; - // // Console.WriteLine("Multiplying TP {0} by {1}", val, multiplier); - // val *= multiplier; - // } - // - // [HarmonyPrefix] - // [HarmonyPatch(typeof(MapZoneFactory), "MakeRefitZone")] - // static void SupplyAoeMultiplier(ref eSides side, ref Vector3 position, ref float size) { - // float multiplier = Main.SupplyAOEMultiplier.Value; - // Console.WriteLine("Multiplying supply aoe {0} by {1}", size, multiplier); - // size *= multiplier; - // } - // - // [HarmonyPrefix] - // [HarmonyPatch(typeof(PlatoonHQVisuals), "Start")] - // static void HqAoeMultiplier(PlatoonHQVisuals __instance) { - // Console.WriteLine("Patching HQ radius - base range {0}", baseHqValue); - // if (baseHqValue == 0) { - // baseHqValue = __instance.platoon.parameters.HQRadius; - // Console.WriteLine("Base range is 0, assigning new: {0}", baseHqValue); - // } - // - // __instance.platoon.parameters.HQRadius = baseHqValue * Main.HQAOEMultiplier.Value; - // Console.WriteLine("HQ radius patched to: {0}", __instance.platoon.parameters.HQRadius); - // } - // - // [HarmonyPrefix] - // [HarmonyPatch(typeof(PlatoonSupplyModule), "Start")] - // static void SupplyAoeMultiplier(PlatoonSupplyModule __instance) { - // Console.WriteLine("Patching supply amount - base amount {0}", baseSupplyValue); - // if (baseSupplyValue == 0) { - // baseSupplyValue = __instance.platoon.parameters.supplyPointsPerUnit; - // Console.WriteLine("Base amount is 0, assigning new: {0}", baseSupplyValue); - // } - // - // __instance.platoon.parameters.supplyPointsPerUnit = - // (int)(baseSupplyValue * Main.SupplyAmountMultiplier.Value); - // Console.WriteLine("Supply amount patched to: {0}", __instance.platoon.parameters.supplyPointsPerUnit); - // } - // - // [HarmonyPostfix] - // [HarmonyPatch(typeof(WeaponAttackBase), "GetReloadInterval")] - // static void FireRateMultiplier(ref float __result) { - // Console.WriteLine("Patching fire rate"); - // - // __result *= Main.FireRateMultiplier.Value; - // Console.WriteLine("Fire rate patched to: {0}", __result); - // } - // - // [HarmonyPostfix] - // [HarmonyPatch(typeof(WeaponAttackBase), "GetAimInterval")] - // static void AimingIntervalMultiplier(ref float __result) { - // Console.WriteLine("Patching aim interval - base amount {0}", baseSupplyValue); - // - // __result *= Main.AimIntervalMultiplier.Value; - // Console.WriteLine("Aim interval patched to: {0}", __result); - // } - // - // [HarmonyPrefix] - // [HarmonyPatch(typeof(TimerManager), "GetPersistentTimer")] - // static void Transpiler(ref float interval, ref string hint) { - // if (hint == "burst") { - // Console.WriteLine("Patching burst interval from: {0}", interval); - // interval *= Main.FireRateMultiplier.Value; - // Console.WriteLine("Burst interval patched to: {0}", interval); - // } - // } - // - // [HarmonyPostfix] - // [HarmonyPatch(typeof(RefitZone), "OnRefitStep")] - // static void SupplyRateMultiplier(ref float hpVal, ref float ammoVal) { - // Console.WriteLine("Patching refit step from: {0} {1}", hpVal, ammoVal); - // hpVal *= Main.SupplyRateMultiplier.Value; - // ammoVal *= Main.SupplyRateMultiplier.Value; - // Console.WriteLine("Patching refit step to: {0} {1}", hpVal, ammoVal); - // } - // - // // [HarmonyPatch(typeof(AdvancedRulesData), "Validate")] - // // static IEnumerable Transpiler(IEnumerable instructions) { - // // var codes = new List(instructions); - // // - // // foreach (var code in codes) { - // // if (code.opcode == OpCodes.Ldc_R4) { - // // Console.WriteLine("Changing " + code); - // // code.operand = (float)code.operand * 2; - // // Console.WriteLine("Changed " + code); - // // } - // // } - // // - // // return codes.AsEnumerable(); - // // } - // - // // [HarmonyPatch(typeof(AdvancedRulesData), "IsWithinLimits")] - // // static IEnumerable Transpiler2(IEnumerable instructions) { - // // var codes = new List(instructions); - // // - // // foreach (var code in codes) { - // // if (code.opcode == OpCodes.Ldc_R4) { - // // Console.WriteLine("Changing " + code); - // // code.operand = (float)code.operand * 2; - // // Console.WriteLine("Changed " + code); - // // } - // // } - // // - // // return codes.AsEnumerable(); - // // } - // - // // private static float baseAccuracy; - // // - // // [HarmonyPostfix] - // // [HarmonyPatch(typeof(SkirmishAdvancedRules), "Update")] - // // static void AccuracyPatch(SkirmishAdvancedRules __instance) { - // // var accMod = Traverse.Create(__instance).Field("currentARD").Field("accuracyModifier"); - // // if (baseAccuracy == 0) { - // // baseAccuracy = (float)accMod.GetValue(); - // // Console.WriteLine("Base accuracy set to {0}", baseAccuracy); - // // } - // // - // // accMod.SetValue(baseAccuracy * 4f); - // // Console.WriteLine("Accuracy now: {0}", accMod.GetValue()); - // // } - } -} diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/Properties/AssemblyInfo.cs b/Projects/AgainstTheStorm/AgainstTheStorm/Properties/AssemblyInfo.cs deleted file mode 100644 index e756fd4..0000000 --- a/Projects/AgainstTheStorm/AgainstTheStorm/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -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("Regiments")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Regiments")] -[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/AgainstTheStorm/AgainstTheStorm/Transpiler.cs b/Projects/AgainstTheStorm/AgainstTheStorm/Transpiler.cs deleted file mode 100644 index 9aa461f..0000000 --- a/Projects/AgainstTheStorm/AgainstTheStorm/Transpiler.cs +++ /dev/null @@ -1,274 +0,0 @@ -// using System; -// using System.Collections.Generic; -// using System.Linq; -// using System.Reflection.Emit; -// using BepInEx; -// using BepInEx.Configuration; -// using HarmonyLib; -// using HarmonyLib.Tools; -// -// namespace Regiments { -// [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 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/AgainstTheStorm/AgainstTheStorm/deploy.sh b/Projects/AgainstTheStorm/AgainstTheStorm/deploy.sh deleted file mode 100644 index f49ff3c..0000000 --- a/Projects/AgainstTheStorm/AgainstTheStorm/deploy.sh +++ /dev/null @@ -1,2 +0,0 @@ -echo $(pwd) -cp AgainstTheStorm/obj/Release/AgainstTheStorm.dll /c/Games/Against.the.Storm.v1.0.2r/BepInEx/Plugins \ No newline at end of file diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/libs/0Harmony.dll b/Projects/AgainstTheStorm/AgainstTheStorm/libs/0Harmony.dll deleted file mode 100644 index 99daef7..0000000 Binary files a/Projects/AgainstTheStorm/AgainstTheStorm/libs/0Harmony.dll and /dev/null differ diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/libs/Assembly-CSharp.dll b/Projects/AgainstTheStorm/AgainstTheStorm/libs/Assembly-CSharp.dll deleted file mode 100644 index 5a5ab98..0000000 Binary files a/Projects/AgainstTheStorm/AgainstTheStorm/libs/Assembly-CSharp.dll and /dev/null differ diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/libs/BepInEx.dll b/Projects/AgainstTheStorm/AgainstTheStorm/libs/BepInEx.dll deleted file mode 100644 index 2cb66f8..0000000 Binary files a/Projects/AgainstTheStorm/AgainstTheStorm/libs/BepInEx.dll and /dev/null differ diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/libs/ConfigurationManager.dll b/Projects/AgainstTheStorm/AgainstTheStorm/libs/ConfigurationManager.dll deleted file mode 100644 index 9f55bad..0000000 Binary files a/Projects/AgainstTheStorm/AgainstTheStorm/libs/ConfigurationManager.dll and /dev/null differ diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/libs/Sirenix.Serialization.dll b/Projects/AgainstTheStorm/AgainstTheStorm/libs/Sirenix.Serialization.dll deleted file mode 100644 index 9d7b6f5..0000000 Binary files a/Projects/AgainstTheStorm/AgainstTheStorm/libs/Sirenix.Serialization.dll and /dev/null differ diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/libs/UnityEngine.CoreModule.dll b/Projects/AgainstTheStorm/AgainstTheStorm/libs/UnityEngine.CoreModule.dll deleted file mode 100644 index 22b4309..0000000 Binary files a/Projects/AgainstTheStorm/AgainstTheStorm/libs/UnityEngine.CoreModule.dll and /dev/null differ diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/libs/UnityEngine.dll b/Projects/AgainstTheStorm/AgainstTheStorm/libs/UnityEngine.dll deleted file mode 100644 index ec505d8..0000000 Binary files a/Projects/AgainstTheStorm/AgainstTheStorm/libs/UnityEngine.dll and /dev/null differ diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/libs/copyLibs.sh b/Projects/AgainstTheStorm/AgainstTheStorm/libs/copyLibs.sh deleted file mode 100644 index 3c58797..0000000 --- a/Projects/AgainstTheStorm/AgainstTheStorm/libs/copyLibs.sh +++ /dev/null @@ -1 +0,0 @@ -for lib in $(cat libs.txt); do find $1 -name "$lib" | sed 's|\\|/|g' | xargs -I% -- cp '%' .; done diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/libs/libs.txt b/Projects/AgainstTheStorm/AgainstTheStorm/libs/libs.txt deleted file mode 100644 index 02f19f0..0000000 --- a/Projects/AgainstTheStorm/AgainstTheStorm/libs/libs.txt +++ /dev/null @@ -1,6 +0,0 @@ -0Harmony.dll -Assembly-CSharp.dll -BepInEx.dll -ConfigurationManager.dll -UnityEngine.CoreModule.dll -UnityEngine.dll \ No newline at end of file diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Debug/.NETFramework,Version=v4.8.1.AssemblyAttributes.cs b/Projects/AgainstTheStorm/AgainstTheStorm/obj/Debug/.NETFramework,Version=v4.8.1.AssemblyAttributes.cs deleted file mode 100644 index 0851892..0000000 --- a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Debug/.NETFramework,Version=v4.8.1.AssemblyAttributes.cs +++ /dev/null @@ -1,4 +0,0 @@ -// -using System; -using System.Reflection; -[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8.1", FrameworkDisplayName = ".NET Framework 4.8.1")] diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Debug/AgainstTheStorm.csproj.AssemblyReference.cache b/Projects/AgainstTheStorm/AgainstTheStorm/obj/Debug/AgainstTheStorm.csproj.AssemblyReference.cache deleted file mode 100644 index 540faca..0000000 Binary files a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Debug/AgainstTheStorm.csproj.AssemblyReference.cache and /dev/null differ diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Debug/AgainstTheStorm.csproj.CopyComplete b/Projects/AgainstTheStorm/AgainstTheStorm/obj/Debug/AgainstTheStorm.csproj.CopyComplete deleted file mode 100644 index e69de29..0000000 diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Debug/AgainstTheStorm.csproj.CoreCompileInputs.cache b/Projects/AgainstTheStorm/AgainstTheStorm/obj/Debug/AgainstTheStorm.csproj.CoreCompileInputs.cache deleted file mode 100644 index b65fb04..0000000 --- a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Debug/AgainstTheStorm.csproj.CoreCompileInputs.cache +++ /dev/null @@ -1 +0,0 @@ -151279b84fdcbaafd9f0fcb1f7663654a57733b1df3836fc5634a1051692a2db diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Debug/AgainstTheStorm.csproj.FileListAbsolute.txt b/Projects/AgainstTheStorm/AgainstTheStorm/obj/Debug/AgainstTheStorm.csproj.FileListAbsolute.txt deleted file mode 100644 index 6c830c0..0000000 --- a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Debug/AgainstTheStorm.csproj.FileListAbsolute.txt +++ /dev/null @@ -1,14 +0,0 @@ -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Debug\AgainstTheStorm.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Debug\AgainstTheStorm.pdb -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Debug\0Harmony.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Debug\Assembly-CSharp.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Debug\BepInEx.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Debug\ConfigurationManager.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Debug\Sirenix.Serialization.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Debug\UnityEngine.CoreModule.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Debug\UnityEngine.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\obj\Debug\AgainstTheStorm.csproj.AssemblyReference.cache -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\obj\Debug\AgainstTheStorm.csproj.CoreCompileInputs.cache -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\obj\Debug\AgainstTheStorm.csproj.CopyComplete -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\obj\Debug\AgainstTheStorm.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\obj\Debug\AgainstTheStorm.pdb diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Release/.NETFramework,Version=v4.8.1.AssemblyAttributes.cs b/Projects/AgainstTheStorm/AgainstTheStorm/obj/Release/.NETFramework,Version=v4.8.1.AssemblyAttributes.cs deleted file mode 100644 index 0851892..0000000 --- a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Release/.NETFramework,Version=v4.8.1.AssemblyAttributes.cs +++ /dev/null @@ -1,4 +0,0 @@ -// -using System; -using System.Reflection; -[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.8.1", FrameworkDisplayName = ".NET Framework 4.8.1")] diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Release/AgainstTheStorm.csproj.AssemblyReference.cache b/Projects/AgainstTheStorm/AgainstTheStorm/obj/Release/AgainstTheStorm.csproj.AssemblyReference.cache deleted file mode 100644 index dc2defb..0000000 Binary files a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Release/AgainstTheStorm.csproj.AssemblyReference.cache and /dev/null differ diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Release/AgainstTheStorm.csproj.CopyComplete b/Projects/AgainstTheStorm/AgainstTheStorm/obj/Release/AgainstTheStorm.csproj.CopyComplete deleted file mode 100644 index e69de29..0000000 diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Release/AgainstTheStorm.csproj.CoreCompileInputs.cache b/Projects/AgainstTheStorm/AgainstTheStorm/obj/Release/AgainstTheStorm.csproj.CoreCompileInputs.cache deleted file mode 100644 index 713a6d6..0000000 --- a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Release/AgainstTheStorm.csproj.CoreCompileInputs.cache +++ /dev/null @@ -1 +0,0 @@ -4baf00dfc139a92b75b2a9b95a0819a23a33a039ecbb07edab3f692cd134a7da diff --git a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Release/AgainstTheStorm.csproj.FileListAbsolute.txt b/Projects/AgainstTheStorm/AgainstTheStorm/obj/Release/AgainstTheStorm.csproj.FileListAbsolute.txt deleted file mode 100644 index c4040d8..0000000 --- a/Projects/AgainstTheStorm/AgainstTheStorm/obj/Release/AgainstTheStorm.csproj.FileListAbsolute.txt +++ /dev/null @@ -1,28 +0,0 @@ -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\AgainstTheStorm.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\AgainstTheStorm.pdb -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\0Harmony.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\Assembly-CSharp.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\BepInEx.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\ConfigurationManager.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\Sirenix.Serialization.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\UnityEngine.CoreModule.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\UnityEngine.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\obj\Release\AgainstTheStorm.csproj.AssemblyReference.cache -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\obj\Release\AgainstTheStorm.csproj.CoreCompileInputs.cache -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\obj\Release\AgainstTheStorm.csproj.CopyComplete -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\obj\Release\AgainstTheStorm.dll -C:\Users\Administrator\Seafile\Jetbrains\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\obj\Release\AgainstTheStorm.pdb -C:\Users\Administrator\Seafile\Projects-Rider\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\AgainstTheStorm.dll -C:\Users\Administrator\Seafile\Projects-Rider\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\AgainstTheStorm.pdb -C:\Users\Administrator\Seafile\Projects-Rider\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\0Harmony.dll -C:\Users\Administrator\Seafile\Projects-Rider\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\Assembly-CSharp.dll -C:\Users\Administrator\Seafile\Projects-Rider\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\BepInEx.dll -C:\Users\Administrator\Seafile\Projects-Rider\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\ConfigurationManager.dll -C:\Users\Administrator\Seafile\Projects-Rider\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\Sirenix.Serialization.dll -C:\Users\Administrator\Seafile\Projects-Rider\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\UnityEngine.CoreModule.dll -C:\Users\Administrator\Seafile\Projects-Rider\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\bin\Release\UnityEngine.dll -C:\Users\Administrator\Seafile\Projects-Rider\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\obj\Release\AgainstTheStorm.csproj.AssemblyReference.cache -C:\Users\Administrator\Seafile\Projects-Rider\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\obj\Release\AgainstTheStorm.csproj.CoreCompileInputs.cache -C:\Users\Administrator\Seafile\Projects-Rider\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\obj\Release\AgainstTheStorm.csproj.CopyComplete -C:\Users\Administrator\Seafile\Projects-Rider\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\obj\Release\AgainstTheStorm.dll -C:\Users\Administrator\Seafile\Projects-Rider\RiderProjects\Bepinex\Projects\AgainstTheStorm\AgainstTheStorm\obj\Release\AgainstTheStorm.pdb diff --git a/Projects/AgainstTheStorm/Regiments.sln.DotSettings.user b/Projects/AgainstTheStorm/Regiments.sln.DotSettings.user deleted file mode 100644 index caf3465..0000000 --- a/Projects/AgainstTheStorm/Regiments.sln.DotSettings.user +++ /dev/null @@ -1,21 +0,0 @@ - - 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/AgainstTheStorm/deploy.sh b/Projects/AgainstTheStorm/deploy.sh deleted file mode 100644 index c27608f..0000000 --- a/Projects/AgainstTheStorm/deploy.sh +++ /dev/null @@ -1 +0,0 @@ -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/AgainstTheStorm/test123 b/Projects/AgainstTheStorm/test123 deleted file mode 100644 index e69de29..0000000 diff --git a/Projects/AirportCEO/AirportCEO.sln b/Projects/AirportCEO/AirportCEO.sln deleted file mode 100644 index f86482a..0000000 --- a/Projects/AirportCEO/AirportCEO.sln +++ /dev/null @@ -1,16 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AirportCEO", "AirportCEO\AirportCEO.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/AirportCEO/AirportCEO.sln.DotSettings.user b/Projects/AirportCEO/AirportCEO.sln.DotSettings.user deleted file mode 100644 index 4c6b6d4..0000000 --- a/Projects/AirportCEO/AirportCEO.sln.DotSettings.user +++ /dev/null @@ -1,4 +0,0 @@ - - <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/AirportCEO/AirportCEO/.editorconfig b/Projects/AirportCEO/AirportCEO/.editorconfig deleted file mode 100644 index 7e98c67..0000000 --- a/Projects/AirportCEO/AirportCEO/.editorconfig +++ /dev/null @@ -1,6 +0,0 @@ -# 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/AirportCEO/AirportCEO/AirportCEO.csproj b/Projects/AirportCEO/AirportCEO/AirportCEO.csproj deleted file mode 100644 index 4d951da..0000000 --- a/Projects/AirportCEO/AirportCEO/AirportCEO.csproj +++ /dev/null @@ -1,62 +0,0 @@ - - - - - C:/Games/Airport CEO - $(GAME_DIR)/Airport CEO_Data/Managed - $(GAME_DIR)/BepInEx - Debug - AnyCPU - {DA9D274E-486F-4F82-84FF-CD9388CB0B09} - Library - Properties - DaveCEO - DaveCEO - 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/AirportCEO/AirportCEO/DaveCEO.cs b/Projects/AirportCEO/AirportCEO/DaveCEO.cs deleted file mode 100644 index c8cb8e6..0000000 --- a/Projects/AirportCEO/AirportCEO/DaveCEO.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Linq; -using BepInEx; -using BepInEx.Configuration; -using HarmonyLib; -using HarmonyLib.Tools; -using UnityEngine.SceneManagement; - -namespace DaveCEO { - [BepInPlugin(pluginGuid, pluginName, pluginVersion)] - public class Main : BaseUnityPlugin { - private const string pluginGuid = "DaveCEO"; - private const string pluginName = "DaveCEO"; - 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(EconomyController), "AddFunds")] - public static void Prefix(ref float sum) { - sum *= Main.moneyMultiplier.Value; - } - } -} \ No newline at end of file diff --git a/Projects/AirportCEO/AirportCEO/Properties/AssemblyInfo.cs b/Projects/AirportCEO/AirportCEO/Properties/AssemblyInfo.cs deleted file mode 100644 index 7b22a2f..0000000 --- a/Projects/AirportCEO/AirportCEO/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -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/AirportCEO/AirportCEO/sync.yml b/Projects/AirportCEO/AirportCEO/sync.yml deleted file mode 100644 index 0e6765e..0000000 --- a/Projects/AirportCEO/AirportCEO/sync.yml +++ /dev/null @@ -1,3 +0,0 @@ -- source: bin/Release/DaveCEO.dll - target: C:\Games\Airport CEO\BepInEx\plugins\DaveCEO.dll - delete: true diff --git a/Projects/AirportCEO/SupermarketSimulator.sln.DotSettings.user b/Projects/AirportCEO/SupermarketSimulator.sln.DotSettings.user deleted file mode 100644 index 4c6b6d4..0000000 --- a/Projects/AirportCEO/SupermarketSimulator.sln.DotSettings.user +++ /dev/null @@ -1,4 +0,0 @@ - - <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/AirportCEO/SupermarketTogether.sln.DotSettings.user b/Projects/AirportCEO/SupermarketTogether.sln.DotSettings.user deleted file mode 100644 index 4c6b6d4..0000000 --- a/Projects/AirportCEO/SupermarketTogether.sln.DotSettings.user +++ /dev/null @@ -1,4 +0,0 @@ - - <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/BanquetForFools/.clang-format b/Projects/BanquetForFools/.clang-format deleted file mode 100644 index d53bf86..0000000 --- a/Projects/BanquetForFools/.clang-format +++ /dev/null @@ -1,3 +0,0 @@ -BasedOnStyle: Google -IndentWidth: 4 -ColumnLimit: 120 \ No newline at end of file diff --git a/Projects/BanquetForFools/BanquetForCyka.sln b/Projects/BanquetForFools/BanquetForCyka.sln deleted file mode 100644 index 26cc872..0000000 --- a/Projects/BanquetForFools/BanquetForCyka.sln +++ /dev/null @@ -1,16 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BanquetForCyka", "BanquetForCyka\BanquetForCyka.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/BanquetForFools/BanquetForCyka/BanquetForCyka.csproj b/Projects/BanquetForFools/BanquetForCyka/BanquetForCyka.csproj deleted file mode 100644 index 4d5d3c7..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/BanquetForCyka.csproj +++ /dev/null @@ -1,96 +0,0 @@ - - - - - Debug - C:/Games/Banquet.for.Fools.Build.18497011 - $(GAME_DIR)/Banquet for Fools_Data/Managed - $(GAME_DIR)/BepInEx - AnyCPU - {EE5EFB7F-A4DC-44F0-967B-F71ECA2D46AE} - Library - Properties - BanquetForCyka - BanquetForCyka - v4.8 - 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_MANAGED)/UnityEngine.dll - - - $(GAME_MANAGED)/UnityEngine.CoreModule.dll - - - $(GAME_MANAGED)/Assembly-CSharp.dll - - - $(GAME_BEPINEX)/plugins/ConfigurationManager/ConfigurationManager.dll - - - - - - \ No newline at end of file diff --git a/Projects/BanquetForFools/BanquetForCyka/Class1.cs b/Projects/BanquetForFools/BanquetForCyka/Class1.cs deleted file mode 100644 index 0ac5cd2..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/Class1.cs +++ /dev/null @@ -1,147 +0,0 @@ -using System; -using System.Linq; -using System.Collections.Generic; -using BepInEx; -using BepInEx.Configuration; -using HarmonyLib; -using HarmonyLib.Tools; -using System.Reflection.Emit; - -namespace BanquetForCyka { - [BepInPlugin(PluginGuid, PluginName, PluginVersion)] - public class Main : BaseUnityPlugin { - private const string PluginGuid = "BanquetForCyka"; - private const string PluginName = "BanquetForCyka"; - private const string PluginVersion = "1.0.0"; - - public static ConfigEntry debug; - public static ConfigEntry debugXp; - public static ConfigEntry debugDodgeWindow; - public static ConfigEntry debugStatEntry; - public static ConfigEntry debugSkillEntry; - public static ConfigEntry debugLevelUpEntry; - - public static ExpressionConfigEntry xpMultiplier; - public static ExpressionConfigEntry dodgeWindowTotal; - public static ExpressionConfigEntry dodgeWindowPerfect; - public static ExpressionConfigEntry levelUpStatEntry; - public static ExpressionConfigEntry levelUpSkillEntry; - - public void Awake() { - debug = Config.Bind("Debug", "Global Debug", false); - debugXp = Config.Bind("Debug", "XP Debug", false); - debugDodgeWindow = Config.Bind("Debug", "Dodge Window Debug", false); - debugStatEntry = Config.Bind("Debug", "Stat Entry Debug", false); - debugSkillEntry = Config.Bind("Debug", "Skill Entry Debug", false); - debugLevelUpEntry = Config.Bind("Debug", "Level Up Entry Debug", false); - - xpMultiplier = new ExpressionConfigEntry( - Config, "General", "XP Multiplier", "v*1", - "XP Multiplier expression. Use 'v' to represent the original value.", debugXp); - dodgeWindowTotal = new ExpressionConfigEntry( - Config, "General", "Dodge Window Total", "v*1", - "Total dodge window duration expression. Use 'v' to represent the original value (20).", - debugDodgeWindow); - dodgeWindowPerfect = new ExpressionConfigEntry( - Config, "General", "Dodge Window Perfect", "v*1", - "Perfect dodge window percentage expression. Use 'v' to represent the original value (0.25).", - debugDodgeWindow); - levelUpStatEntry = new ExpressionConfigEntry( - Config, "General", "Level Up Stat Entry", "v*1", - "Stat Entry expression. Use 'v' to represent the original value.", debugStatEntry); - levelUpSkillEntry = new ExpressionConfigEntry( - Config, "General", "Level Up Skill Entry", "v*1", - "Skill Entry expression. Use 'v' to represent the original value.", debugSkillEntry); - - Logger.LogInfo("BanquetForCyka loaded"); - HarmonyFileLog.Enabled = true; - Harmony harmony = new Harmony(PluginGuid); - harmony.PatchAll(); - var originalMethods = harmony.GetPatchedMethods(); - Logger.LogInfo("Patched " + originalMethods.Count() + " methods"); - } - - public static void LogDebug(string message, ConfigEntry debugFlag = null) { - if (debug.Value || (debugFlag != null && debugFlag.Value)) - Console.WriteLine(message); - } - } - - [HarmonyPatch(typeof(Stats), "AddXP")] - public class Stats_AddXP { - public static void Prefix(ref int amt) { - Main.LogDebug("Original XP amount: " + amt, Main.debugXp); - float result = Main.xpMultiplier.Evaluate(amt); - amt = (int)result; - Main.LogDebug("Modified XP amount: " + amt, Main.debugXp); - } - } - - [HarmonyPatch(typeof(Actions), "DodgeCalculation")] - public class Actions_DodgeCalculation_Transpiler { - public static IEnumerable Transpiler(IEnumerable instructions) { - var codes = new List(instructions); - - // Find the ldc.r4 20 instruction - for (int i = 0; i < codes.Count; i++) { - if (codes[i].opcode == OpCodes.Ldc_R4 && (float)codes[i].operand == 20f) { - // Replace with our expression evaluation - codes[i] = new CodeInstruction(OpCodes.Ldsfld, AccessTools.Field(typeof(Main), "dodgeWindowTotal")); - codes.Insert(i + 1, new CodeInstruction(OpCodes.Ldc_R4, 20f)); - codes.Insert(i + 2, - new CodeInstruction(OpCodes.Callvirt, - AccessTools.Method(typeof(ExpressionConfigEntry), "Evaluate"))); - break; - } - } - - // Find the ldc.r4 0.25 instruction - for (int i = 0; i < codes.Count; i++) { - if (codes[i].opcode == OpCodes.Ldc_R4 && (float)codes[i].operand == 0.25f) { - // Replace with our expression evaluation - codes[i] = - new CodeInstruction(OpCodes.Ldsfld, AccessTools.Field(typeof(Main), "dodgeWindowPerfect")); - codes.Insert(i + 1, new CodeInstruction(OpCodes.Ldc_R4, 0.25f)); - codes.Insert(i + 2, - new CodeInstruction(OpCodes.Callvirt, - AccessTools.Method(typeof(ExpressionConfigEntry), "Evaluate"))); - break; - } - } - - return codes; - } - } - - [HarmonyPatch(typeof(LevelUp), "ClickedStat")] - public class Actions_ClickedStat { - public static IEnumerable Transpiler(IEnumerable instructions) { - var codes = new List(instructions); - - // Find the ldc.r4 1 instruction - for (int i = codes.Count - 1; i >= 0; i--) { - if (codes[i].opcode == OpCodes.Ldc_R4 && (float)codes[i].operand == 1f) { - // Replace with our expression evaluation - codes[i] = new CodeInstruction(OpCodes.Ldsfld, AccessTools.Field(typeof(Main), "levelUpStatEntry")); - codes.Insert(i + 1, new CodeInstruction(OpCodes.Ldc_R4, 1f)); - codes.Insert(i + 2, - new CodeInstruction(OpCodes.Callvirt, - AccessTools.Method(typeof(ExpressionConfigEntry), "Evaluate"))); - break; - } - } - - return codes; - } - } - - [HarmonyPatch(typeof(LevelUp), "IncreaseAmt")] - public class Actions_IncreaseAmount { - public static void Postfix(ref int __result) { - Main.LogDebug("Original amount: " + __result, Main.debugLevelUpEntry); - float result = Main.levelUpSkillEntry.Evaluate(__result); - __result = (int)result; - Main.LogDebug("Modified amount: " + __result, Main.debugLevelUpEntry); - } - } -} diff --git a/Projects/BanquetForFools/BanquetForCyka/CykUtil.cs b/Projects/BanquetForFools/BanquetForCyka/CykUtil.cs deleted file mode 100644 index 75fcaea..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/CykUtil.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; - -namespace BanquetForCyka { - public class CykUtil { - public static bool IsPlayerTank(Module module) { - if (module == null) - return false; - TankBlock block = module.block; - if (block == null) - return false; - Tank tank = block.tank; - if (tank == null) - return false; - return tank.ControllableByLocalPlayer; - } - - public static Func isObjectPlayerTank = obj => { - if (obj == null) - return false; - try { - return IsPlayerTank(obj as Module); - } catch (Exception e) { - Console.WriteLine("Failed to check if object is a player tank: " + e.Message); - return false; - } - }; - } -} diff --git a/Projects/BanquetForFools/BanquetForCyka/ExpressionConfigEntry.cs b/Projects/BanquetForFools/BanquetForCyka/ExpressionConfigEntry.cs deleted file mode 100644 index b30a3ea..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/ExpressionConfigEntry.cs +++ /dev/null @@ -1,269 +0,0 @@ -using System; -using System.Collections.Generic; -using BepInEx.Configuration; -using UnityEngine; - -namespace BanquetForCyka { - public class ExpressionConfigEntry { - private readonly ConfigEntry _configEntry; - private readonly ConfigEntry _debug; - private Func _compiledExpression; - private string _lastValidExpression; - private bool _isValid = true; - private string _currentInput; - - public string Value { - get => _configEntry.Value; - set { - if (value == _configEntry.Value) - return; - - _currentInput = value; - // Try to compile the expression - try { - LogDebug($"=== Starting compilation of new expression ===", _debug); - LogDebug($"Input expression: '{value}'", _debug); - var newExpr = ParseExpression(value, _debug); - _compiledExpression = newExpr; - _lastValidExpression = value; - _isValid = true; - LogDebug($"=== Expression compilation successful ===", _debug); - } catch (Exception e) { - _isValid = false; - LogDebug($"=== Expression compilation failed ===", _debug); - LogDebug($"Error: {e.Message}", _debug); - LogDebug($"Stack trace: {e.StackTrace}", _debug); - LogDebug($"Expression is invalid but keeping input: '{value}'", _debug); - } - } - } - - public bool IsValid => _isValid; - public string LastValidExpression => _lastValidExpression; - public string CurrentInput => _currentInput; - - public ExpressionConfigEntry(ConfigFile config, string section, string key, string defaultValue, - string description, ConfigEntry debug = null) { - _debug = debug; - LogDebug($"=== Initializing ExpressionConfigEntry ===", _debug); - LogDebug($"Section: {section}", _debug); - LogDebug($"Key: {key}", _debug); - LogDebug($"Default value: {defaultValue}", _debug); - - _configEntry = config.Bind( - section, key, defaultValue, - new ConfigDescription(description + - "\nUse 'v' to represent the input value. Examples: 'v*4', 'v+13', '(v+5)*2'")); - - _currentInput = defaultValue; - - // Initial compilation - try { - LogDebug($"=== Starting initial compilation ===", _debug); - LogDebug($"Initial expression: '{_configEntry.Value}'", _debug); - _compiledExpression = ParseExpression(_configEntry.Value, _debug); - _lastValidExpression = _configEntry.Value; - _isValid = true; - LogDebug($"=== Initial compilation successful ===", _debug); - } catch (Exception e) { - LogDebug($"=== Initial compilation failed ===", _debug); - LogDebug($"Error: {e.Message}", _debug); - LogDebug($"Stack trace: {e.StackTrace}", _debug); - _isValid = false; - } - - // Recompile when config changes - _configEntry.SettingChanged += (sender, args) => { - try { - LogDebug($"=== Config changed, starting recompilation ===", _debug); - LogDebug($"New expression: '{_configEntry.Value}'", _debug); - _compiledExpression = ParseExpression(_configEntry.Value, _debug); - _lastValidExpression = _configEntry.Value; - _isValid = true; - _currentInput = _configEntry.Value; - LogDebug($"=== Recompilation successful ===", _debug); - } catch (Exception e) { - _isValid = false; - LogDebug($"=== Recompilation failed ===", _debug); - LogDebug($"Error: {e.Message}", _debug); - LogDebug($"Stack trace: {e.StackTrace}", _debug); - LogDebug($"Expression is invalid but keeping input: '{_configEntry.Value}'", _debug); - _currentInput = _configEntry.Value; - } - }; - } - - public float Evaluate(float input) { - if (!_isValid) { - LogDebug($"=== Evaluation with invalid expression ===", _debug); - LogDebug($"Input value: {input}", _debug); - LogDebug($"Using last valid expression: '{_lastValidExpression}'", _debug); - return input; // Return original value if expression is invalid - } - LogDebug($"=== Starting expression evaluation ===", _debug); - LogDebug($"Expression: '{_configEntry.Value}'", _debug); - LogDebug($"Input value: {input}", _debug); - var result = _compiledExpression(input); - LogDebug($"Output value: {result}", _debug); - LogDebug($"=== Evaluation complete ===", _debug); - return result; - } - - private static void LogDebug(string message, ConfigEntry debug) { - if (debug?.Value == true) { - Console.WriteLine($"[ExpressionConfigEntry] {message}"); - } - } - - // Copy of the expression parser from Main - private static Func ParseExpression(string expr, ConfigEntry debug) { - try { - LogDebug($"=== Starting expression parsing ===", debug); - LogDebug($"Raw expression: '{expr}'", debug); - - // Remove all whitespace - expr = expr.Replace(" ", ""); - LogDebug($"After whitespace removal: '{expr}'", debug); - - var tokens = new List(); - var current = ""; - - // Tokenize the expression - LogDebug("=== Tokenizing expression ===", debug); - for (int i = 0; i < expr.Length; i++) { - char c = expr[i]; - if (c == 'v') { - if (current != "") { - LogDebug($"Found number token: '{current}'", debug); - tokens.Add(current); - current = ""; - } - LogDebug("Found variable token: 'v'", debug); - tokens.Add("v"); - } else if (c == '+' || c == '-' || c == '*' || c == '/' || c == '(' || c == ')') { - if (current != "") { - LogDebug($"Found number token: '{current}'", debug); - tokens.Add(current); - current = ""; - } - LogDebug($"Found operator token: '{c}'", debug); - tokens.Add(c.ToString()); - } else { - current += c; - } - } - if (current != "") { - LogDebug($"Found final number token: '{current}'", debug); - tokens.Add(current); - } - LogDebug($"All tokens: {string.Join(", ", tokens)}", debug); - - // Convert to postfix notation using shunting yard - LogDebug("=== Converting to postfix notation ===", debug); - var output = new List(); - var operators = new Stack(); - - foreach (var token in tokens) { - if (token == "v" || float.TryParse(token, out _)) { - LogDebug($"Pushing operand to output: '{token}'", debug); - output.Add(token); - } else if (token == "(") { - LogDebug("Pushing '(' to operator stack", debug); - operators.Push(token); - } else if (token == ")") { - LogDebug("Found ')', popping operators until '('", debug); - while (operators.Count > 0 && operators.Peek() != "(") { - var op = operators.Pop(); - LogDebug($"Popped operator to output: '{op}'", debug); - output.Add(op); - } - if (operators.Count > 0) { - LogDebug("Popping '(' from stack", debug); - operators.Pop(); // Remove "(" - } - } else { - LogDebug($"Processing operator: '{token}'", debug); - while (operators.Count > 0 && operators.Peek() != "(" && - GetPrecedence(operators.Peek()) >= GetPrecedence(token)) { - var op = operators.Pop(); - LogDebug($"Popped higher precedence operator to output: '{op}'", debug); - output.Add(op); - } - LogDebug($"Pushing operator to stack: '{token}'", debug); - operators.Push(token); - } - } - - while (operators.Count > 0) { - var op = operators.Pop(); - LogDebug($"Popping remaining operator to output: '{op}'", debug); - output.Add(op); - } - - LogDebug($"Postfix expression: {string.Join(" ", output)}", debug); - - // Build the expression tree - LogDebug("=== Building expression tree ===", debug); - var stack = new Stack>(); - - foreach (var token in output) { - if (token == "v") { - LogDebug("Pushing variable function to stack", debug); - stack.Push(v => v); - } else if (float.TryParse(token, out float num)) { - LogDebug($"Pushing constant function to stack: {num}", debug); - stack.Push(v => num); - } else { - var right = stack.Pop(); - var left = stack.Pop(); - LogDebug($"Popped two functions for operator: '{token}'", debug); - - switch (token) { - case "+": - LogDebug("Creating addition function", debug); - stack.Push(v => left(v) + right(v)); - break; - case "-": - LogDebug("Creating subtraction function", debug); - stack.Push(v => left(v) - right(v)); - break; - case "*": - LogDebug("Creating multiplication function", debug); - stack.Push(v => left(v) * right(v)); - break; - case "/": - LogDebug("Creating division function", debug); - stack.Push(v => { - var r = right(v); - return r != 0 ? left(v) / r : left(v); - }); - break; - } - } - } - - LogDebug("=== Expression parsing complete ===", debug); - return stack.Pop(); - } catch (Exception e) { - LogDebug($"=== Expression parsing failed ===", debug); - LogDebug($"Error: {e.Message}", debug); - throw new FormatException($"Failed to parse expression '{expr}': {e.Message}"); - } - } - - private static int GetPrecedence(string op) { - switch (op) { - case "+": - return 1; - case "-": - return 1; - case "*": - return 2; - case "/": - return 2; - default: - return 0; - } - } - } -} \ No newline at end of file diff --git a/Projects/BanquetForFools/BanquetForCyka/ModuleBoosterManager.cs b/Projects/BanquetForFools/BanquetForCyka/ModuleBoosterManager.cs deleted file mode 100644 index c2a0ab8..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/ModuleBoosterManager.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.Collections.Generic; -using BepInEx.Configuration; -using HarmonyLib; - -namespace BanquetForCyka { - [HarmonyPatch] - public class ModuleBoosterManager { - private static readonly MultipliedObjectManager FanManager = - new MultipliedObjectManager(ConfigureFanThruster); - private static readonly MultipliedObjectManager JetManager = - new MultipliedObjectManager(ConfigureJetThruster); - - private static ConfigEntry playerOnly; - private static ConfigEntry fanThrustMultiplier; - private static ConfigEntry jetThrustMultiplier; - - public static void Setup(ConfigFile config) { - float min = 0.01f; - float max = 32f; - - playerOnly = config.Bind("Booster", "Player Only", false, new ConfigDescription("Player Only")); - playerOnly.SettingChanged += (sender, args) => DoPatch(); - - fanThrustMultiplier = - config.Bind("Booster", "Fan Thrust Multiplier", 1f, - new ConfigDescription("Fan Thrust Multiplier", new AcceptableValueRange(min, max))); - fanThrustMultiplier.SettingChanged += (sender, args) => DoPatch(); - - jetThrustMultiplier = - config.Bind("Booster", "Jet Thrust Multiplier", 1f, - new ConfigDescription("Jet Thrust Multiplier", new AcceptableValueRange(min, max))); - jetThrustMultiplier.SettingChanged += (sender, args) => DoPatch(); - } - - private static void ConfigureFanThruster(MultipliedObject obj) { - obj.AddField(new FieldConfiguration("m_Force", fanThrustMultiplier, ShouldApply)); - } - - private static void ConfigureJetThruster(MultipliedObject obj) { - obj.AddField(new FieldConfiguration("m_Force", jetThrustMultiplier, ShouldApply)); - } - - private static readonly Func ShouldApply = obj => { - if (!playerOnly.Value) - return true; - return CykUtil.isObjectPlayerTank(obj); - }; - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleBooster), "OnAttached")] - public static void PostfixCreate(ModuleBooster __instance) { - var trav = Traverse.Create(__instance); - var fans = trav.Field("fans").GetValue>(); - var jets = trav.Field("jets").GetValue>(); - - foreach (var fan in fans) FanManager.OnObjectAttached(fan); - foreach (var jet in jets) JetManager.OnObjectAttached(jet); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleBooster), "OnDetaching")] - public static void PostfixDestroy(ModuleBooster __instance) { - var trav = Traverse.Create(__instance); - var fans = trav.Field("fans").GetValue>(); - var jets = trav.Field("jets").GetValue>(); - - foreach (var fan in fans) FanManager.OnObjectDetached(fan); - foreach (var jet in jets) JetManager.OnObjectDetached(jet); - } - - private static void DoPatch() { - FanManager.ApplyAll(); - JetManager.ApplyAll(); - } - - public static readonly Func Register = obj => { - if (Main.debug.Value) - Console.WriteLine("Registering ModuleBooster: {0}", obj); - PostfixCreate(obj as ModuleBooster); - return true; - }; - } -} diff --git a/Projects/BanquetForFools/BanquetForCyka/ModuleEnergyManager.cs b/Projects/BanquetForFools/BanquetForCyka/ModuleEnergyManager.cs deleted file mode 100644 index b34a438..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/ModuleEnergyManager.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using BepInEx.Configuration; -using HarmonyLib; - -namespace BanquetForCyka { - [HarmonyPatch] - public class ModuleEnergyManager { - private static readonly MultipliedObjectManager Manager = - new MultipliedObjectManager(ConfigureModuleEnergy); - - private static ConfigEntry playerOnly; - private static ConfigEntry outputMultiplier; - private static ConfigEntry powerUpDelayMultiplier; - - public static void Setup(ConfigFile config) { - float min = 0.01f; - float max = 32f; - - playerOnly = config.Bind("Energy", "Player Only", false, new ConfigDescription("Player Only")); - playerOnly.SettingChanged += (sender, args) => DoPatch(); - - outputMultiplier = - config.Bind("Energy", "Output Multiplier", 1f, - new ConfigDescription("Output Multiplier", new AcceptableValueRange(min, max))); - outputMultiplier.SettingChanged += (sender, args) => DoPatch(); - - powerUpDelayMultiplier = config.Bind( - "Energy", "Power Up Delay Multiplier", 1f, - new ConfigDescription("Power Up Delay Multiplier", new AcceptableValueRange(min, max))); - powerUpDelayMultiplier.SettingChanged += (sender, args) => DoPatch(); - } - - private static void ConfigureModuleEnergy(MultipliedObject obj) { - obj.AddField(new FieldConfiguration("m_OutputPerSecond", outputMultiplier, ShouldApply)); - obj.AddField(new FieldConfiguration("m_PowerUpDelay", powerUpDelayMultiplier, ShouldApply)); - } - - private static readonly Func ShouldApply = obj => { - if (!playerOnly.Value) - return true; - return CykUtil.IsPlayerTank(obj as Module); - }; - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleEnergy), "OnAnchorStatusChanged")] - public static void PostfixCreate(ModuleEnergy __instance) { - Manager.OnObjectAttached(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleEnergy), "OnDetaching")] - public static void PostfixDestroy(ModuleEnergy __instance) { - Manager.OnObjectDetached(__instance); - } - - private static void DoPatch() { - Manager.ApplyAll(); - } - - public static readonly Func Register = obj => { - if (Main.debug.Value) - Console.WriteLine("Registering ModuleEnergy: {0}", obj); - PostfixCreate(obj as ModuleEnergy); - return true; - }; - } -} diff --git a/Projects/BanquetForFools/BanquetForCyka/ModuleEnergyStoreManager.cs b/Projects/BanquetForFools/BanquetForCyka/ModuleEnergyStoreManager.cs deleted file mode 100644 index a0a5cad..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/ModuleEnergyStoreManager.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using BepInEx.Configuration; -using HarmonyLib; - -namespace BanquetForCyka { - [HarmonyPatch] - public class ModuleEnergyStoreManager { - private static readonly MultipliedObjectManager Manager = - new MultipliedObjectManager(ConfigureModuleEnergyStore); - - private static ConfigEntry playerOnly; - private static ConfigEntry capacityMultiplier; - - public static void Setup(ConfigFile config) { - float min = 0.01f; - float max = 32f; - - playerOnly = config.Bind("Energy", "Player Only", false, new ConfigDescription("Player Only")); - playerOnly.SettingChanged += (sender, args) => DoPatch(); - - capacityMultiplier = - config.Bind("Energy", "Capacity Multiplier", 1f, - new ConfigDescription("Capacity Multiplier", new AcceptableValueRange(min, max))); - capacityMultiplier.SettingChanged += (sender, args) => DoPatch(); - } - - private static void ConfigureModuleEnergyStore(MultipliedObject obj) { - obj.AddField(new FieldConfiguration("m_Capacity", capacityMultiplier, ShouldApply)); - } - - private static readonly Func ShouldApply = obj => { - if (!playerOnly.Value) - return true; - return CykUtil.IsPlayerTank(obj as Module); - }; - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleEnergyStore), "OnAttached")] - public static void PostfixCreate(ModuleEnergyStore __instance) { - Manager.OnObjectAttached(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleEnergyStore), "OnDetaching")] - public static void PostfixDestroy(ModuleEnergyStore __instance) { - Manager.OnObjectDetached(__instance); - } - - private static void DoPatch() { - Manager.ApplyAll(); - } - - public static readonly Func Register = obj => { - if (Main.debug.Value) - Console.WriteLine("Registering ModuleEnergyStore: {0}", obj); - PostfixCreate(obj as ModuleEnergyStore); - return true; - }; - } -} diff --git a/Projects/BanquetForFools/BanquetForCyka/ModuleFuelTankManager.cs b/Projects/BanquetForFools/BanquetForCyka/ModuleFuelTankManager.cs deleted file mode 100644 index d05556a..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/ModuleFuelTankManager.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using BepInEx.Configuration; -using HarmonyLib; - -namespace BanquetForCyka { - [HarmonyPatch] - public class ModuleFuelTankManager { - private static readonly MultipliedObjectManager Manager = - new MultipliedObjectManager(ConfigureFuelTank); - - private static ConfigEntry playerOnly; - private static ConfigEntry fuelCapacityMultiplier; - private static ConfigEntry fuelRefillMultiplier; - - public static void Setup(ConfigFile config) { - float min = 0.01f; - float max = 32f; - - playerOnly = config.Bind("FuelTank", "Player Only", false, new ConfigDescription("Player Only")); - playerOnly.SettingChanged += (sender, args) => DoPatch(); - - fuelCapacityMultiplier = config.Bind( - "FuelTank", "Fuel Capacity Multiplier", 1f, - new ConfigDescription("Fuel Capacity Multiplier", new AcceptableValueRange(min, max))); - fuelCapacityMultiplier.SettingChanged += (sender, args) => DoPatch(); - - fuelRefillMultiplier = - config.Bind("FuelTank", "Fuel Refill Multiplier", 1f, - new ConfigDescription("Fuel Refill Multiplier", new AcceptableValueRange(min, max))); - fuelRefillMultiplier.SettingChanged += (sender, args) => DoPatch(); - } - - private static void ConfigureFuelTank(MultipliedObject obj) { - obj.AddField(new FieldConfiguration("m_Capacity", fuelCapacityMultiplier, ShouldApply)); - obj.AddField(new FieldConfiguration("m_RefillRate", fuelRefillMultiplier, ShouldApply)); - } - - private static readonly Func ShouldApply = obj => { - if (!playerOnly.Value) - return true; - return CykUtil.isObjectPlayerTank(obj); - }; - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleFuelTank), "OnAttached")] - public static void PostfixCreate(ModuleFuelTank __instance) { - Manager.OnObjectAttached(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleFuelTank), "OnDetaching")] - public static void PostfixDestroy(ModuleFuelTank __instance) { - Manager.OnObjectDetached(__instance); - } - - private static void DoPatch() { - Manager.ApplyAll(); - } - - public static readonly Func Register = obj => { - if (Main.debug.Value) - Console.WriteLine("Registering ModuleFuelTank: {0}", obj); - PostfixCreate(obj as ModuleFuelTank); - return true; - }; - } -} diff --git a/Projects/BanquetForFools/BanquetForCyka/ModuleGyroManager.cs b/Projects/BanquetForFools/BanquetForCyka/ModuleGyroManager.cs deleted file mode 100644 index acbd9c4..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/ModuleGyroManager.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using BepInEx.Configuration; -using HarmonyLib; - -namespace BanquetForCyka { - [HarmonyPatch] - public class ModuleGyroManager { - private static readonly MultipliedObjectManager Manager = - new MultipliedObjectManager(ConfigureModuleGyro); - - private static ConfigEntry playerOnly; - private static ConfigEntry activeSpeedMultiplier; - - public static void Setup(ConfigFile config) { - float min = 0.01f; - float max = 32f; - - playerOnly = config.Bind("Gyro", "Player Only", false, new ConfigDescription("Player Only")); - playerOnly.SettingChanged += (sender, args) => DoPatch(); - - activeSpeedMultiplier = config.Bind( - "Gyro", "Active Speed Multiplier", 1f, - new ConfigDescription("Active Speed Multiplier", new AcceptableValueRange(min, max))); - activeSpeedMultiplier.SettingChanged += (sender, args) => DoPatch(); - } - - private static void ConfigureModuleGyro(MultipliedObject obj) { - obj.AddField(new FieldConfiguration("m_ActiveSpeed", activeSpeedMultiplier, ShouldApply)); - } - - private static readonly Func ShouldApply = obj => { - if (!playerOnly.Value) - return true; - return CykUtil.IsPlayerTank(obj as Module); - }; - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleGyro), "OnAttached")] - public static void PostfixCreate(ModuleGyro __instance) { - Manager.OnObjectAttached(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleGyro), "OnDetaching")] - public static void PostfixDestroy(ModuleGyro __instance) { - Manager.OnObjectDetached(__instance); - } - - private static void DoPatch() { - Manager.ApplyAll(); - } - - public static readonly Func Register = obj => { - if (Main.debug.Value) - Console.WriteLine("Registering ModuleGyro: {0}", obj); - PostfixCreate(obj as ModuleGyro); - return true; - }; - } -} diff --git a/Projects/BanquetForFools/BanquetForCyka/ModuleHeartManager.cs b/Projects/BanquetForFools/BanquetForCyka/ModuleHeartManager.cs deleted file mode 100644 index 57f250f..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/ModuleHeartManager.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using BepInEx.Configuration; -using HarmonyLib; - -namespace BanquetForCyka { - [HarmonyPatch] - public class ModuleHeartManager { - private static readonly MultipliedObjectManager Manager = - new MultipliedObjectManager(ConfigureHeart); - - private static ConfigEntry playerOnly; - private static ConfigEntry eventHorizonRadiusMultiplier; - private static ConfigEntry setupTimeMultiplier; - private static ConfigEntry startShrinkingRadiusMultiplier; - - public static void Setup(ConfigFile config) { - float min = 0.01f; - float max = 32f; - - playerOnly = config.Bind("Heart", "Player Only", false, new ConfigDescription("Player Only")); - playerOnly.SettingChanged += (sender, args) => DoPatch(); - - eventHorizonRadiusMultiplier = config.Bind( - "Heart", "Event Horizon Radius Multiplier", 1f, - new ConfigDescription("Event Horizon Radius Multiplier", new AcceptableValueRange(min, max))); - eventHorizonRadiusMultiplier.SettingChanged += (sender, args) => DoPatch(); - - setupTimeMultiplier = - config.Bind("Heart", "Setup Time Multiplier", 1f, - new ConfigDescription("Setup Time Multiplier", new AcceptableValueRange(min, max))); - setupTimeMultiplier.SettingChanged += (sender, args) => DoPatch(); - - startShrinkingRadiusMultiplier = config.Bind( - "Heart", "Start Shrinking Radius Multiplier", 1f, - new ConfigDescription("Start Shrinking Radius Multiplier", new AcceptableValueRange(min, max))); - startShrinkingRadiusMultiplier.SettingChanged += (sender, args) => DoPatch(); - } - - private static void ConfigureHeart(MultipliedObject obj) { - obj.AddField(new FieldConfiguration("m_EventHorizonRadius", eventHorizonRadiusMultiplier, - ShouldApply)); - obj.AddField(new FieldConfiguration("m_SetupTime", setupTimeMultiplier, ShouldApply)); - obj.AddField(new FieldConfiguration("m_StartShrinkingRadius", startShrinkingRadiusMultiplier, - ShouldApply)); - } - - private static readonly Func ShouldApply = obj => { - if (!playerOnly.Value) - return true; - return CykUtil.isObjectPlayerTank(obj); - }; - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleHeart), "OnAttached")] - public static void PostfixCreate(ModuleHeart __instance) { - Manager.OnObjectAttached(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleHeart), "OnDetaching")] - public static void PostfixDestroy(ModuleHeart __instance) { - Manager.OnObjectDetached(__instance); - } - - private static void DoPatch() { - Manager.ApplyAll(); - } - - public static readonly Func Register = obj => { - if (Main.debug.Value) - Console.WriteLine("Registering ModuleHeart: {0}", obj); - PostfixCreate(obj as ModuleHeart); - return true; - }; - } -} diff --git a/Projects/BanquetForFools/BanquetForCyka/ModuleItemHolderManager.cs b/Projects/BanquetForFools/BanquetForCyka/ModuleItemHolderManager.cs deleted file mode 100644 index 1b446d9..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/ModuleItemHolderManager.cs +++ /dev/null @@ -1,164 +0,0 @@ -using System; -using BepInEx.Configuration; -using HarmonyLib; - -namespace BanquetForCyka { - [HarmonyPatch] - public class ModuleItemHolderManager { - private static readonly MultipliedObjectManager BeamManager = - new MultipliedObjectManager(ConfigureBeam); - private static readonly MultipliedObjectManager BeamHolderManager = - new MultipliedObjectManager(ConfigureBeamHolder); - private static readonly MultipliedObjectManager BeamPickupManager = - new MultipliedObjectManager(ConfigureBeamPickup); - - private static readonly MultipliedObjectManager MagnetHolderManager = - new MultipliedObjectManager(ConfigureMagnetHolder); - private static readonly MultipliedObjectManager MagnetPickupManager = - new MultipliedObjectManager(ConfigureMagnetPickup); - - private static ConfigEntry playerOnly; - private static ConfigEntry capacityPerStackMultiplier; - private static ConfigEntry beamStrengthMultiplier; - private static ConfigEntry beamHeightIncrementScaleMultiplier; - private static ConfigEntry beamPickupRangeMultiplier; - private static ConfigEntry magnetStrengthMultiplier; - private static ConfigEntry magnetPickupRangeMultiplier; - - public static void Setup(ConfigFile config) { - float min = 0.01f; - float max = 32f; - - playerOnly = config.Bind("Item Holder", "Player Only", false, new ConfigDescription("Player Only")); - playerOnly.SettingChanged += (sender, args) => DoPatch(); - - capacityPerStackMultiplier = config.Bind( - "Item Holder", "Capacity Per Stack Multiplier", 1f, - new ConfigDescription("Capacity Per Stack Multiplier", new AcceptableValueRange(min, max))); - capacityPerStackMultiplier.SettingChanged += (sender, args) => DoPatch(); - - beamStrengthMultiplier = config.Bind( - "Item Holder", "Beam Strength Multiplier", 1f, - new ConfigDescription("Beam Strength Multiplier", new AcceptableValueRange(min, max))); - beamStrengthMultiplier.SettingChanged += (sender, args) => DoPatch(); - - beamHeightIncrementScaleMultiplier = - config.Bind("Item Holder", "Beam Height Increment Scale Multiplier", 1f, - new ConfigDescription("Beam Height Increment Scale Multiplier", - new AcceptableValueRange(min, max))); - beamHeightIncrementScaleMultiplier.SettingChanged += (sender, args) => DoPatch(); - - beamPickupRangeMultiplier = config.Bind( - "Item Holder", "Beam Pickup Range Multiplier", 1f, - new ConfigDescription("Beam Pickup Range Multiplier", new AcceptableValueRange(min, max))); - beamPickupRangeMultiplier.SettingChanged += (sender, args) => DoPatch(); - - magnetStrengthMultiplier = config.Bind( - "Item Holder", "Magnet Strength Multiplier", 1f, - new ConfigDescription("Magnet Strength Multiplier", new AcceptableValueRange(min, max))); - magnetStrengthMultiplier.SettingChanged += (sender, args) => DoPatch(); - - magnetPickupRangeMultiplier = config.Bind( - "Item Holder", "Magnet Pickup Range Multiplier", 1f, - new ConfigDescription("Magnet Pickup Range Multiplier", new AcceptableValueRange(min, max))); - magnetPickupRangeMultiplier.SettingChanged += (sender, args) => DoPatch(); - } - - private static void ConfigureBeam(MultipliedObject obj) { - obj.AddField( - new FieldConfiguration("m_CapacityPerStack", capacityPerStackMultiplier, ShouldApply)); - } - - private static void ConfigureBeamHolder(MultipliedObject obj) { - obj.AddField(new FieldConfiguration("m_BeamStrength", beamStrengthMultiplier, ShouldApply)); - obj.AddField(new FieldConfiguration("m_HeightIncrementScale", - beamHeightIncrementScaleMultiplier, ShouldApply)); - } - - private static void ConfigureBeamPickup(MultipliedObject obj) { - obj.AddField(new FieldConfiguration("m_PickupRange", beamPickupRangeMultiplier, ShouldApply)); - } - - private static void ConfigureMagnetHolder(MultipliedObject obj) { - obj.AddField(new FieldConfiguration("m_Strength", magnetStrengthMultiplier, ShouldApply)); - } - - private static void ConfigureMagnetPickup(MultipliedObject obj) { - obj.AddField( - new FieldConfiguration("m_PickupRange", magnetPickupRangeMultiplier, ShouldApply)); - } - - private static readonly Func ShouldApply = obj => { - if (!playerOnly.Value) - return true; - return CykUtil.IsPlayerTank(obj as Module); - }; - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleItemHolder), "OnAttached")] - public static void PostfixCreate(ModuleItemHolder __instance) { - BeamManager.OnObjectAttached(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleItemHolder), "OnDetaching")] - public static void PostfixDestroy(ModuleItemHolder __instance) { - BeamManager.OnObjectDetached(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleItemHolderBeam), "OnAttached")] - public static void PostfixCreate(ModuleItemHolderBeam __instance) { - var trav = Traverse.Create(__instance); - var pickup = trav.Field("m_Pickup").GetValue(); - - BeamHolderManager.OnObjectAttached(__instance); - BeamPickupManager.OnObjectAttached(pickup); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleItemHolderBeam), "OnDetaching")] - public static void PostfixDestroy(ModuleItemHolderBeam __instance) { - var trav = Traverse.Create(__instance); - var pickup = trav.Field("m_Pickup").GetValue(); - - BeamHolderManager.OnObjectDetached(__instance); - BeamPickupManager.OnObjectDetached(pickup); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleItemHolderMagnet), "OnAttached")] - public static void PostfixCreate(ModuleItemHolderMagnet __instance) { - var trav = Traverse.Create(__instance); - var pickup = trav.Field("m_Pickup").GetValue(); - - MagnetHolderManager.OnObjectAttached(__instance); - MagnetPickupManager.OnObjectAttached(pickup); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleItemHolderMagnet), "OnDetaching")] - public static void PostfixDestroy(ModuleItemHolderMagnet __instance) { - var trav = Traverse.Create(__instance); - var pickup = trav.Field("m_Pickup").GetValue(); - - MagnetHolderManager.OnObjectDetached(__instance); - MagnetPickupManager.OnObjectDetached(pickup); - } - - private static void DoPatch() { - BeamManager.ApplyAll(); - BeamHolderManager.ApplyAll(); - BeamPickupManager.ApplyAll(); - MagnetHolderManager.ApplyAll(); - MagnetPickupManager.ApplyAll(); - } - - public static readonly Func Register = obj => { - if (Main.debug.Value) - Console.WriteLine("Registering ModuleItemHolder: {0}", obj); - PostfixCreate(obj as ModuleItemHolder); - return true; - }; - } -} diff --git a/Projects/BanquetForFools/BanquetForCyka/ModuleItemProducerManager.cs b/Projects/BanquetForFools/BanquetForCyka/ModuleItemProducerManager.cs deleted file mode 100644 index d2aa639..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/ModuleItemProducerManager.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using BepInEx.Configuration; -using HarmonyLib; - -namespace BanquetForCyka { - [HarmonyPatch] - public class ModuleItemProducerManager { - private static readonly MultipliedObjectManager Manager = - new MultipliedObjectManager(ConfigureModuleItemProducer); - - private static ConfigEntry playerOnly; - private static ConfigEntry resourceGroundRadiusMultiplier; - private static ConfigEntry minDispenseIntervalMultiplier; - private static ConfigEntry secPerItemProducedMultiplier; - - public static void Setup(ConfigFile config) { - float min = 0.01f; - float max = 32f; - - playerOnly = config.Bind("Item Producer", "Player Only", false, new ConfigDescription("Player Only")); - playerOnly.SettingChanged += (sender, args) => DoPatch(); - - resourceGroundRadiusMultiplier = config.Bind( - "Item Producer", "Resource Ground Radius Multiplier", 1f, - new ConfigDescription("Resource Ground Radius Multiplier", new AcceptableValueRange(min, max))); - resourceGroundRadiusMultiplier.SettingChanged += (sender, args) => DoPatch(); - - minDispenseIntervalMultiplier = config.Bind( - "Item Producer", "Min Dispense Interval Multiplier", 1f, - new ConfigDescription("Min Dispense Interval Multiplier", new AcceptableValueRange(min, max))); - minDispenseIntervalMultiplier.SettingChanged += (sender, args) => DoPatch(); - - secPerItemProducedMultiplier = config.Bind( - "Item Producer", "Sec Per Item Produced Multiplier", 1f, - new ConfigDescription("Sec Per Item Produced Multiplier", new AcceptableValueRange(min, max))); - secPerItemProducedMultiplier.SettingChanged += (sender, args) => DoPatch(); - } - - private static void ConfigureModuleItemProducer(MultipliedObject obj) { - obj.AddField(new FieldConfiguration("m_ResourceGroundRadius", resourceGroundRadiusMultiplier, - ShouldApply)); - obj.AddField(new FieldConfiguration("m_MinDispenseInterval", minDispenseIntervalMultiplier, - ShouldApply)); - obj.AddField(new FieldConfiguration("m_SecPerItemProduced", secPerItemProducedMultiplier, - ShouldApply)); - } - - private static readonly Func ShouldApply = obj => { - if (!playerOnly.Value) - return true; - return CykUtil.IsPlayerTank(obj as Module); - }; - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleItemProducer), "GetClosestResourceReservoirInRange")] - public static void PostfixCreate(ModuleItemProducer __instance) { - Manager.OnObjectAttached(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleItemProducer), "OnDetaching")] - public static void PostfixDestroy(ModuleItemProducer __instance) { - Manager.OnObjectDetached(__instance); - } - - private static void DoPatch() { - Manager.ApplyAll(); - } - - public static readonly Func Register = obj => { - if (Main.debug.Value) - Console.WriteLine("Registering ModuleItemProducer: {0}", obj); - PostfixCreate(obj as ModuleItemProducer); - return true; - }; - } -} diff --git a/Projects/BanquetForFools/BanquetForCyka/ModuleRemoteChargerManager.cs b/Projects/BanquetForFools/BanquetForCyka/ModuleRemoteChargerManager.cs deleted file mode 100644 index 00442a8..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/ModuleRemoteChargerManager.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using BepInEx.Configuration; -using HarmonyLib; - -namespace BanquetForCyka { - [HarmonyPatch] - public class ModuleRemoteChargerManager { - private static readonly MultipliedObjectManager Manager = - new MultipliedObjectManager(ConfigureModuleRemoteCharger); - - private static ConfigEntry playerOnly; - private static ConfigEntry arcFiringIntervalMultiplier; - private static ConfigEntry chargingRadiusMultiplier; - private static ConfigEntry powerTransferPerArcMultiplier; - - public static void Setup(ConfigFile config) { - const float min = 0.01f; - const float max = 32f; - - playerOnly = config.Bind("Remote Charger", "Player Only", false, new ConfigDescription("Player Only")); - playerOnly.SettingChanged += (sender, args) => DoPatch(); - - arcFiringIntervalMultiplier = config.Bind( - "Remote Charger", "Arc Firing Interval Multiplier", 1f, - new ConfigDescription("Arc Firing Interval Multiplier", new AcceptableValueRange(min, max))); - arcFiringIntervalMultiplier.SettingChanged += (sender, args) => DoPatch(); - - chargingRadiusMultiplier = config.Bind( - "Remote Charger", "Charging Radius Multiplier", 1f, - new ConfigDescription("Charging Radius Multiplier", new AcceptableValueRange(min, max))); - chargingRadiusMultiplier.SettingChanged += (sender, args) => DoPatch(); - - powerTransferPerArcMultiplier = config.Bind( - "Remote Charger", "Power Transfer Per Arc Multiplier", 1f, - new ConfigDescription("Power Transfer Per Arc Multiplier", new AcceptableValueRange(min, max))); - powerTransferPerArcMultiplier.SettingChanged += (sender, args) => DoPatch(); - } - - private static void ConfigureModuleRemoteCharger(MultipliedObject obj) { - obj.AddField( - new FieldConfiguration("m_ArcFiringInterval", arcFiringIntervalMultiplier, ShouldApply)); - obj.AddField( - new FieldConfiguration("m_ChargingRadius", chargingRadiusMultiplier, ShouldApply)); - obj.AddField(new FieldConfiguration("m_PowerTransferPerArc", powerTransferPerArcMultiplier, - ShouldApply)); - } - - private static readonly Func ShouldApply = obj => { - if (!playerOnly.Value) - return true; - return CykUtil.IsPlayerTank(obj as Module); - }; - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleRemoteCharger), "OnAttached")] - public static void PostfixCreate(ModuleRemoteCharger __instance) { - Manager.OnObjectAttached(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleRemoteCharger), "OnDetaching")] - public static void PostfixDestroy(ModuleRemoteCharger __instance) { - Manager.OnObjectDetached(__instance); - } - - private static void DoPatch() { - Manager.ApplyAll(); - } - - public static readonly Func Register = obj => { - if (Main.debug.Value) - Console.WriteLine("Registering ModuleRemoteCharger: {0}", obj); - PostfixCreate(obj as ModuleRemoteCharger); - return true; - }; - } -} diff --git a/Projects/BanquetForFools/BanquetForCyka/ModuleShieldGeneratorManager.cs b/Projects/BanquetForFools/BanquetForCyka/ModuleShieldGeneratorManager.cs deleted file mode 100644 index 84828e0..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/ModuleShieldGeneratorManager.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using BepInEx.Configuration; -using HarmonyLib; - -namespace BanquetForCyka { - [HarmonyPatch] - public class ModuleShieldGeneratorManager { - private static readonly MultipliedObjectManager Manager = - new MultipliedObjectManager(ConfigureShieldGenerator); - - private static ConfigEntry playerOnly; - private static ConfigEntry radiusMultiplier; - private static ConfigEntry radiusMultiplierHealing; - private static ConfigEntry heartbeatIntervalMultiplier; - private static ConfigEntry powerUpDelayMultiplier; - - public static void Setup(ConfigFile config) { - const float min = 0.01f; - const float max = 32f; - - playerOnly = config.Bind("Shield", "Player Only", false, new ConfigDescription("Player Only")); - playerOnly.SettingChanged += (sender, args) => DoPatch(); - - radiusMultiplier = - config.Bind("Shield", "Radius Multiplier", 1f, - new ConfigDescription("Radius Multiplier", new AcceptableValueRange(min, max))); - radiusMultiplier.SettingChanged += (sender, args) => DoPatch(); - - heartbeatIntervalMultiplier = config.Bind( - "Shield", "Heartbeat Interval Multiplier", 1f, - new ConfigDescription("Heartbeat Interval Multiplier", new AcceptableValueRange(min, max))); - heartbeatIntervalMultiplier.SettingChanged += (sender, args) => DoPatch(); - - powerUpDelayMultiplier = config.Bind( - "Shield", "Power Up Delay Multiplier", 1f, - new ConfigDescription("Power Up Delay Multiplier", new AcceptableValueRange(min, max))); - powerUpDelayMultiplier.SettingChanged += (sender, args) => DoPatch(); - - radiusMultiplierHealing = config.Bind( - "Shield", "Radius Multiplier Healing", 1f, - new ConfigDescription("Radius Multiplier Healing", new AcceptableValueRange(min, max))); - radiusMultiplierHealing.SettingChanged += (sender, args) => DoPatch(); - } - - private static void ConfigureShieldGenerator(MultipliedObject obj) { - obj.AddField(new FieldConfiguration("m_HealingHeartbeatInterval", heartbeatIntervalMultiplier, - ShouldApply)); - - obj.AddField(new FieldConfiguration("m_Radius", radiusMultiplier, __instance => { - if (!ShouldApply(__instance)) - return radiusMultiplier; - var shield = (ModuleShieldGenerator)__instance; - return shield.m_Healing ? radiusMultiplierHealing : radiusMultiplier; - })); - - obj.AddField(new FieldConfiguration("m_PowerUpDelay", powerUpDelayMultiplier, ShouldApply)); - } - - private static readonly Func ShouldApply = obj => { - if (!playerOnly.Value) - return true; - return CykUtil.IsPlayerTank(obj as Module); - }; - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleShieldGenerator), "OnAttached")] - public static void PostfixCreate(ModuleShieldGenerator __instance) { - Manager.OnObjectAttached(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleShieldGenerator), "OnDetaching")] - public static void PostfixDestroy(ModuleShieldGenerator __instance) { - Manager.OnObjectDetached(__instance); - } - - private static void DoPatch() { - Manager.ApplyAll(); - } - - public static readonly Func Register = obj => { - if (Main.debug.Value) - Console.WriteLine("Registering ModuleShieldGenerator: {0}", obj); - PostfixCreate(obj as ModuleShieldGenerator); - return true; - }; - } -} diff --git a/Projects/BanquetForFools/BanquetForCyka/ModuleWeaponGunManager.cs b/Projects/BanquetForFools/BanquetForCyka/ModuleWeaponGunManager.cs deleted file mode 100644 index 2f502f4..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/ModuleWeaponGunManager.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using BepInEx.Configuration; -using HarmonyLib; - -namespace BanquetForCyka { - [HarmonyPatch] - public class ModuleWeaponGunManager { - private static readonly MultipliedObjectManager Manager = - new MultipliedObjectManager(ConfigureManager); - private static readonly MultipliedObjectManager FireDataManager = - new MultipliedObjectManager(ConfigureFireData); - - private static ConfigEntry playerOnly; - private static ConfigEntry kickbackStrengthMultiplier; - private static ConfigEntry muzzleVelocityMultiplier; - private static ConfigEntry burstCooldownMultiplier; - private static ConfigEntry burstShotCountMultiplier; - private static ConfigEntry shotCooldownMultiplier; - private static ConfigEntry seekingRoundsAll; - private static ConfigEntry resetBurstOnInterruptAll; - - public static void Setup(ConfigFile config) { - const float min = 0.01f; - const float max = 32f; - - playerOnly = config.Bind("WeaponGun", "Player Only", false, new ConfigDescription("Player Only")); - playerOnly.SettingChanged += (sender, args) => DoPatch(); - - kickbackStrengthMultiplier = config.Bind( - "FireData", "Kickback Strength Multiplier", 1f, - new ConfigDescription("Kickback Strength Multiplier", new AcceptableValueRange(min, max))); - kickbackStrengthMultiplier.SettingChanged += (sender, args) => DoPatch(); - - muzzleVelocityMultiplier = config.Bind( - "FireData", "Muzzle Velocity Multiplier", 1f, - new ConfigDescription("Muzzle Velocity Multiplier", new AcceptableValueRange(min, max))); - muzzleVelocityMultiplier.SettingChanged += (sender, args) => DoPatch(); - - burstCooldownMultiplier = config.Bind( - "FireData", "Burst Cooldown Multiplier", 1f, - new ConfigDescription("Burst Cooldown Multiplier", new AcceptableValueRange(min, max))); - burstCooldownMultiplier.SettingChanged += (sender, args) => DoPatch(); - - burstShotCountMultiplier = config.Bind( - "FireData", "Burst Shot Count Multiplier", 1f, - new ConfigDescription("Burst Shot Count Multiplier", new AcceptableValueRange(min, max))); - burstShotCountMultiplier.SettingChanged += (sender, args) => DoPatch(); - - shotCooldownMultiplier = config.Bind( - "FireData", "Shot Cooldown Multiplier", 1f, - new ConfigDescription("Shot Cooldown Multiplier", new AcceptableValueRange(min, max))); - shotCooldownMultiplier.SettingChanged += (sender, args) => DoPatch(); - - seekingRoundsAll = - config.Bind("FireData", "Seeking Rounds All", false, - new ConfigDescription("Seeking Rounds All", new AcceptableValueRange(false, true))); - seekingRoundsAll.SettingChanged += (sender, args) => DoPatch(); - - resetBurstOnInterruptAll = config.Bind( - "FireData", "Reset Burst On Interrupt All", false, - new ConfigDescription("Reset Burst On Interrupt All", new AcceptableValueRange(false, true))); - resetBurstOnInterruptAll.SettingChanged += (sender, args) => DoPatch(); - } - - private static void ConfigureManager(MultipliedObject obj) { - obj.AddBooleanField(new BooleanFieldConfiguration("m_SeekingRounds", seekingRoundsAll, ShouldApply)); - obj.AddBooleanField( - new BooleanFieldConfiguration("m_ResetBurstOnInterrupt", resetBurstOnInterruptAll, ShouldApply)); - obj.AddField(new FieldConfiguration("m_BurstCooldown", burstCooldownMultiplier, ShouldApply)); - obj.AddField(new FieldConfiguration("m_BurstShotCount", burstShotCountMultiplier, ShouldApply)); - obj.AddField(new FieldConfiguration("m_ShotCooldown", shotCooldownMultiplier, ShouldApply)); - } - - private static void ConfigureFireData(MultipliedObject obj) { - obj.AddField(new FieldConfiguration("m_MuzzleVelocity", muzzleVelocityMultiplier)); - obj.AddField(new FieldConfiguration("m_KickbackStrength", kickbackStrengthMultiplier)); - } - - private static readonly Func ShouldApply = obj => { - if (!playerOnly.Value) - return true; - return CykUtil.IsPlayerTank(obj as Module); - }; - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleWeaponGun), "OnAttached")] - public static void PostfixCreate(ModuleWeaponGun __instance) { - Manager.OnObjectAttached(__instance); - if (playerOnly.Value && !CykUtil.IsPlayerTank(__instance)) - return; - - var trav = Traverse.Create(__instance); - var firingData = trav.Field("m_FiringData"); - FireDataManager.OnObjectAttached(firingData.GetValue()); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleWeaponGun), "OnDetaching")] - public static void PostfixDestroy(ModuleWeaponGun __instance) { - Manager.OnObjectAttached(__instance); - var trav = Traverse.Create(__instance); - if (playerOnly.Value && !CykUtil.IsPlayerTank(__instance)) - return; - - var firingData = trav.Field("m_FiringData"); - FireDataManager.OnObjectDetached(firingData.GetValue()); - } - - private static void DoPatch() { - FireDataManager.ApplyAll(); - Manager.ApplyAll(); - } - - public static readonly Func Register = obj => { - if (Main.debug.Value) - Console.WriteLine("Registering ModuleWeaponGun: {0}", obj); - PostfixCreate(obj as ModuleWeaponGun); - return true; - }; - } -} diff --git a/Projects/BanquetForFools/BanquetForCyka/ModuleWeaponManager.cs b/Projects/BanquetForFools/BanquetForCyka/ModuleWeaponManager.cs deleted file mode 100644 index 3db3530..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/ModuleWeaponManager.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using BepInEx.Configuration; -using HarmonyLib; - -namespace BanquetForCyka { - [HarmonyPatch] - public class ModuleWeaponManager { - private static readonly MultipliedObjectManager Manager = - new MultipliedObjectManager(ConfigureManager); - - private static ConfigEntry playerOnly; - private static ConfigEntry rotateSpeedMultiplier; - - public static void Setup(ConfigFile config) { - const float min = 0.01f; - const float max = 32f; - - playerOnly = config.Bind("ModuleWeapon", "Player Only", false, new ConfigDescription("Player Only")); - playerOnly.SettingChanged += (sender, args) => DoPatch(); - - rotateSpeedMultiplier = config.Bind( - "ModuleWeapon", "Rotate Speed Multiplier", 1f, - new ConfigDescription("Rotate Speed Multiplier", new AcceptableValueRange(min, max))); - rotateSpeedMultiplier.SettingChanged += (sender, args) => DoPatch(); - } - - private static void ConfigureManager(MultipliedObject obj) { - obj.AddField(new FieldConfiguration("m_RotateSpeed", rotateSpeedMultiplier, ShouldApply)); - } - - private static readonly Func ShouldApply = obj => { - if (!playerOnly.Value) - return true; - return CykUtil.IsPlayerTank(obj as Module); - }; - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleWeapon), "OnAttached")] - public static void PostfixCreate(ModuleWeapon __instance) { - Manager.OnObjectAttached(__instance); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleWeapon), "OnDetaching")] - public static void PostfixDestroy(ModuleWeapon __instance) { - Manager.OnObjectDetached(__instance); - } - - private static void DoPatch() { - Manager.ApplyAll(); - } - - public static readonly Func Register = obj => { - if (Main.debug.Value) - Console.WriteLine("Registering ModuleWeapon: {0}", obj); - PostfixCreate(obj as ModuleWeapon); - return true; - }; - } -} diff --git a/Projects/BanquetForFools/BanquetForCyka/ModuleWheelsManager.cs b/Projects/BanquetForFools/BanquetForCyka/ModuleWheelsManager.cs deleted file mode 100644 index 98f8036..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/ModuleWheelsManager.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using BepInEx.Configuration; -using HarmonyLib; - -namespace BanquetForCyka { - [HarmonyPatch] - public class ModuleWheelsManager { - private static readonly MultipliedObjectManager TorqueParamsManager = - new MultipliedObjectManager(ConfigureTorqueParams); - - private static ConfigEntry playerOnly; - private static ConfigEntry torqueRpmMultiplier; - private static ConfigEntry torqueMultiplier; - - public static void Setup(ConfigFile config) { - const float min = 0.01f; - const float max = 32f; - - playerOnly = config.Bind("TorqueParams", "Player Only", false, new ConfigDescription("Player Only")); - playerOnly.SettingChanged += (sender, args) => DoPatch(); - - torqueRpmMultiplier = - config.Bind("TorqueParams", "Torque RPM Multiplier", 1f, - new ConfigDescription("Torque RPM Multiplier", new AcceptableValueRange(min, max))); - torqueRpmMultiplier.SettingChanged += (sender, args) => DoPatch(); - - torqueMultiplier = - config.Bind("TorqueParams", "Torque Multiplier", 1f, - new ConfigDescription("Torque Multiplier", new AcceptableValueRange(min, max))); - torqueMultiplier.SettingChanged += (sender, args) => DoPatch(); - } - - private static void ConfigureTorqueParams(MultipliedObject obj) { - obj.AddField(new FieldConfiguration("torqueCurveMaxRpm", torqueRpmMultiplier, ShouldApply)); - obj.AddField(new FieldConfiguration("torqueCurveMaxTorque", torqueMultiplier, ShouldApply)); - } - - private static readonly Func ShouldApply = obj => { - if (!playerOnly.Value) - return true; - return CykUtil.IsPlayerTank(obj as Module); - }; - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleWheels), "OnAttached")] - public static void PostfixCreate(ModuleWheels __instance) { - var trav = Traverse.Create(__instance); - var torqueParams = trav.Field("torqueParams"); - TorqueParamsManager.OnObjectAttached(torqueParams.GetValue()); - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleWheels), "OnDetaching")] - public static void PostfixDestroy(ModuleWheels __instance) { - var trav = Traverse.Create(__instance); - var torqueParams = trav.Field("torqueParams"); - TorqueParamsManager.OnObjectDetached(torqueParams.GetValue()); - } - - private static void DoPatch() { - TorqueParamsManager.ApplyAll(); - } - - public static readonly Func Register = obj => { - if (Main.debug.Value) - Console.WriteLine("Registering ModuleWheels: {0}", obj); - PostfixCreate(obj as ModuleWheels); - return true; - }; - } -} diff --git a/Projects/BanquetForFools/BanquetForCyka/ModuleWingManager.cs b/Projects/BanquetForFools/BanquetForCyka/ModuleWingManager.cs deleted file mode 100644 index 62a647f..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/ModuleWingManager.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using BepInEx.Configuration; -using HarmonyLib; - -namespace BanquetForCyka { - [HarmonyPatch] - public class ModuleWingManager { - private static readonly MultipliedObjectManager Manager = - new MultipliedObjectManager(ConfigureAerofoil); - - private static ConfigEntry playerOnly; - private static ConfigEntry angleRangeMultiplier; - private static ConfigEntry turnSpeedMultiplier; - private static ConfigEntry liftStrengthMultiplier; - - public static void Setup(ConfigFile config) { - const float min = 0.01f; - const float max = 32f; - - playerOnly = config.Bind("Aerofoil", "Player Only", false, new ConfigDescription("Player Only")); - playerOnly.SettingChanged += (sender, args) => DoPatch(); - - angleRangeMultiplier = - config.Bind("Aerofoil", "Angle Range Multiplier", 1f, - new ConfigDescription("Angle Range Multiplier", new AcceptableValueRange(min, max))); - angleRangeMultiplier.SettingChanged += (sender, args) => DoPatch(); - - turnSpeedMultiplier = - config.Bind("Aerofoil", "Turn Speed Multiplier", 1f, - new ConfigDescription("Turn Speed Multiplier", new AcceptableValueRange(min, max))); - turnSpeedMultiplier.SettingChanged += (sender, args) => DoPatch(); - - liftStrengthMultiplier = config.Bind( - "Aerofoil", "Lift Strength Multiplier", 1f, - new ConfigDescription("Lift Strength Multiplier", new AcceptableValueRange(min, max))); - liftStrengthMultiplier.SettingChanged += (sender, args) => DoPatch(); - } - - private static void ConfigureAerofoil(MultipliedObject obj) { - obj.AddField(new FieldConfiguration("flapAngleRangeActual", angleRangeMultiplier)); - obj.AddField(new FieldConfiguration("flapAngleRangeVisual", angleRangeMultiplier)); - - obj.AddField(new FieldConfiguration("flapTurnSpeed", turnSpeedMultiplier)); - obj.AddField(new FieldConfiguration("liftStrength", liftStrengthMultiplier)); - } - - private static readonly Func ShouldApply = obj => { - if (!playerOnly.Value) - return true; - return CykUtil.IsPlayerTank(obj as Module); - }; - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleWing), "OnAttached")] - public static void PostfixCreate(ModuleWing __instance) { - if (playerOnly.Value && !CykUtil.IsPlayerTank(__instance)) - return; - for (int i = 0; i < __instance.m_Aerofoils.Length; i++) { - var aerofoil = __instance.m_Aerofoils[i]; - Manager.OnObjectAttached(aerofoil); - } - } - - [HarmonyPrefix] - [HarmonyPatch(typeof(ModuleWing), "OnDetaching")] - public static void PostfixDestroy(ModuleWing __instance) { - if (playerOnly.Value && !CykUtil.IsPlayerTank(__instance)) - return; - foreach (var aerofoil in __instance.m_Aerofoils) Manager.OnObjectDetached(aerofoil); - } - - private static void DoPatch() { - Manager.ApplyAll(); - } - - public static readonly Func Register = obj => { - if (Main.debug.Value) - Console.WriteLine("Registering ModuleWing: {0}", obj); - PostfixCreate(obj as ModuleWing); - return true; - }; - } -} diff --git a/Projects/BanquetForFools/BanquetForCyka/MultiBuy.cs b/Projects/BanquetForFools/BanquetForCyka/MultiBuy.cs deleted file mode 100644 index 053c0c2..0000000 --- a/Projects/BanquetForFools/BanquetForCyka/MultiBuy.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Reflection; -using HarmonyLib; -using UnityEngine; -using UnityEngine.EventSystems; -using UnityEngine.UI; - -namespace BanquetForCyka { - [HarmonyPatch] - public class MultiBuy { - public static UIShopBlockSelect panel; - public static Traverse panelTraverse; - - [HarmonyPostfix] - [HarmonyPatch(typeof(UIShopBlockSelect), "OnSpawn")] - public static void PostfixCreate(UIShopBlockSelect __instance) { - panel = __instance; - if (Main.debugBuyAll.Value) - Console.WriteLine("UISnapshotPanel.OnPool: {0}", __instance); - panelTraverse = Traverse.Create(__instance); - var placeButton = panelTraverse.Field("m_PurchaseBlockButton").GetValue