diff --git a/Subsurface/Source/Items/Components/Holdable/MeleeWeapon.cs b/Subsurface/Source/Items/Components/Holdable/MeleeWeapon.cs index eb76f05cf..26ddbe6a4 100644 --- a/Subsurface/Source/Items/Components/Holdable/MeleeWeapon.cs +++ b/Subsurface/Source/Items/Components/Holdable/MeleeWeapon.cs @@ -3,6 +3,7 @@ using FarseerPhysics.Dynamics; using FarseerPhysics.Dynamics.Contacts; using Microsoft.Xna.Framework; using System; +using System.Linq; using System.Xml.Linq; namespace Barotrauma.Items.Components @@ -241,7 +242,15 @@ namespace Barotrauma.Items.Components if (GameMain.Server != null) { - GameMain.Server.CreateEntityEvent(item, new object[] { Barotrauma.Networking.NetEntityEvent.Type.ApplyStatusEffect, target.ID }); + GameMain.Server.CreateEntityEvent(item, new object[] { Networking.NetEntityEvent.Type.ApplyStatusEffect, target.ID }); + + string logStr = picker?.Name + " used " + item.Name; + if (item.ContainedItems != null && item.ContainedItems.Length > 0) + { + logStr += "(" + string.Join(", ", item.ContainedItems.Select(i => i?.Name)) + ")"; + } + logStr += " on " + target + "."; + Networking.GameServer.Log(logStr, Color.Orange); } ApplyStatusEffects(ActionType.OnUse, 1.0f, limb.character); diff --git a/Subsurface/Source/Items/Item.cs b/Subsurface/Source/Items/Item.cs index 3acea3114..77340239e 100644 --- a/Subsurface/Source/Items/Item.cs +++ b/Subsurface/Source/Items/Item.cs @@ -1869,6 +1869,8 @@ namespace Barotrauma ApplyStatusEffects(ActionType.OnUse, (float)Timing.Step, c.Character); + GameServer.Log(c.Character.Name +" used item "+Name, Color.White); + GameMain.Server.CreateEntityEvent(this, new object[] { NetEntityEvent.Type.ApplyStatusEffect, c.Character.ID }); break;