From 98b9928bda9d7565d0cd633d9a6769e1be2030e3 Mon Sep 17 00:00:00 2001 From: bdew Date: Mon, 20 Apr 2015 15:12:15 +0300 Subject: [PATCH] DataSlotTankRestricted now takes fluid object instead of fluid ID --- .../bdew/gendustry/machines/advmutatron/TileMutatronAdv.scala | 2 +- src/net/bdew/gendustry/machines/extractor/TileExtractor.scala | 2 +- src/net/bdew/gendustry/machines/liquifier/TileLiquifier.scala | 2 +- .../gendustry/machines/mproducer/TileMutagenProducer.scala | 2 +- src/net/bdew/gendustry/machines/mutatron/TileMutatron.scala | 2 +- .../bdew/gendustry/machines/replicator/TileReplicator.scala | 4 ++-- src/net/bdew/gendustry/waila/WailaDataslotsDataProvider.scala | 3 +-- 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/net/bdew/gendustry/machines/advmutatron/TileMutatronAdv.scala b/src/net/bdew/gendustry/machines/advmutatron/TileMutatronAdv.scala index a87a125..38632c1 100644 --- a/src/net/bdew/gendustry/machines/advmutatron/TileMutatronAdv.scala +++ b/src/net/bdew/gendustry/machines/advmutatron/TileMutatronAdv.scala @@ -35,7 +35,7 @@ class TileMutatronAdv extends TileItemProcessor with TileWorker with TilePowered val selectors = 4 to 9 } - val tank = DataSlotTankRestricted("tank", this, cfg.tankSize, Fluids.mutagen.getID) + val tank = DataSlotTankRestricted("tank", this, cfg.tankSize, Fluids.mutagen) val selectedMutation = DataSlotInt("selected", this, -1).setUpdate(UpdateKind.SAVE, UpdateKind.GUI) val lastPlayer = DataSlotGameProfile("player", this).setUpdate(UpdateKind.SAVE) diff --git a/src/net/bdew/gendustry/machines/extractor/TileExtractor.scala b/src/net/bdew/gendustry/machines/extractor/TileExtractor.scala index 43ade11..8402d9b 100644 --- a/src/net/bdew/gendustry/machines/extractor/TileExtractor.scala +++ b/src/net/bdew/gendustry/machines/extractor/TileExtractor.scala @@ -31,7 +31,7 @@ class TileExtractor extends TileBaseProcessor with TileWorker with TilePowered w val inLabware = 1 } - val tank = DataSlotTankRestricted("tank", this, cfg.tankSize, Fluids.dna.getID).setUpdate(UpdateKind.GUI, UpdateKind.SAVE) + val tank = DataSlotTankRestricted("tank", this, cfg.tankSize, Fluids.dna).setUpdate(UpdateKind.GUI, UpdateKind.SAVE) val output = DataSlotInt("output", this).setUpdate(UpdateKind.SAVE) def getSizeInventory = 2 diff --git a/src/net/bdew/gendustry/machines/liquifier/TileLiquifier.scala b/src/net/bdew/gendustry/machines/liquifier/TileLiquifier.scala index a48c02f..e21cabd 100644 --- a/src/net/bdew/gendustry/machines/liquifier/TileLiquifier.scala +++ b/src/net/bdew/gendustry/machines/liquifier/TileLiquifier.scala @@ -26,7 +26,7 @@ import net.minecraftforge.fluids._ class TileLiquifier extends TileBaseProcessor with TileWorker with TilePowered with ExposeTank with TileCoverable { lazy val cfg = MachineLiquifier - val tank = DataSlotTankRestricted("tank", this, cfg.tankSize, Fluids.protein.getID).setUpdate(UpdateKind.GUI, UpdateKind.SAVE) + val tank = DataSlotTankRestricted("tank", this, cfg.tankSize, Fluids.protein).setUpdate(UpdateKind.GUI, UpdateKind.SAVE) val output = DataSlotInt("output", this).setUpdate(UpdateKind.SAVE) object slots { diff --git a/src/net/bdew/gendustry/machines/mproducer/TileMutagenProducer.scala b/src/net/bdew/gendustry/machines/mproducer/TileMutagenProducer.scala index 2b8428b..2275444 100644 --- a/src/net/bdew/gendustry/machines/mproducer/TileMutagenProducer.scala +++ b/src/net/bdew/gendustry/machines/mproducer/TileMutagenProducer.scala @@ -26,7 +26,7 @@ import net.minecraftforge.fluids._ class TileMutagenProducer extends TileBaseProcessor with TileWorker with TilePowered with ExposeTank with TileCoverable { lazy val cfg = MachineMutagenProducer - val tank = DataSlotTankRestricted("tank", this, cfg.tankSize, Fluids.mutagen.getID).setUpdate(UpdateKind.GUI, UpdateKind.SAVE) + val tank = DataSlotTankRestricted("tank", this, cfg.tankSize, Fluids.mutagen).setUpdate(UpdateKind.GUI, UpdateKind.SAVE) val output = DataSlotInt("output", this).setUpdate(UpdateKind.SAVE) def getSizeInventory = 1 diff --git a/src/net/bdew/gendustry/machines/mutatron/TileMutatron.scala b/src/net/bdew/gendustry/machines/mutatron/TileMutatron.scala index da74ee1..5736a50 100644 --- a/src/net/bdew/gendustry/machines/mutatron/TileMutatron.scala +++ b/src/net/bdew/gendustry/machines/mutatron/TileMutatron.scala @@ -33,7 +33,7 @@ class TileMutatron extends TileItemProcessor with TileWorker with TilePowered wi val outIndividual = 2 } - val tank = DataSlotTankRestricted("tank", this, cfg.tankSize, Fluids.mutagen.getID) + val tank = DataSlotTankRestricted("tank", this, cfg.tankSize, Fluids.mutagen) val lastPlayer = DataSlotGameProfile("player", this).setUpdate(UpdateKind.SAVE) def getSizeInventory = 4 diff --git a/src/net/bdew/gendustry/machines/replicator/TileReplicator.scala b/src/net/bdew/gendustry/machines/replicator/TileReplicator.scala index 0437e5c..59f2974 100644 --- a/src/net/bdew/gendustry/machines/replicator/TileReplicator.scala +++ b/src/net/bdew/gendustry/machines/replicator/TileReplicator.scala @@ -30,8 +30,8 @@ class TileReplicator extends TileItemProcessor with TileWorker with TilePowered val outIndividual = 1 } - val dnaTank = DataSlotTankRestricted("dnaTank", this, cfg.dnaTankSize, Fluids.dna.getID) - val proteinTank = DataSlotTankRestricted("proteinTank", this, cfg.proteinTankSize, Fluids.protein.getID) + val dnaTank = DataSlotTankRestricted("dnaTank", this, cfg.dnaTankSize, Fluids.dna) + val proteinTank = DataSlotTankRestricted("proteinTank", this, cfg.proteinTankSize, Fluids.protein) def getSizeInventory = 2 diff --git a/src/net/bdew/gendustry/waila/WailaDataslotsDataProvider.scala b/src/net/bdew/gendustry/waila/WailaDataslotsDataProvider.scala index 151d497..22d8549 100644 --- a/src/net/bdew/gendustry/waila/WailaDataslotsDataProvider.scala +++ b/src/net/bdew/gendustry/waila/WailaDataslotsDataProvider.scala @@ -40,8 +40,7 @@ object WailaDataSlotsDataProvider extends BaseDataProvider(classOf[TileDataSlots if (slot.getFluid != null && slot.getFluid.getFluid != null) { Some("%s / %s mB %s".format(DecFormat.round(slot.getFluidAmount), DecFormat.round(slot.size), slot.getFluid.getLocalizedName)) } else { - val fluid = FluidRegistry.getFluid(slot.fluidID) - Some("0 / %s mB %s".format(DecFormat.round(slot.size), fluid.getLocalizedName(new FluidStack(fluid, 1)))) + Some("0 / %s mB %s".format(DecFormat.round(slot.size), slot.getFluid.getLocalizedName)) } case slot: DataSlotTank =>