static private LoadInventory ( System.Item inv, IList |
||
inv | System.Item | |
list | IList |
|
return | void |
internal static void LoadChestInventory(IList <TagCompound> list) { foreach (var tag in list) { int cID = Chest.FindChest(tag.GetInt("x"), tag.GetInt("y")); if (cID >= 0) { var chest = Main.chest[cID]; PlayerIO.LoadInventory(chest.item, tag.GetList <TagCompound>("items")); } } }
internal static void LoadChests(IList <TagCompound> list) { foreach (var tag in list) { int x = tag.GetInt("x"); int y = tag.GetInt("y"); int chest = Chest.FindChest(x, y); if (chest < 0) { chest = Chest.CreateChest(x, y); } if (chest >= 0) { PlayerIO.LoadInventory(Main.chest[chest].item, tag.GetList <TagCompound>("items")); } } }