diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 280194e3..712de833 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,7 @@ ## How to setup your environment for V+ development How to setup the development enviroment to compile ValheimPlus yourself. -1. Download the [BepInEx for Valheim package](https://valheim.thunderstore.io/package/download/denikson/BepInExPack_Valheim/5.4.1901/). +1. Download the [BepInEx for Valheim package](https://valheim.thunderstore.io/package/download/denikson/BepInExPack_Valheim/5.4.2100/). - Extract zip contents and copy the contents inside `/BepInExPack_Valheim/` and paste them in your Valheim root folder and overwrite every file when asked. - This package sets up your Valheim game with BepInEx configurations specifically for mod devs. Created by [BepInEx](https://github.com/BepInEx). 1. Copy over all the DLLs from Valheim/unstripped_corlib to Valheim/valheim_Data/Managed *(overwrite when asked)* diff --git a/ValheimPlus/GameClasses/Chat.cs b/ValheimPlus/GameClasses/Chat.cs index 3dfde7d5..15bdc076 100644 --- a/ValheimPlus/GameClasses/Chat.cs +++ b/ValheimPlus/GameClasses/Chat.cs @@ -10,10 +10,10 @@ namespace ValheimPlus.GameClasses /// /// Change Ping and global message behavior /// - [HarmonyPatch(typeof(Chat), nameof(Chat.OnNewChatMessage), new System.Type[] { typeof(GameObject), typeof(long), typeof(Vector3), typeof(Talker.Type), typeof(string), typeof(string), typeof(string) })] + [HarmonyPatch(typeof(Chat), nameof(Chat.OnNewChatMessage), new System.Type[] { typeof(GameObject), typeof(long), typeof(Vector3), typeof(Talker.Type), typeof(UserInfo), typeof(string), typeof(string) })] public static class Chat_AddInworldText_Patch { - private static bool Prefix(ref Chat __instance, GameObject go, long senderID, Vector3 pos, Talker.Type type, string user, string text, string senderNetworkUserId) + private static bool Prefix(ref Chat __instance, GameObject go, long senderID, Vector3 pos, Talker.Type type, UserInfo user, string text, string senderNetworkUserId) { if (Configuration.Current.Chat.IsEnabled) @@ -50,7 +50,7 @@ private static bool Prefix(ref Chat __instance, GameObject go, long senderID, Ve { // Only add string to chat window and show no ping if (Configuration.Current.Chat.outOfRangeShoutsDisplayInChatWindow) - __instance.AddString(user, text, Talker.Type.Shout); + __instance.AddString(user.GetDisplayName(senderNetworkUserId), text, Talker.Type.Shout); return false; } } @@ -64,7 +64,7 @@ private static bool Prefix(ref Chat __instance, GameObject go, long senderID, Ve - [HarmonyPatch(typeof(Chat), nameof(Chat.AddInworldText), new System.Type[] { typeof(GameObject), typeof(long), typeof(Vector3), typeof(Talker.Type), typeof(string), typeof(string) })] + [HarmonyPatch(typeof(Chat), nameof(Chat.AddInworldText), new System.Type[] { typeof(GameObject), typeof(long), typeof(Vector3), typeof(Talker.Type), typeof(UserInfo), typeof(string) })] public static class Chat_AddInworldText_Transpiler { /// diff --git a/ValheimPlus/GameClasses/InventoryGUI.cs b/ValheimPlus/GameClasses/InventoryGUI.cs index 076f72c8..77ff9f94 100644 --- a/ValheimPlus/GameClasses/InventoryGUI.cs +++ b/ValheimPlus/GameClasses/InventoryGUI.cs @@ -261,7 +261,8 @@ public static IEnumerable Transpile(IEnumerable