Skip to content

Commit

Permalink
Format change
Browse files Browse the repository at this point in the history
  • Loading branch information
jpacelli62 committed Jun 9, 2021
1 parent 075b8c4 commit 343213f
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions EDEngineer/Utils/JournalEntryConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,22 @@ private JournalOperation ExtractTransferMicroResources(JObject data)
converter.TryGet(Kind.OdysseyIngredient, (string)item["Name"], out var materialName);
if (materialName != null)
{
var oldCount = (int)item["LockerOldCount"];
var newCount = (int)item["LockerNewCount"];
operation.AddIngredient(materialName, newCount - oldCount);
if (item["LockerOldCount"] != null && item["LockerNewCount"] != null)
{
var oldCount = (int)item["LockerOldCount"];
var newCount = (int)item["LockerNewCount"];
operation.AddIngredient(materialName, newCount - oldCount);
}
else if ((string)item["Direction"] == "ToShipLocker")// old logs
{
var count = (int)item["Count"];
operation.AddIngredient(materialName, count);
}
else if ((string)item["Direction"] == "ToBackpack")// old logs
{
var count = (int)item["Count"];
operation.RemoveIngredient(materialName, count);
}
}
}

Expand Down

0 comments on commit 343213f

Please sign in to comment.