Skip to content

Commit

Permalink
There should be a framework for working with multiple areas in one GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
Qowyn committed Sep 25, 2014
1 parent 34a2ad7 commit d9aac64
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Expand Up @@ -46,8 +46,8 @@ public CraftingStationContainer(InventoryPlayer inventorplayer, CraftingStationL

if (logic.chest != null)
{
craftingOffsetX += 122;
inventoryOffsetX += 122;
craftingOffsetX += 116;
inventoryOffsetX += 116;
}

this.addSlotToContainer(new SlotCraftingStation(inventorplayer.player, this.craftMatrix, this.craftResult, 0, craftingOffsetX + 94, 35));
Expand Down Expand Up @@ -92,7 +92,7 @@ public CraftingStationContainer(InventoryPlayer inventorplayer, CraftingStationL
for (row = 0; row < 6; row++)
{
int value = count < 27 ? count : count - 27;
this.addSlotToContainer(new Slot(count < 27 ? firstChest : secondChest, value, 14 + row * 18, 19 + column * 18));
this.addSlotToContainer(new Slot(count < 27 ? firstChest : secondChest, value, 8 + row * 18, 19 + column * 18));
count++;
if (count >= 27 && secondChest == null)
break;
Expand Down
Expand Up @@ -25,7 +25,7 @@ public PartCrafterChestContainer(InventoryPlayer inventoryplayer, PartBuilderLog
patternLogic = pLogic;
largeInventory = true;

inventory = new Slot[] { new SlotPattern(partLogic, 0, 162, 27), new SlotPattern(partLogic, 1, 162, 45), new Slot(partLogic, 2, 180, 27), new Slot(partLogic, 3, 180, 45), new SlotOnlyTake(partLogic, 4, 224, 27), new SlotOnlyTake(partLogic, 5, 242, 27), new SlotOnlyTake(partLogic, 6, 224, 45), new SlotOnlyTake(partLogic, 7, 242, 45) };
inventory = new Slot[] { new SlotPattern(partLogic, 0, 156, 27), new SlotPattern(partLogic, 1, 156, 45), new Slot(partLogic, 2, 174, 27), new Slot(partLogic, 3, 174, 45), new SlotOnlyTake(partLogic, 4, 218, 27), new SlotOnlyTake(partLogic, 5, 236, 27), new SlotOnlyTake(partLogic, 6, 218, 45), new SlotOnlyTake(partLogic, 7, 236, 45) };
for (int iter = 0; iter < inventory.length; iter++)
this.addSlotToContainer(inventory[iter]);

Expand All @@ -34,7 +34,7 @@ public PartCrafterChestContainer(InventoryPlayer inventoryplayer, PartBuilderLog
{
for (int row = 0; row < 6; row++)
{
this.addSlotToContainer(new SlotPattern(pLogic, row + column * 6, 14 + row * 18, 30 + column * 18));
this.addSlotToContainer(new SlotPattern(pLogic, row + column * 6, 8 + row * 18, 30 + column * 18));
}
}

Expand All @@ -43,13 +43,13 @@ public PartCrafterChestContainer(InventoryPlayer inventoryplayer, PartBuilderLog
{
for (int row = 0; row < 9; row++)
{
this.addSlotToContainer(new Slot(inventoryplayer, row + column * 9 + 9, 130 + row * 18, 84 + column * 18));
this.addSlotToContainer(new Slot(inventoryplayer, row + column * 9 + 9, 124 + row * 18, 84 + column * 18));
}
}

for (int column = 0; column < 9; column++)
{
this.addSlotToContainer(new Slot(inventoryplayer, column, 130 + column * 18, 142));
this.addSlotToContainer(new Slot(inventoryplayer, column, 124 + column * 18, 142));
}

}
Expand Down

0 comments on commit d9aac64

Please sign in to comment.