LoadInventory() static private method

static private LoadInventory ( System.Item inv, IList list ) : void
inv System.Item
list IList
return void
コード例 #1
0
        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"));
                }
            }
        }
コード例 #2
0
ファイル: WorldIO.cs プロジェクト: Tea-Mod-Loader/Tea
 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"));
         }
     }
 }