Add ground resource patch

This commit is contained in:
2024-04-17 13:37:39 +02:00
parent 2957fde4ce
commit b076a85579

View File

@@ -4,6 +4,7 @@ using HarmonyLib;
using Mafi; using Mafi;
using Mafi.Core.Buildings.Cargo.Ships.Modules; using Mafi.Core.Buildings.Cargo.Ships.Modules;
using Mafi.Core.Entities.Dynamic; using Mafi.Core.Entities.Dynamic;
using Mafi.Core.Map;
using Mafi.Core.Products; using Mafi.Core.Products;
using Mafi.Core.Prototypes; using Mafi.Core.Prototypes;
@@ -81,21 +82,17 @@ namespace CaptainOfIndustry {
Console.WriteLine("IndustrialCyka: New speeds: (F) {0}, (B) {1}, (A) {2}", maxForwardsSpeedField.GetValue(), maxBackwardsSpeedField.GetValue(), maxAccelerationField.GetValue()); Console.WriteLine("IndustrialCyka: New speeds: (F) {0}, (B) {1}, (A) {2}", maxForwardsSpeedField.GetValue(), maxBackwardsSpeedField.GetValue(), maxAccelerationField.GetValue());
} }
// this.m_maxForwardsSpeed = speedFactor.Apply(this.m_maxForwardsSpeedBase);
// this.m_maxBackwardsSpeed = speedFactor.Apply(this.m_maxBackwardsSpeedBase);
// this.m_maxAcceleration = speedFactor.Apply(this.m_maxAccelerationBase);
// Could not make this work either... idk why... Doesn't make sense...
// [HarmonyPrefix] // [HarmonyPostfix]
// [HarmonyPatch(typeof(ManPlayer), "AddMoney")] // [HarmonyPatch(typeof(SimpleVirtualResource), "MineResourceAt")]
// static void MoneyMulti(ref int amount) { // static void infiniteGroundResources(SimpleVirtualResource __instance) {
// amount = (int)(amount * Main.moneyMultiplier.Value); // Console.WriteLine("IndustrialCyka: Patching ground resources (Capacity)");
// } // Traverse traverse = Traverse.Create(__instance);
// // Traverse capacityField = traverse.Field("Capacity");
// [HarmonyPrefix] // capacityField.SetValue(1000000000);
// [HarmonyPatch(typeof(TechHolders), "SetHeartbeatInterval")] // Traverse quantityField = traverse.Field("Quantity");
// static void HeartbeatMulti(ref float interval) { // quantityField.SetValue(1000000000);
// interval *= Main.heartbeatIntervalMultiplier.Value;
// } // }
} }
} }