diff --git a/Projects/Zompiercer/.clang-format b/Projects/Zompiercer/.clang-format new file mode 100644 index 0000000..d53bf86 --- /dev/null +++ b/Projects/Zompiercer/.clang-format @@ -0,0 +1,3 @@ +BasedOnStyle: Google +IndentWidth: 4 +ColumnLimit: 120 \ No newline at end of file diff --git a/Projects/Zompiercer/TerraTech.sln.DotSettings.user b/Projects/Zompiercer/TerraTech.sln.DotSettings.user new file mode 100644 index 0000000..f142771 --- /dev/null +++ b/Projects/Zompiercer/TerraTech.sln.DotSettings.user @@ -0,0 +1,18 @@ + + True + True + True + True + True + True + ForceIncluded + ForceIncluded + ForceIncluded + ForceIncluded + ForceIncluded + ForceIncluded + <AssemblyExplorer /> + C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe + 262144 + + \ No newline at end of file diff --git a/Projects/Zompiercer/Zompiercer.sln b/Projects/Zompiercer/Zompiercer.sln new file mode 100644 index 0000000..56733d8 --- /dev/null +++ b/Projects/Zompiercer/Zompiercer.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zompiercer", "Zompiercer\Zompiercer.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/Zompiercer/Zompiercer.sln.DotSettings.user b/Projects/Zompiercer/Zompiercer.sln.DotSettings.user new file mode 100644 index 0000000..381121c --- /dev/null +++ b/Projects/Zompiercer/Zompiercer.sln.DotSettings.user @@ -0,0 +1,17 @@ + + True + True + True + True + True + True + ForceIncluded + ForceIncluded + ForceIncluded + ForceIncluded + ForceIncluded + ForceIncluded + <AssemblyExplorer /> + C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe + 262144 + \ No newline at end of file diff --git a/Projects/Zompiercer/Zompiercer/Class1.cs b/Projects/Zompiercer/Zompiercer/Class1.cs new file mode 100644 index 0000000..766b1f7 --- /dev/null +++ b/Projects/Zompiercer/Zompiercer/Class1.cs @@ -0,0 +1,30 @@ +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 Zompiercer { + [BepInPlugin(PluginGuid, PluginName, PluginVersion)] + public class Main : BaseUnityPlugin { + private const string PluginGuid = "CykPiercer"; + private const string PluginName = "CykaPiercer"; + private const string PluginVersion = "1.0.0"; + + public static ConfigEntry debug; + + public void Awake() { + debug = Config.Bind("General", "Debug", false); + + 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/Zompiercer/Zompiercer/Patches.cs b/Projects/Zompiercer/Zompiercer/Patches.cs new file mode 100644 index 0000000..0e89f8f --- /dev/null +++ b/Projects/Zompiercer/Zompiercer/Patches.cs @@ -0,0 +1,24 @@ +using HarmonyLib; + +namespace Zompiercer { + [HarmonyPatch] + public class Patches { + //[HarmonyPrefix] + //[HarmonyPatch(typeof(ManLicenses), "AddXP")] + //static void XpMulti(FactionSubTypes corporation, ref int xp, bool showUI = true) { + // xp = (int)(xp * Main.xpMultiplier.Value); + //} + + //[HarmonyPrefix] + //[HarmonyPatch(typeof(ManPlayer), "AddMoney")] + //static void MoneyMulti(ref int amount) { + // amount = (int)(amount * Main.moneyMultiplier.Value); + //} + + //[HarmonyPrefix] + //[HarmonyPatch(typeof(TechHolders), "SetHeartbeatInterval")] + //static void HeartbeatMulti(ref float interval) { + // interval *= Main.heartbeatIntervalMultiplier.Value; + //} + } +} diff --git a/Projects/Zompiercer/Zompiercer/Properties/AssemblyInfo.cs b/Projects/Zompiercer/Zompiercer/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6d5e652 --- /dev/null +++ b/Projects/Zompiercer/Zompiercer/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly:AssemblyTitle("Zompiercer")] +[assembly:AssemblyDescription("")] +[assembly:AssemblyConfiguration("")] +[assembly:AssemblyCompany("")] +[assembly:AssemblyProduct("Zompiercer")] +[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")] diff --git a/Projects/Zompiercer/Zompiercer/Zompiercer.csproj b/Projects/Zompiercer/Zompiercer/Zompiercer.csproj new file mode 100644 index 0000000..cc5924a --- /dev/null +++ b/Projects/Zompiercer/Zompiercer/Zompiercer.csproj @@ -0,0 +1,77 @@ + + + + + Debug + C:/Games/Zompiercer.Build.16292544 + $(GAME_DIR)/Zompiercer_Data/Managed + $(GAME_DIR)/BepInEx + AnyCPU + {EE5EFB7F-A4DC-44F0-967B-F71ECA2D46AE} + Library + Properties + Zompiercer + Zompiercer + 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)/UnityEngine.UI.dll + + + $(GAME_MANAGED)/UnityEngine.Networking.dll + + + $(GAME_MANAGED)/Assembly-CSharp.dll + + + $(GAME_BEPINEX)/plugins/ConfigurationManager.dll + + + + + \ No newline at end of file diff --git a/Projects/Zompiercer/format.sh b/Projects/Zompiercer/format.sh new file mode 100644 index 0000000..406fa8a --- /dev/null +++ b/Projects/Zompiercer/format.sh @@ -0,0 +1 @@ +clang-format -i TerraTech/*.cs diff --git a/Projects/Zompiercer/sync.yaml b/Projects/Zompiercer/sync.yaml new file mode 100644 index 0000000..5058152 --- /dev/null +++ b/Projects/Zompiercer/sync.yaml @@ -0,0 +1,2 @@ +- source: Zompiercer/obj/Release/Zompiercer.dll + target: C:/Games/Zompiercer.Build.16292544/BepInEx/plugins/Zompiercer.dll