Add cyka of industry
This commit is contained in:
@@ -1,7 +0,0 @@
|
|||||||
4 commits since v5.4.20
|
|
||||||
|
|
||||||
Changelog (excluding merges):
|
|
||||||
* (0d06996) [ghorsington] UnityInput: revert to null input in case of total failure
|
|
||||||
* (ea709e2) [ghorsington] Bump version
|
|
||||||
* (806d6d2) [ghorsington] UnityInput: remove hard dependency on Unity.InputManager (fixes #446)
|
|
||||||
* (a79d657) [ghorsington] UnityInput: Reformat, fix LegacyInputSystemAvailable not being static
|
|
@@ -1,16 +0,0 @@
|
|||||||
[UnityDoorstop]
|
|
||||||
# Specifies whether assembly executing is enabled
|
|
||||||
enabled=true
|
|
||||||
# Specifies the path (absolute, or relative to the game's exe) to the DLL/EXE that should be executed by Doorstop
|
|
||||||
targetAssembly=BepInEx\core\BepInEx.Preloader.dll
|
|
||||||
# Specifies whether Unity's output log should be redirected to <current folder>\output_log.txt
|
|
||||||
redirectOutputLog=false
|
|
||||||
# If enabled, DOORSTOP_DISABLE env var value is ignored
|
|
||||||
# USE THIS ONLY WHEN ASKED TO OR YOU KNOW WHAT THIS MEANS
|
|
||||||
ignoreDisableSwitch=false
|
|
||||||
# Overrides default Mono DLL search path
|
|
||||||
# Sometimes it is needed to instruct Mono to seek its assemblies from a different path
|
|
||||||
# (e.g. mscorlib is stripped in original game)
|
|
||||||
# This option causes Mono to seek mscorlib and core libraries from a different folder before Managed
|
|
||||||
# Original Managed folder is added as a secondary folder in the search path
|
|
||||||
dllSearchPathOverride=
|
|
Binary file not shown.
1
Projects/CaptainOfIndustry/Bepinex
Symbolic link
1
Projects/CaptainOfIndustry/Bepinex
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
C:/Program Files (x86)/Steam/steamapps/common/Captain of Industry/BepInex
|
16
Projects/CaptainOfIndustry/CaptainOfIndustry.sln
Normal file
16
Projects/CaptainOfIndustry/CaptainOfIndustry.sln
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CaptainOfIndustry", "CaptainOfIndustry\CaptainOfIndustry.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
|
@@ -0,0 +1,21 @@
|
|||||||
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CTerraTech_005Clibs_005C0Harmony_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CTerraTech_005Clibs_005CAssembly_002DCSharp_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CTerraTech_005Clibs_005CBepInEx_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CTerraTech_005Clibs_005CConfigurationManager_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CTerraTech_005Clibs_005CUnityEngine_002ECoreModule_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CTerraTech_005Clibs_005CUnityEngine_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CSeafile_005CProjects_002DRider_005CRiderProjects_005CBepinex_005CProjects_005CCaptainOfIndustry_005Clibs_005C0Harmony_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CSeafile_005CProjects_002DRider_005CRiderProjects_005CBepinex_005CProjects_005CCaptainOfIndustry_005Clibs_005CAssembly_002DCSharp_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CSeafile_005CProjects_002DRider_005CRiderProjects_005CBepinex_005CProjects_005CCaptainOfIndustry_005Clibs_005CBepInEx_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CSeafile_005CProjects_002DRider_005CRiderProjects_005CBepinex_005CProjects_005CCaptainOfIndustry_005Clibs_005CConfigurationManager_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CSeafile_005CProjects_002DRider_005CRiderProjects_005CBepinex_005CProjects_005CCaptainOfIndustry_005Clibs_005CMafi_002EBase_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CSeafile_005CProjects_002DRider_005CRiderProjects_005CBepinex_005CProjects_005CCaptainOfIndustry_005Clibs_005CMafi_002ECore_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CSeafile_005CProjects_002DRider_005CRiderProjects_005CBepinex_005CProjects_005CCaptainOfIndustry_005Clibs_005CMafi_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CSeafile_005CProjects_002DRider_005CRiderProjects_005CBepinex_005CProjects_005CCaptainOfIndustry_005Clibs_005CMafi_002EModsAuthoringSupport_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CSeafile_005CProjects_002DRider_005CRiderProjects_005CBepinex_005CProjects_005CCaptainOfIndustry_005Clibs_005CMafi_002EUnity_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CSeafile_005CProjects_002DRider_005CRiderProjects_005CBepinex_005CProjects_005CCaptainOfIndustry_005Clibs_005CUnityEngine_002ECoreModule_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CSeafile_005CProjects_002DRider_005CRiderProjects_005CBepinex_005CProjects_005CCaptainOfIndustry_005Clibs_005CUnityEngine_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue"><AssemblyExplorer /></s:String>
|
||||||
|
<s:String x:Key="/Default/Environment/Hierarchy/Build/BuildTool/CustomBuildToolPath/@EntryValue">C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</s:String>
|
||||||
|
<s:Int64 x:Key="/Default/Environment/Hierarchy/Build/BuildTool/MsbuildVersion/@EntryValue">262144</s:Int64></wpf:ResourceDictionary>
|
@@ -7,7 +7,7 @@
|
|||||||
<ProjectGuid>{EE5EFB7F-A4DC-44F0-967B-F71ECA2D46AE}</ProjectGuid>
|
<ProjectGuid>{EE5EFB7F-A4DC-44F0-967B-F71ECA2D46AE}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>TerraTech</RootNamespace>
|
<RootNamespace>CaptainOfIndustry</RootNamespace>
|
||||||
<AssemblyName>CaptainOfIndustry</AssemblyName>
|
<AssemblyName>CaptainOfIndustry</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
@@ -32,20 +32,9 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="BeamPropertiesManager.cs" />
|
|
||||||
<Compile Include="Class1.cs" />
|
<Compile Include="Class1.cs" />
|
||||||
<Compile Include="FuelPropertiesManager.cs" />
|
|
||||||
<Compile Include="GeneratorPropertiesManager.cs" />
|
|
||||||
<Compile Include="HomingAndVelocityProjectilePatch.cs" />
|
|
||||||
<Compile Include="MagnetPropertiesManager.cs" />
|
|
||||||
<Compile Include="MinerPropertiesManager.cs" />
|
|
||||||
<Compile Include="Patches.cs" />
|
<Compile Include="Patches.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="SeekingProjectileManager.cs" />
|
|
||||||
<Compile Include="ThrusterPropertiesManager.cs" />
|
|
||||||
<Compile Include="WeaponPropertiesManager.cs" />
|
|
||||||
<Compile Include="WheelPropertiesManager.cs" />
|
|
||||||
<Compile Include="WirelessChargerPropertiesManager.cs" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="0Harmony">
|
<Reference Include="0Harmony">
|
||||||
@@ -60,6 +49,21 @@
|
|||||||
<Reference Include="ConfigurationManager">
|
<Reference Include="ConfigurationManager">
|
||||||
<HintPath>..\libs\ConfigurationManager.dll</HintPath>
|
<HintPath>..\libs\ConfigurationManager.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Mafi">
|
||||||
|
<HintPath>..\libs\Mafi.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Mafi.Base">
|
||||||
|
<HintPath>..\libs\Mafi.Base.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Mafi.Core">
|
||||||
|
<HintPath>..\libs\Mafi.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Mafi.ModsAuthoringSupport">
|
||||||
|
<HintPath>..\libs\Mafi.ModsAuthoringSupport.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Mafi.Unity">
|
||||||
|
<HintPath>..\libs\Mafi.Unity.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="UnityEngine">
|
<Reference Include="UnityEngine">
|
||||||
<HintPath>..\libs\UnityEngine.dll</HintPath>
|
<HintPath>..\libs\UnityEngine.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
55
Projects/CaptainOfIndustry/CaptainOfIndustry/Class1.cs
Normal file
55
Projects/CaptainOfIndustry/CaptainOfIndustry/Class1.cs
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
using System.Linq;
|
||||||
|
using BepInEx;
|
||||||
|
using BepInEx.Configuration;
|
||||||
|
using HarmonyLib;
|
||||||
|
using HarmonyLib.Tools;
|
||||||
|
|
||||||
|
// TODO: Make shield and repair bigger
|
||||||
|
// TODO: Maybe make props faster, thrusters work fine
|
||||||
|
|
||||||
|
namespace CaptainOfIndustry {
|
||||||
|
[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<int> excavatorCapacityMultiplier;
|
||||||
|
public static ConfigEntry<int> truckCapacityMultiplier;
|
||||||
|
public static ConfigEntry<int> cargoShipCapacityMultiplier;
|
||||||
|
public static ConfigEntry<float> excavatorMiningAreaMultiplier;
|
||||||
|
public static ConfigEntry<float> vehicleSpeedMultiplier;
|
||||||
|
|
||||||
|
public void Awake() {
|
||||||
|
excavatorCapacityMultiplier = Config.Bind("General", "Excavator Capacity Multiplier", 1, new ConfigDescription("Excavator Capacity Multiplier"));
|
||||||
|
truckCapacityMultiplier = Config.Bind("General", "Truck Capacity Multiplier", 1, new ConfigDescription("Truck Capacity Multiplier"));
|
||||||
|
cargoShipCapacityMultiplier = Config.Bind("General", "Cargo Ship Capacity Multiplier", 1, new ConfigDescription("Cargo Ship Capacity Multiplier"));
|
||||||
|
excavatorMiningAreaMultiplier = Config.Bind("General", "Excavator Mining Area Multiplier", 1f, new ConfigDescription("Excavator Mining Area Multiplier"));
|
||||||
|
vehicleSpeedMultiplier = Config.Bind("General", "Vehicle Speed Multiplier", 1f, new ConfigDescription("Vehicle Speed Multiplier"));
|
||||||
|
|
||||||
|
// shootingSpeedMultiplier.SettingChanged += (sender, args) => WeaponPropertiesManager.DoPatch();
|
||||||
|
// energyGenMultiplier.SettingChanged += (sender, args) => GeneratorPropertiesManager.DoPatch();
|
||||||
|
// magnetStrenghtMultiplier.SettingChanged += (sender, args) => MagnetPropertiesManager.DoPatch();
|
||||||
|
// magnetRadiusMultiplier.SettingChanged += (sender, args) => MagnetPropertiesManager.DoPatch();
|
||||||
|
// beamStrenghtMultiplier.SettingChanged += (sender, args) => BeamPropertiesManager.DoPatch();
|
||||||
|
// beamRadiusMultiplier.SettingChanged += (sender, args) => BeamPropertiesManager.DoPatch();
|
||||||
|
// fuelTankRefillMultiplier.SettingChanged += (sender, args) => FuelPropertiesManager.DoPatch();
|
||||||
|
// fuelTankCapacityMultiplier.SettingChanged += (sender, args) => FuelPropertiesManager.DoPatch();
|
||||||
|
// wheelTorqueMultiplier.SettingChanged += (sender, args) => WheelPropertiesManager.DoPatch();
|
||||||
|
// wheelSpeedMultiplier.SettingChanged += (sender, args) => WheelPropertiesManager.DoPatch();
|
||||||
|
// jetThrustMultiplier.SettingChanged += (sender, args) => ThrusterPropertiesManager.DoPatch();
|
||||||
|
// minerGroundArea.SettingChanged += (sender, args) => MinerPropertiesManager.DoPatch();
|
||||||
|
// minerMiningSpeed.SettingChanged += (sender, args) => MinerPropertiesManager.DoPatch();
|
||||||
|
// wirelessChargingPowerPerArcMultiplier.SettingChanged += (sender, args) => WirelessChargerPropertiesManager.DoPatch();
|
||||||
|
// wirelessChargingArcFiringIntervalMultiplier.SettingChanged += (sender, args) => WirelessChargerPropertiesManager.DoPatch();
|
||||||
|
// wirelessChargingRadiusMultiplier.SettingChanged += (sender, args) => WirelessChargerPropertiesManager.DoPatch();
|
||||||
|
|
||||||
|
Logger.LogInfo("Cyka mod loaded");
|
||||||
|
HarmonyFileLog.Enabled = true;
|
||||||
|
Harmony harmony = new Harmony(pluginGuid);
|
||||||
|
harmony.PatchAll();
|
||||||
|
var originalMethods = harmony.GetPatchedMethods();
|
||||||
|
// Logger.LogInfo("Patched " + originalMethods.Count() + " methods");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
101
Projects/CaptainOfIndustry/CaptainOfIndustry/Patches.cs
Normal file
101
Projects/CaptainOfIndustry/CaptainOfIndustry/Patches.cs
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
using HarmonyLib;
|
||||||
|
using Mafi;
|
||||||
|
using Mafi.Core.Buildings.Cargo.Ships.Modules;
|
||||||
|
using Mafi.Core.Entities.Dynamic;
|
||||||
|
using Mafi.Core.Products;
|
||||||
|
using Mafi.Core.Prototypes;
|
||||||
|
|
||||||
|
namespace CaptainOfIndustry {
|
||||||
|
[HarmonyPatch]
|
||||||
|
public class Patches {
|
||||||
|
private static Traverse<Fix32> maxForwardsSpeedField;
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(ExcavatorProtoBuilder.ExcavatorProtoBuilderState), "SetCapacity")]
|
||||||
|
static void excavatorCapacityMultiplier(ref int quantity) {
|
||||||
|
Console.WriteLine("IndustrialCyka: Old excavator capacity: {0}", quantity);
|
||||||
|
quantity *= Main.excavatorCapacityMultiplier.Value;
|
||||||
|
Console.WriteLine("IndustrialCyka: Old excavator capacity: {0}", quantity);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(TruckProtoBuilder.TruckProtoBuilderState), "SetCapacity")]
|
||||||
|
static void truckCapacityMultiplier(ref int quantity) {
|
||||||
|
Console.WriteLine("IndustrialCyka: Old truck capacity: {0}", quantity);
|
||||||
|
quantity *= Main.truckCapacityMultiplier.Value;
|
||||||
|
Console.WriteLine("IndustrialCyka: New truck capacity: {0}", quantity);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPostfix]
|
||||||
|
[HarmonyPatch(typeof(CargoShipModuleProto), MethodType.Constructor,
|
||||||
|
new[] {
|
||||||
|
typeof(Proto.ID), typeof(Proto.Str), typeof(ProductType), typeof(Quantity),
|
||||||
|
typeof(CargoShipModuleProto.Gfx)
|
||||||
|
})]
|
||||||
|
static void cargoShipCapacityMultiplier(CargoShipModuleProto __instance) {
|
||||||
|
Console.WriteLine("IndustrialCyka: Old ship capacity: {0}", __instance.Capacity.Value);
|
||||||
|
__instance.Capacity = new Quantity(__instance.Capacity.Value * Main.cargoShipCapacityMultiplier.Value);
|
||||||
|
Console.WriteLine("IndustrialCyka: New ship capacity: {0}", __instance.Capacity.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(ExcavatorProtoBuilder.ExcavatorProtoBuilderState), "SetMinedThicknessByDistanceMeters")]
|
||||||
|
static void excavatorMiningAreaMultiplier(ref float[] thicknessMeters) {
|
||||||
|
for (int i = 0; i < thicknessMeters.Length; i++) {
|
||||||
|
Console.WriteLine("IndustrialCyka: Old mining area: {0}", thicknessMeters[i]);
|
||||||
|
thicknessMeters[i] *= Main.excavatorMiningAreaMultiplier.Value;
|
||||||
|
Console.WriteLine("IndustrialCyka: New mining area: {0}", thicknessMeters[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// No workey... idk how it's supposed to work, speed is always 1 or 100%
|
||||||
|
// [HarmonyPrefix]
|
||||||
|
// [HarmonyPatch(typeof(DrivingEntity), "SetSpeedFactor")]
|
||||||
|
// static void vehicleSpeedMultiplier(ref Percent speedFactor) {
|
||||||
|
// Console.WriteLine("IndustrialCyka: Old speed: {0}", speedFactor.ToString());
|
||||||
|
// // typeof(Percent)
|
||||||
|
// // .GetField("RawValue",BindingFlags.Instance|BindingFlags.NonPublic)
|
||||||
|
// // .SetValue(speedFactor,speedFactor.ToFloat() / Main.vehicleSpeedMultiplier.Value);
|
||||||
|
// Percent newSpeedFactor = Percent.FromFloat(speedFactor.ToFloat() / Main.vehicleSpeedMultiplier.Value);
|
||||||
|
// speedFactor = newSpeedFactor;
|
||||||
|
// Console.WriteLine("IndustrialCyka: New speed: {1}", newSpeedFactor.RawValue.ToString());
|
||||||
|
// }
|
||||||
|
|
||||||
|
[HarmonyPostfix]
|
||||||
|
[HarmonyPatch(typeof(SmoothDriver), "SetSpeedFactor")]
|
||||||
|
static void vehicleSpeedMultiplier(SmoothDriver __instance) {
|
||||||
|
Fix32 speedMulti = Fix32.FromFloat(Main.vehicleSpeedMultiplier.Value);
|
||||||
|
|
||||||
|
Traverse traverse = Traverse.Create(__instance);
|
||||||
|
Traverse maxForwardsSpeedField = traverse.Field("m_maxForwardsSpeed");
|
||||||
|
Traverse maxBackwardsSpeedField = traverse.Field("m_maxBackwardsSpeed");
|
||||||
|
Traverse maxAccelerationField = traverse.Field("m_maxAcceleration");
|
||||||
|
|
||||||
|
Console.WriteLine("IndustrialCyka: Old speeds: (F) {0}, (B) {1}, (A) {2}", maxForwardsSpeedField.GetValue(), maxBackwardsSpeedField.GetValue(), maxAccelerationField.GetValue());
|
||||||
|
|
||||||
|
maxForwardsSpeedField.SetValue((Fix32) maxForwardsSpeedField.GetValue() * speedMulti);
|
||||||
|
maxBackwardsSpeedField.SetValue((Fix32) maxBackwardsSpeedField.GetValue() * speedMulti);
|
||||||
|
maxAccelerationField.SetValue((Fix32) maxAccelerationField.GetValue() * speedMulti);
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
|
||||||
|
// [HarmonyPrefix]
|
||||||
|
// [HarmonyPatch(typeof(ManPlayer), "AddMoney")]
|
||||||
|
// static void MoneyMulti(ref int amount) {
|
||||||
|
// amount = (int)(amount * Main.moneyMultiplier.Value);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// [HarmonyPrefix]
|
||||||
|
// [HarmonyPatch(typeof(TechHolders), "SetHeartbeatInterval")]
|
||||||
|
// static void HeartbeatMulti(ref float interval) {
|
||||||
|
// interval *= Main.heartbeatIntervalMultiplier.Value;
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,35 @@
|
|||||||
|
using System.Reflection;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
// General Information about an assembly is controlled through the following
|
||||||
|
// set of attributes. Change these attribute values to modify the information
|
||||||
|
// associated with an assembly.
|
||||||
|
[assembly: AssemblyTitle("CaptainOfIndustry")]
|
||||||
|
[assembly: AssemblyDescription("")]
|
||||||
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
[assembly: AssemblyCompany("")]
|
||||||
|
[assembly: AssemblyProduct("CaptainOfIndustry")]
|
||||||
|
[assembly: AssemblyCopyright("Copyright © 2023")]
|
||||||
|
[assembly: AssemblyTrademark("")]
|
||||||
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
// to COM components. If you need to access a type in this assembly from
|
||||||
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
|
[assembly: Guid("EE5EFB7F-A4DC-44F0-967B-F71ECA2D46AE")]
|
||||||
|
|
||||||
|
// Version information for an assembly consists of the following four values:
|
||||||
|
//
|
||||||
|
// Major Version
|
||||||
|
// Minor Version
|
||||||
|
// Build Number
|
||||||
|
// Revision
|
||||||
|
//
|
||||||
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
|
// by using the '*' as shown below:
|
||||||
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
11
Projects/CaptainOfIndustry/TerraTech.sln.DotSettings.user
Normal file
11
Projects/CaptainOfIndustry/TerraTech.sln.DotSettings.user
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CTerraTech_005Clibs_005C0Harmony_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CTerraTech_005Clibs_005CAssembly_002DCSharp_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CTerraTech_005Clibs_005CBepInEx_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CTerraTech_005Clibs_005CConfigurationManager_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CTerraTech_005Clibs_005CUnityEngine_002ECoreModule_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CTerraTech_005Clibs_005CUnityEngine_002Edll/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:String x:Key="/Default/Environment/AssemblyExplorer/XmlDocument/@EntryValue"><AssemblyExplorer /></s:String>
|
||||||
|
<s:String x:Key="/Default/Environment/Hierarchy/Build/BuildTool/CustomBuildToolPath/@EntryValue">C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</s:String>
|
||||||
|
<s:Int64 x:Key="/Default/Environment/Hierarchy/Build/BuildTool/MsbuildVersion/@EntryValue">262144</s:Int64>
|
||||||
|
</wpf:ResourceDictionary>
|
1
Projects/CaptainOfIndustry/deploy.sh
Normal file
1
Projects/CaptainOfIndustry/deploy.sh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
cp CaptainOfIndustry/bin/Release/CaptainOfIndustry.dll bepinex/plugins/CaptainOfIndustry.dll
|
BIN
Projects/CaptainOfIndustry/libs/0Harmony.dll
Normal file
BIN
Projects/CaptainOfIndustry/libs/0Harmony.dll
Normal file
Binary file not shown.
BIN
Projects/CaptainOfIndustry/libs/Assembly-CSharp.dll
Normal file
BIN
Projects/CaptainOfIndustry/libs/Assembly-CSharp.dll
Normal file
Binary file not shown.
BIN
Projects/CaptainOfIndustry/libs/BepInEx.dll
Normal file
BIN
Projects/CaptainOfIndustry/libs/BepInEx.dll
Normal file
Binary file not shown.
BIN
Projects/CaptainOfIndustry/libs/ConfigurationManager.dll
Normal file
BIN
Projects/CaptainOfIndustry/libs/ConfigurationManager.dll
Normal file
Binary file not shown.
BIN
Projects/CaptainOfIndustry/libs/Mafi.Base.dll
Normal file
BIN
Projects/CaptainOfIndustry/libs/Mafi.Base.dll
Normal file
Binary file not shown.
BIN
Projects/CaptainOfIndustry/libs/Mafi.Core.dll
Normal file
BIN
Projects/CaptainOfIndustry/libs/Mafi.Core.dll
Normal file
Binary file not shown.
BIN
Projects/CaptainOfIndustry/libs/Mafi.ModsAuthoringSupport.dll
Normal file
BIN
Projects/CaptainOfIndustry/libs/Mafi.ModsAuthoringSupport.dll
Normal file
Binary file not shown.
BIN
Projects/CaptainOfIndustry/libs/Mafi.Unity.dll
Normal file
BIN
Projects/CaptainOfIndustry/libs/Mafi.Unity.dll
Normal file
Binary file not shown.
BIN
Projects/CaptainOfIndustry/libs/Mafi.dll
Normal file
BIN
Projects/CaptainOfIndustry/libs/Mafi.dll
Normal file
Binary file not shown.
BIN
Projects/CaptainOfIndustry/libs/UnityEngine.CoreModule.dll
Normal file
BIN
Projects/CaptainOfIndustry/libs/UnityEngine.CoreModule.dll
Normal file
Binary file not shown.
BIN
Projects/CaptainOfIndustry/libs/UnityEngine.dll
Normal file
BIN
Projects/CaptainOfIndustry/libs/UnityEngine.dll
Normal file
Binary file not shown.
1
Projects/CaptainOfIndustry/libs/copyLibs.sh
Normal file
1
Projects/CaptainOfIndustry/libs/copyLibs.sh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
for lib in $(cat libs.txt); do find 'C:\Games\Against.the.Storm.v1.0.2r' -name "$lib" | sed 's|\\|/|g' | xargs -I% -- cp '%' .; done
|
11
Projects/CaptainOfIndustry/libs/libs.txt
Normal file
11
Projects/CaptainOfIndustry/libs/libs.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
0Harmony.dll
|
||||||
|
Assembly-CSharp.dll
|
||||||
|
BepInEx.dll
|
||||||
|
ConfigurationManager.dll
|
||||||
|
UnityEngine.CoreModule.dll
|
||||||
|
UnityEngine.dll
|
||||||
|
Mafi.Base.dll
|
||||||
|
Mafi.Core.dll
|
||||||
|
Mafi.dll
|
||||||
|
Mafi.Unity.dll
|
||||||
|
Mafi.Security.dll
|
Reference in New Issue
Block a user