// Token: 0x06000FE5 RID: 4069 RVA: 0x00149EBC File Offset: 0x001480BC public StorageContainer(List <Item> inventory, int capacity, int rows = 3, StorageContainer.behaviorOnItemChange itemChangeBehavior = null, InventoryMenu.highlightThisItem highlightMethod = null) : base(highlightMethod, true, true, 0, 0) { this.itemChangeBehavior = itemChangeBehavior; int containerWidth = Game1.tileSize * (capacity / rows); int arg_23_0 = Game1.tileSize; int arg_2B_0 = Game1.tileSize / 4; this.ItemsToGrabMenu = new InventoryMenu(Game1.viewport.Width / 2 - containerWidth / 2, this.yPositionOnScreen + Game1.tileSize, false, inventory, null, capacity, rows, 0, 0, true); }
public StorageContainer(List <Item> inventory, int capacity, int rows = 3, StorageContainer.behaviorOnItemChange itemChangeBehavior = null, InventoryMenu.highlightThisItem highlightMethod = null) : base(highlightMethod, true, true, 0, 0) { this.itemChangeBehavior = itemChangeBehavior; int num1 = Game1.tileSize * (capacity / rows); int tileSize = Game1.tileSize; int num2 = Game1.tileSize / 4; this.ItemsToGrabMenu = new InventoryMenu(Game1.viewport.Width / 2 - num1 / 2, this.yPositionOnScreen + Game1.tileSize, false, inventory, (InventoryMenu.highlightThisItem)null, capacity, rows, 0, 0, true); for (int index = 0; index < this.ItemsToGrabMenu.actualInventory.Count; ++index) { if (index >= this.ItemsToGrabMenu.actualInventory.Count - this.ItemsToGrabMenu.capacity / this.ItemsToGrabMenu.rows) { this.ItemsToGrabMenu.inventory[index].downNeighborID = index + 53910; } } for (int index = 0; index < this.inventory.inventory.Count; ++index) { this.inventory.inventory[index].myID = index + 53910; if (this.inventory.inventory[index].downNeighborID != -1) { this.inventory.inventory[index].downNeighborID += 53910; } if (this.inventory.inventory[index].rightNeighborID != -1) { this.inventory.inventory[index].rightNeighborID += 53910; } if (this.inventory.inventory[index].leftNeighborID != -1) { this.inventory.inventory[index].leftNeighborID += 53910; } if (this.inventory.inventory[index].upNeighborID != -1) { this.inventory.inventory[index].upNeighborID += 53910; } if (index < 12) { this.inventory.inventory[index].upNeighborID = this.ItemsToGrabMenu.actualInventory.Count - this.ItemsToGrabMenu.capacity / this.ItemsToGrabMenu.rows; } } }