From 47fdc9e45cd19219aa27bc1bd67298b780c6ce8f Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Thu, 12 Dec 2019 21:00:11 -0800 Subject: [PATCH] Create dependency gen --- .gitattributes | 63 ++ .gitignore | 11 +- Automation/Automation.cs | 66 +++ Automation/Automation.csproj | 8 + GamecraftModdingAPI.sln | 31 + .../GamecraftModdingAPI.csproj | 536 ++++++++++++++++++ .../GamecraftModdingAPIPlugin.cs | 48 ++ GamecraftModdingAPI/TestPatch.cs | 22 + README.md | 4 +- ref2 | 1 + 10 files changed, 787 insertions(+), 3 deletions(-) create mode 100644 .gitattributes create mode 100644 Automation/Automation.cs create mode 100644 Automation/Automation.csproj create mode 100644 GamecraftModdingAPI.sln create mode 100644 GamecraftModdingAPI/GamecraftModdingAPI.csproj create mode 100644 GamecraftModdingAPI/GamecraftModdingAPIPlugin.cs create mode 100644 GamecraftModdingAPI/TestPatch.cs create mode 120000 ref2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore index 6db9ba9..0bda091 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -# ---> VisualStudio ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## @@ -21,6 +20,8 @@ [Rr]eleases/ x64/ x86/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ @@ -210,7 +211,7 @@ _pkginfo.txt # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache -!*.[Cc]ache/ +!?*.[Cc]ache/ # Others ClientBin/ @@ -254,6 +255,7 @@ ServiceFabricBackup/ *.bim.layout *.bim_*.settings *.rptproj.rsuser +*- Backup*.rdl # Microsoft Fakes FakesAssemblies/ @@ -334,3 +336,8 @@ ASALocalRun/ # Local History for Visual Studio .localhistory/ +# BeatPulse healthcheck temp database +healthchecksdb + +# references +ref diff --git a/Automation/Automation.cs b/Automation/Automation.cs new file mode 100644 index 0000000..92787f6 --- /dev/null +++ b/Automation/Automation.cs @@ -0,0 +1,66 @@ +using System; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; + +namespace Automation +{ + class Automation + { + private static readonly string Name = "automation"; + + private static readonly string XmlPrefix = "\n \n"; + private static readonly string XmlSuffix = " \n"; + + private static readonly string GamecraftModdingAPI_csproj = @"\GamecraftModdingAPI.csproj"; + static void Main(string[] args) + { + if (args.Length != 2 || args[0] == "-h" || args[0] == "--help") + { + Console.WriteLine($"Usage : {Name}.exe "); + Console.WriteLine("Other arguments:"); + Console.WriteLine(" --help : display this message"); + Console.WriteLine($" --version : display {Name}'s version"); + return; + } + Console.WriteLine("Building Assembly references"); + string asmXml = BuildAssemblyReferencesXML(args[0]); + //Console.WriteLine(asmXml); + string csprojPath = args[1].EndsWith(GamecraftModdingAPI_csproj)? args[1] : args[1]+GamecraftModdingAPI_csproj; + Console.WriteLine($"Parsing {csprojPath}"); + string csprojContents = File.ReadAllText(csprojPath); + Match dependenciesStart = (new Regex(@"<\s*!--\s*Start\s+Dependencies\s*--\s*>", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Multiline)).Match(csprojContents); + Match dependenciesEnd = (new Regex(@"<\s*!--\s*End\s+Dependencies\s*--\s*>", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Multiline)).Match(csprojContents); + if (!dependenciesEnd.Success || !dependenciesStart.Success) + { + Console.WriteLine("Unable to find dependency XML comments, aborting!"); + return; + } + csprojContents = csprojContents.Substring(0, dependenciesStart.Index) + asmXml + csprojContents.Substring(dependenciesEnd.Index+dependenciesEnd.Length); + //Console.WriteLine(csprojContents); + Console.WriteLine($"Writing Assembly references into {csprojPath}"); + File.WriteAllText(csprojPath, csprojContents); + Console.WriteLine("Successfully generated Gamecraft assembly DLL references"); + } + + static string BuildAssemblyReferencesXML(string path) + { + StringBuilder result = new StringBuilder(); + result.Append(XmlPrefix); + string[] files = Directory.GetFiles(path, "*.dll"); + for(int i = 0; i\n {files[i]}\n \n"); + } + } + result.Append(XmlSuffix); + return result.ToString(); + } + } +} diff --git a/Automation/Automation.csproj b/Automation/Automation.csproj new file mode 100644 index 0000000..c73e0d1 --- /dev/null +++ b/Automation/Automation.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp3.1 + + + diff --git a/GamecraftModdingAPI.sln b/GamecraftModdingAPI.sln new file mode 100644 index 0000000..fe00440 --- /dev/null +++ b/GamecraftModdingAPI.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29411.108 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GamecraftModdingAPI", "GamecraftModdingAPI\GamecraftModdingAPI.csproj", "{7FD5A7D8-4F3E-426A-B07D-7DC70442A4DF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Automation", "Automation\Automation.csproj", "{1DF6E538-4DA4-4708-A567-781AF788921A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7FD5A7D8-4F3E-426A-B07D-7DC70442A4DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7FD5A7D8-4F3E-426A-B07D-7DC70442A4DF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7FD5A7D8-4F3E-426A-B07D-7DC70442A4DF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7FD5A7D8-4F3E-426A-B07D-7DC70442A4DF}.Release|Any CPU.Build.0 = Release|Any CPU + {1DF6E538-4DA4-4708-A567-781AF788921A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1DF6E538-4DA4-4708-A567-781AF788921A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1DF6E538-4DA4-4708-A567-781AF788921A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1DF6E538-4DA4-4708-A567-781AF788921A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {72FB94D0-6C50-475B-81E0-C94C7D7A2A17} + EndGlobalSection +EndGlobal diff --git a/GamecraftModdingAPI/GamecraftModdingAPI.csproj b/GamecraftModdingAPI/GamecraftModdingAPI.csproj new file mode 100644 index 0000000..d19bc37 --- /dev/null +++ b/GamecraftModdingAPI/GamecraftModdingAPI.csproj @@ -0,0 +1,536 @@ + + + + net48 + true + + + + + + + + + + ..\ref\Gamecraft_Data\Managed\Analytics.dll + + + ..\ref\Gamecraft_Data\Managed\Assembly-CSharp-firstpass.dll + + + ..\ref\Gamecraft_Data\Managed\Assembly-CSharp.dll + + + ..\ref\Gamecraft_Data\Managed\Authentication.dll + + + ..\ref\Gamecraft_Data\Managed\BlockEntityFactory.dll + + + ..\ref\Gamecraft_Data\Managed\CommandLine.dll + + + ..\ref\Gamecraft_Data\Managed\DataLoader.dll + + + ..\ref\Gamecraft_Data\Managed\DDNA.dll + + + ..\ref\Gamecraft_Data\Managed\Facepunch.Steamworks.Win64.dll + + + ..\ref\Gamecraft_Data\Managed\FMOD.dll + + + ..\ref\Gamecraft_Data\Managed\FullGame.dll + + + ..\ref\Gamecraft_Data\Managed\Gamecraft.Blocks.ConsoleBlock.dll + + + ..\ref\Gamecraft_Data\Managed\Gamecraft.Effects.dll + + + ..\ref\Gamecraft_Data\Managed\Gamecraft.GUI.ConsoleBlock.dll + + + ..\ref\Gamecraft_Data\Managed\GameState.dll + + + ..\ref\Gamecraft_Data\Managed\GPUInstancer.dll + + + ..\ref\Gamecraft_Data\Managed\Havok.Physics.dll + + + ..\ref\Gamecraft_Data\Managed\Havok.Physics.Hybrid.dll + + + ..\ref\Gamecraft_Data\Managed\HdgRemoteDebugRuntime.dll + + + ..\ref\Gamecraft_Data\Managed\IllusionInjector.dll + + + ..\ref\Gamecraft_Data\Managed\IllusionPlugin.dll + + + ..\ref\Gamecraft_Data\Managed\JWT.dll + + + ..\ref\Gamecraft_Data\Managed\LZ4.dll + + + ..\ref\Gamecraft_Data\Managed\MultiplayerNetworking.dll + + + ..\ref\Gamecraft_Data\Managed\MultiplayerTest.dll + + + ..\ref\Gamecraft_Data\Managed\Newtonsoft.Json.dll + + + ..\ref\Gamecraft_Data\Managed\RCX.ScreenshotTaker.dll + + + ..\ref\Gamecraft_Data\Managed\Rewired_Core.dll + + + ..\ref\Gamecraft_Data\Managed\Rewired_Windows.dll + + + ..\ref\Gamecraft_Data\Managed\Robocraft.MainGame.AutoEnterSimulation.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.AccountPreferences.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Blocks.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Blocks.Ghost.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Blocks.Triggers.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Character.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Common.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Crosshair.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.EntityStreamUtility.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.FrontEnd.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.GameSignalHandling.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.GUI.DebugDisplay.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.GUI.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.GUI.RemoveBlock.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.GUI.ScaleGhost.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.GUI.SignalLabel.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.GUIs.WorkshopPrefabs.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Input.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Inventory.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.MachineEditor.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.MainGame.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.MainSimulation.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Multiplayer.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Multiplayer.NetworkEntityStream.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.MultiplayerInput.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Party.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.PartyGui.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Physics.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.PilotSeat.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Player.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Priority.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Rendering.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Rendering.Mock.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.SaveAndLoad.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.SaveGameDialog.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Serializers.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.Services.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.SignalHandling.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX.StateSync.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX_SpawnPoints.dll + + + ..\ref\Gamecraft_Data\Managed\RobocraftX_TextBlock.dll + + + ..\ref\Gamecraft_Data\Managed\RobocratX.SimulationCompositionRoot.dll + + + ..\ref\Gamecraft_Data\Managed\StringFormatter.dll + + + ..\ref\Gamecraft_Data\Managed\Svelto.Common.dll + + + ..\ref\Gamecraft_Data\Managed\Svelto.ECS.Debugger.dll + + + ..\ref\Gamecraft_Data\Managed\Svelto.ECS.dll + + + ..\ref\Gamecraft_Data\Managed\Svelto.Services.dll + + + ..\ref\Gamecraft_Data\Managed\Svelto.Tasks.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Addressables.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Animation.Rigging.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Burst.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Burst.Unsafe.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Cloud.UserReporting.Client.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Cloud.UserReporting.Plugin.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Collections.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Entities.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Entities.Hybrid.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Entities.Properties.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Entities.StaticTypeRegistry.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Jobs.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Mathematics.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Mathematics.Extensions.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Mathematics.Extensions.Hybrid.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Physics.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Physics.Hybrid.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Postprocessing.Runtime.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Properties.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Rendering.Hybrid.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.RenderPipelines.Core.Runtime.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.RenderPipelines.Core.ShaderLibrary.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.RenderPipelines.Lightweight.Runtime.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.ResourceManager.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Scenes.Hybrid.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.ScriptableBuildPipeline.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.TextMeshPro.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Timeline.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Transforms.dll + + + ..\ref\Gamecraft_Data\Managed\Unity.Transforms.Hybrid.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.AccessibilityModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.AIModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.AndroidJNIModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.AnimationModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.ARModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.AssetBundleModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.AudioModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.ClothModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.ClusterInputModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.ClusterRendererModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.CoreModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.CrashReportingModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.DirectorModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.DSPGraphModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.FileSystemHttpModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.GameCenterModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.GridModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.HotReloadModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.ImageConversionModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.IMGUIModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.InputLegacyModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.InputModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.JSONSerializeModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.LocalizationModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.ParticleSystemModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.PerformanceReportingModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.Physics2DModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.PhysicsModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.ProfilerModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.ScreenCaptureModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.SharedInternalsModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.SpriteMaskModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.SpriteShapeModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.StreamingModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.SubstanceModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.TerrainModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.TerrainPhysicsModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.TextCoreModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.TextRenderingModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.TilemapModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.TLSModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.UI.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.UIElementsModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.UIModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.UmbraModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.UNETModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.UnityAnalyticsModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.UnityConnectModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.UnityTestProtocolModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.UnityWebRequestAssetBundleModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.UnityWebRequestAudioModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.UnityWebRequestModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.UnityWebRequestTextureModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.UnityWebRequestWWWModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.VehiclesModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.VFXModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.VideoModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.VRModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.WindModule.dll + + + ..\ref\Gamecraft_Data\Managed\UnityEngine.XRModule.dll + + + ..\ref\Gamecraft_Data\Managed\uREPL.dll + + + ..\ref\Gamecraft_Data\Managed\UserReporting.dll + + + ..\ref\Gamecraft_Data\Managed\Utf8Json.dll + + + ..\ref\Gamecraft_Data\Managed\VisualProfiler.dll + + + + + diff --git a/GamecraftModdingAPI/GamecraftModdingAPIPlugin.cs b/GamecraftModdingAPI/GamecraftModdingAPIPlugin.cs new file mode 100644 index 0000000..05db235 --- /dev/null +++ b/GamecraftModdingAPI/GamecraftModdingAPIPlugin.cs @@ -0,0 +1,48 @@ +using System; +using IllusionPlugin; +using UnityEngine; +using Harmony; +using System.Reflection; + +namespace GamecraftModdingAPI +{ + // unused by design + public class GamecraftModdingAPIPlugin //: IllusionPlugin.IEnhancedPlugin + { + public static HarmonyInstance harmony { get; protected set; } + + public string[] Filter { get; } = new string[] { "Gamecraft" }; + + public string Name { get; } = "Gamecraft Modding API"; + + public string Version { get; } = "v0.1.0.A"; + + public string HarmonyID { get; } = "org.git.exmods.modtainers.gamecraftmoddingapi"; + + public void OnApplicationQuit() + { + harmony.UnpatchAll(HarmonyID); + Debug.Log(Name + " shutdown complete"); + } + + public void OnApplicationStart() + { + if (harmony == null) + { + harmony = HarmonyInstance.Create(HarmonyID); + harmony.PatchAll(Assembly.GetExecutingAssembly()); + } + Debug.Log(Name + " start & patch complete"); + } + + public void OnFixedUpdate() { } + + public void OnLateUpdate() { } + + public void OnLevelWasInitialized(int level) { } + + public void OnLevelWasLoaded(int level) { } + + public void OnUpdate() { } + } +} diff --git a/GamecraftModdingAPI/TestPatch.cs b/GamecraftModdingAPI/TestPatch.cs new file mode 100644 index 0000000..c7703d0 --- /dev/null +++ b/GamecraftModdingAPI/TestPatch.cs @@ -0,0 +1,22 @@ +using System; +using System.Reflection; +using Harmony; +using UnityEngine; + +namespace TestMod +{ + [HarmonyPatch] + class TestPatch + { + static void Prefix() + { + Debug.Log("Test Patch Prefix"); + } + + [HarmonyTargetMethod] + static MethodBase HTargetMethod(HarmonyInstance instance) + { + throw new NotImplementedException(); + } + } +} diff --git a/README.md b/README.md index f6bfb99..3fee7c6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # GamecraftModdingAPI -Gamecraft modding API for a stable interface between Gamecraft and mods \ No newline at end of file +Gamecraft modding API for a stable interface between Gamecraft and mods + +For more information, join the ExMods Discord: https://discord.gg/xjnFxQV \ No newline at end of file diff --git a/ref2 b/ref2 new file mode 120000 index 0000000..72a1bb1 --- /dev/null +++ b/ref2 @@ -0,0 +1 @@ +Z:/ \ No newline at end of file