From bca6a9c4689a7a4c9844037d2adb16d6fcc4e178 Mon Sep 17 00:00:00 2001 From: WulfMarius Date: Sun, 23 Dec 2018 17:33:06 +0100 Subject: [PATCH] Updated for TLD V1.44 --- Durable-Whetstone.csproj | 12 +++--------- Properties/AssemblyInfo.cs | 4 ++-- src/Implementation.cs | 16 ++++++++++++++-- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/Durable-Whetstone.csproj b/Durable-Whetstone.csproj index 74d51d6..afb960b 100644 --- a/Durable-Whetstone.csproj +++ b/Durable-Whetstone.csproj @@ -36,15 +36,9 @@ - - False - - - False - - - False - + + + diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 6c820ae..93f6a54 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // 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("2.0.0")] -[assembly: AssemblyFileVersion("2.0.0")] +[assembly: AssemblyVersion("3.0.0")] +[assembly: AssemblyFileVersion("3.0.0")] diff --git a/src/Implementation.cs b/src/Implementation.cs index 6aa3f60..42bc8b1 100644 --- a/src/Implementation.cs +++ b/src/Implementation.cs @@ -1,13 +1,14 @@ using UnityEngine; -using Harmony; namespace DurableWhetstone { public class Implementation { + private const string NAME = "Durable-Whetstone"; + public static void OnLoad() { - Debug.Log("[Durable-Whetstone]: Version " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version); + Log("Version " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version); } internal static void AdjustDegradeOnUse(GameObject gameObject, float value) @@ -20,5 +21,16 @@ internal static void AdjustDegradeOnUse(GameObject gameObject, float value) degradeOnUse.m_DegradeHP = value; } + + internal static void Log(string message) + { + Debug.LogFormat("[" + NAME + "] {0}", message); + } + + internal static void Log(string message, params object[] parameters) + { + string preformattedMessage = string.Format("[" + NAME + "] {0}", message); + Debug.LogFormat(preformattedMessage, parameters); + } } } \ No newline at end of file