Skip to content

Commit

Permalink
keep old name scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaPiggy committed Jun 25, 2024
1 parent cb06013 commit 4fb84f8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Winch/Util/ItemUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ internal static class ItemUtil
{ typeof(DamageItemData), new DamageItemDataConverter() },
};

public static Dictionary<string, ItemData> harvestableItemDataDict = new();
public static Dictionary<string, ItemData> allItemDataDict = new();
public static Dictionary<string, ItemData> HarvestableItemDataDict = new();
public static Dictionary<string, ItemData> AllItemDataDict = new();

public static void PopulateItemData()
{
foreach (var item in GameManager.Instance.ItemManager.allItems)
{
if (item is FishItemData or RelicItemData or HarvestableItemData)
{
harvestableItemDataDict.Add(item.id, item);
WinchCore.Log.Debug($"Added item {item.id} to harvestableItemDataDict");
HarvestableItemDataDict.Add(item.id, item);
WinchCore.Log.Debug($"Added item {item.id} to HarvestableItemDataDict");
}
allItemDataDict.Add(item.id, item);
WinchCore.Log.Debug($"Added item {item.id} to allItemDataDict");
AllItemDataDict.Add(item.id, item);
WinchCore.Log.Debug($"Added item {item.id} to AllItemDataDict");
}
}

Expand All @@ -50,7 +50,7 @@ internal static void AddItemFromMeta<T>(string metaPath) where T : ItemData
WinchCore.Log.Error($"Meta file {metaPath} is empty");
return;
}
if (allItemDataDict.ContainsKey((string)meta["id"]))
if (AllItemDataDict.ContainsKey((string)meta["id"]))
{
WinchCore.Log.Error($"Duplicate item {(string)meta["id"]} at {metaPath} failed to load");
return;
Expand Down

0 comments on commit 4fb84f8

Please sign in to comment.