commit 9d2d6a51e61641906cf5d3851d435cf5bc0db983 Author: Axwabo Date: Sat Jan 28 00:43:41 2023 +0100 init plugin diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..add57be --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +bin/ +obj/ +/packages/ +riderModule.iml +/_ReSharper.Caches/ \ No newline at end of file diff --git a/DeathLog.sln b/DeathLog.sln new file mode 100644 index 0000000..d3daed3 --- /dev/null +++ b/DeathLog.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DeathLog", "DeathLog\DeathLog.csproj", "{67776CDF-B249-4B71-B8B9-6537A9DCE309}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {67776CDF-B249-4B71-B8B9-6537A9DCE309}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {67776CDF-B249-4B71-B8B9-6537A9DCE309}.Debug|Any CPU.Build.0 = Debug|Any CPU + {67776CDF-B249-4B71-B8B9-6537A9DCE309}.Release|Any CPU.ActiveCfg = Release|Any CPU + {67776CDF-B249-4B71-B8B9-6537A9DCE309}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/DeathLog/DeathLog.csproj b/DeathLog/DeathLog.csproj new file mode 100644 index 0000000..beadbd6 --- /dev/null +++ b/DeathLog/DeathLog.csproj @@ -0,0 +1,133 @@ + + + + + + Debug + AnyCPU + {67776CDF-B249-4B71-B8B9-6537A9DCE309} + Library + Properties + DeathLog + DeathLog + v4.8 + 512 + 10 + + + x64 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + + + x64 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + true + + + + ..\..\assemblies\Assembly-CSharp.dll + + + ..\..\assemblies\Assembly-CSharp-firstpass.dll + + + ..\..\assemblies\Axwabo.Helpers.dll + + + ..\packages\Microsoft.CodeAnalysis.Common.3.3.1\lib\netstandard2.0\Microsoft.CodeAnalysis.dll + + + ..\packages\Microsoft.CodeAnalysis.CSharp.3.3.1\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll + + + ..\..\assemblies\Mirror.dll + + + ..\..\assemblies\Mirror.Components.dll + + + + ..\packages\Northwood.PluginAPI.Analyzers.12.0.0\lib\netstandard2.0\NwPluginAPI.Analyzers.dll + + + ..\packages\Northwood.PluginAPI.12.0.0\lib\net48\PluginAPI.dll + + + + ..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll + + + ..\packages\System.Collections.Immutable.1.5.0\lib\netstandard2.0\System.Collections.Immutable.dll + + + + + ..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Reflection.Metadata.1.6.0\lib\netstandard2.0\System.Reflection.Metadata.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll + + + ..\packages\System.Text.Encoding.CodePages.4.5.1\lib\net461\System.Text.Encoding.CodePages.dll + + + ..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll + + + + ..\..\assemblies\UnityEngine.dll + + + ..\..\assemblies\UnityEngine.CoreModule.dll + + + ..\packages\YamlDotNet.11.0.1\lib\net45\YamlDotNet.dll + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}. + + + + + + diff --git a/DeathLog/DeathLogConfig.cs b/DeathLog/DeathLogConfig.cs new file mode 100644 index 0000000..cd20047 --- /dev/null +++ b/DeathLog/DeathLogConfig.cs @@ -0,0 +1,7 @@ +namespace DeathLog; + +public sealed class DeathLogConfig { + + public bool LogSimpleDeaths { get; set; } = true; + +} \ No newline at end of file diff --git a/DeathLog/DeathLogPlugin.cs b/DeathLog/DeathLogPlugin.cs new file mode 100644 index 0000000..f35f69d --- /dev/null +++ b/DeathLog/DeathLogPlugin.cs @@ -0,0 +1,37 @@ +using PlayerStatsSystem; +using PluginAPI.Core; +using PluginAPI.Core.Attributes; +using PluginAPI.Enums; + +namespace DeathLog; + +public sealed class DeathLogPlugin { + + [PluginEntryPoint("DeathLog", "1.0.0", "DeathLog", "Axwabo")] + public void OnEnabled() { + } + + [PluginUnload] + public void OnDisabled() { + } + + [PluginConfig] + public DeathLogConfig Config = new(); + + [PluginEvent(ServerEventType.PlayerDeath)] + public void OnPlayerDeath(Player player, Player attacker, DamageHandlerBase handler) { + if (attacker == null) + LogSimpleDeathMessage(player, handler); + else + LogAttackerDeathMessage(player, attacker, handler); + } + + private void LogSimpleDeathMessage(Player player, DamageHandlerBase handler) { + throw new System.NotImplementedException(); + } + + private void LogAttackerDeathMessage(Player player, Player attacker, DamageHandlerBase handler) { + throw new System.NotImplementedException(); + } + +} diff --git a/DeathLog/Properties/AssemblyInfo.cs b/DeathLog/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6175dbb --- /dev/null +++ b/DeathLog/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("DeathLog")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("DeathLog")] +[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("67776CDF-B249-4B71-B8B9-6537A9DCE309")] + +// 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/DeathLog/packages.config b/DeathLog/packages.config new file mode 100644 index 0000000..c5055e9 --- /dev/null +++ b/DeathLog/packages.config @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file