fix todes/knast items log

This commit is contained in:
hydrant
2021-06-01 23:57:29 +02:00
parent 44ba8dba61
commit e0879eb330
2 changed files with 3 additions and 2 deletions

View File

@@ -109,12 +109,13 @@ namespace ReallifeGamemode.Server.Extensions
var lostItems = InventoryManager.RemoveIllegalItemsFromInventory(user.Player);
if (lostItems.Any())
{
Logger.LogInformation("Player {0} lost the following items when sent to prison: " + string.Join(", ", lostItems.Select(i =>
Logger.LogInformation("Player {0} lost the following items when sent to prison: {1}", user.Name, string.Join(", ", lostItems.Select(i =>
{
IItem item = InventoryManager.GetItemById(i.ItemId);
return $"{item.Name} ({item.Id}, amount: {i.Amount})";
})));
}
var illegalItemsPrice = lostItems.Select(i =>
{
IIllegalItem item = (IIllegalItem)InventoryManager.GetItemById(i.ItemId);