Logging item throwing and which items are contained in items characters use on themselves (e.g. which meds are inside a syringe)
This commit is contained in:
@@ -1323,7 +1323,16 @@ namespace Barotrauma
|
||||
|
||||
ApplyStatusEffects(ActionType.OnUse, (float)Timing.Step, c.Character);
|
||||
|
||||
GameServer.Log(c.Character.Name + " used item " + Name, ServerLog.MessageType.ItemInteraction);
|
||||
if (ContainedItems == null || ContainedItems.All(i => i == null))
|
||||
{
|
||||
GameServer.Log(c.Character.Name + " used item " + Name, ServerLog.MessageType.ItemInteraction);
|
||||
}
|
||||
else
|
||||
{
|
||||
GameServer.Log(
|
||||
c.Character.Name + " used item " + Name + " (contained items: " + string.Join(", ", Array.FindAll(ContainedItems, i => i != null).Select(i => i.Name)) + ")",
|
||||
ServerLog.MessageType.ItemInteraction);
|
||||
}
|
||||
|
||||
GameMain.Server.CreateEntityEvent(this, new object[] { NetEntityEvent.Type.ApplyStatusEffect, ActionType.OnUse, c.Character.ID });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user