From b84f8849ef762ccae7d5cd797b0e9ee29a6b6ceb Mon Sep 17 00:00:00 2001 From: bdew Date: Sun, 16 Mar 2014 10:33:22 +0200 Subject: [PATCH] Add slot hints in a safer way --- .../gendustry/machines/advmutatron/GuiMutatronAdv.scala | 6 +++--- src/net/bdew/gendustry/machines/apiary/GuiApiary.scala | 4 ++-- .../bdew/gendustry/machines/imprinter/GuiImprinter.scala | 6 +++--- .../bdew/gendustry/machines/mutatron/GuiMutatron.scala | 6 +++--- src/net/bdew/gendustry/machines/sampler/GuiSampler.scala | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/net/bdew/gendustry/machines/advmutatron/GuiMutatronAdv.scala b/src/net/bdew/gendustry/machines/advmutatron/GuiMutatronAdv.scala index 08898d5..ec845cb 100644 --- a/src/net/bdew/gendustry/machines/advmutatron/GuiMutatronAdv.scala +++ b/src/net/bdew/gendustry/machines/advmutatron/GuiMutatronAdv.scala @@ -28,8 +28,8 @@ class GuiMutatronAdv(val te: TileMutatronAdv, player: EntityPlayer) extends Base widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.mutatron.adv.name"), 8, 6, Color.darkgray)) widgets.add(new WidgetLabel(Misc.toLocal("gendustry.label.select"), 8, 89, Color.darkgray)) - inventorySlots.getSlot(te.slots.inIndividual1).setBackgroundIcon(HintIcons.queenOrSapling) - inventorySlots.getSlot(te.slots.inIndividual2).setBackgroundIcon(HintIcons.droneOrPollen) - inventorySlots.getSlot(te.slots.inLabware).setBackgroundIcon(HintIcons.labware) + inventorySlots.getSlotFromInventory(te, te.slots.inIndividual1).setBackgroundIcon(HintIcons.queenOrSapling) + inventorySlots.getSlotFromInventory(te, te.slots.inIndividual2).setBackgroundIcon(HintIcons.droneOrPollen) + inventorySlots.getSlotFromInventory(te, te.slots.inLabware).setBackgroundIcon(HintIcons.labware) } } \ No newline at end of file diff --git a/src/net/bdew/gendustry/machines/apiary/GuiApiary.scala b/src/net/bdew/gendustry/machines/apiary/GuiApiary.scala index de296c0..7af5011 100644 --- a/src/net/bdew/gendustry/machines/apiary/GuiApiary.scala +++ b/src/net/bdew/gendustry/machines/apiary/GuiApiary.scala @@ -26,7 +26,7 @@ class GuiApiary(val te: TileApiary, player: EntityPlayer) extends BaseScreen(new widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.apiary.name"), 8, 6, Color.darkgray)) te.slots.upgrades.foreach(inventorySlots.getSlot(_).setBackgroundIcon(HintIcons.upgrade)) - inventorySlots.getSlot(te.slots.drone).setBackgroundIcon(HintIcons.drone) - inventorySlots.getSlot(te.slots.queen).setBackgroundIcon(HintIcons.queen) + inventorySlots.getSlotFromInventory(te, te.slots.drone).setBackgroundIcon(HintIcons.drone) + inventorySlots.getSlotFromInventory(te, te.slots.queen).setBackgroundIcon(HintIcons.queen) } } \ No newline at end of file diff --git a/src/net/bdew/gendustry/machines/imprinter/GuiImprinter.scala b/src/net/bdew/gendustry/machines/imprinter/GuiImprinter.scala index c9b7eab..9478148 100644 --- a/src/net/bdew/gendustry/machines/imprinter/GuiImprinter.scala +++ b/src/net/bdew/gendustry/machines/imprinter/GuiImprinter.scala @@ -25,8 +25,8 @@ class GuiImprinter(val te: TileImprinter, player: EntityPlayer) extends BaseScre widgets.add(new WidgetPowerCustom(new Rect(8, 19, 16, 58), Textures.powerFill, te.power)) widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.imprinter.name"), 8, 6, Color.darkgray)) - inventorySlots.getSlot(te.slots.inIndividual).setBackgroundIcon(HintIcons.queenOrSapling) - inventorySlots.getSlot(te.slots.inLabware).setBackgroundIcon(HintIcons.labware) - inventorySlots.getSlot(te.slots.inTemplate).setBackgroundIcon(HintIcons.template) + inventorySlots.getSlotFromInventory(te, te.slots.inIndividual).setBackgroundIcon(HintIcons.queenOrSapling) + inventorySlots.getSlotFromInventory(te, te.slots.inLabware).setBackgroundIcon(HintIcons.labware) + inventorySlots.getSlotFromInventory(te, te.slots.inTemplate).setBackgroundIcon(HintIcons.template) } } \ No newline at end of file diff --git a/src/net/bdew/gendustry/machines/mutatron/GuiMutatron.scala b/src/net/bdew/gendustry/machines/mutatron/GuiMutatron.scala index 789a999..62a1db8 100644 --- a/src/net/bdew/gendustry/machines/mutatron/GuiMutatron.scala +++ b/src/net/bdew/gendustry/machines/mutatron/GuiMutatron.scala @@ -26,8 +26,8 @@ class GuiMutatron(val te: TileMutatron, player: EntityPlayer) extends BaseScreen widgets.add(new WidgetFluidGauge(new Rect(32, 19, 16, 58), Textures.tankOverlay, te.tank)) widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.mutatron.name"), 8, 6, Color.darkgray)) - inventorySlots.getSlot(te.slots.inIndividual1).setBackgroundIcon(HintIcons.queenOrSapling) - inventorySlots.getSlot(te.slots.inIndividual2).setBackgroundIcon(HintIcons.droneOrPollen) - inventorySlots.getSlot(te.slots.inLabware).setBackgroundIcon(HintIcons.labware) + inventorySlots.getSlotFromInventory(te, te.slots.inIndividual1).setBackgroundIcon(HintIcons.queenOrSapling) + inventorySlots.getSlotFromInventory(te, te.slots.inIndividual2).setBackgroundIcon(HintIcons.droneOrPollen) + inventorySlots.getSlotFromInventory(te, te.slots.inLabware).setBackgroundIcon(HintIcons.labware) } } \ No newline at end of file diff --git a/src/net/bdew/gendustry/machines/sampler/GuiSampler.scala b/src/net/bdew/gendustry/machines/sampler/GuiSampler.scala index ffef0ad..dd854d0 100644 --- a/src/net/bdew/gendustry/machines/sampler/GuiSampler.scala +++ b/src/net/bdew/gendustry/machines/sampler/GuiSampler.scala @@ -25,9 +25,9 @@ class GuiSampler(val te: TileSampler, player: EntityPlayer) extends BaseScreen(n widgets.add(new WidgetPowerCustom(new Rect(8, 19, 16, 58), Textures.powerFill, te.power)) widgets.add(new WidgetLabel(Misc.toLocal("tile.gendustry.sampler.name"), 8, 6, Color.darkgray)) - inventorySlots.getSlot(te.slots.inSampleBlank).setBackgroundIcon(HintIcons.blankSample) - inventorySlots.getSlot(te.slots.inLabware).setBackgroundIcon(HintIcons.labware) - inventorySlots.getSlot(te.slots.inIndividual).setBackgroundIcon(HintIcons.droneOrSapling) - inventorySlots.getSlot(te.slots.outSample).setBackgroundIcon(HintIcons.sample) + inventorySlots.getSlotFromInventory(te, te.slots.inSampleBlank).setBackgroundIcon(HintIcons.blankSample) + inventorySlots.getSlotFromInventory(te, te.slots.inLabware).setBackgroundIcon(HintIcons.labware) + inventorySlots.getSlotFromInventory(te, te.slots.inIndividual).setBackgroundIcon(HintIcons.droneOrSapling) + inventorySlots.getSlotFromInventory(te, te.slots.outSample).setBackgroundIcon(HintIcons.sample) } } \ No newline at end of file