mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-15 17:55:04 +00:00
Clean Up Machines: Genetic
This commit is contained in:
1 parent
154207f60f
commit
489ce3dece
32 files changed
+185
-133
No files matched your search
@@ -42,49 +42,58 @@ public class ModuleGardening implements IInitializable {
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
Botany.soil = new BlockSoil(EnumSoilType.SOIL, "soil", false);
|
||||
Botany.loam = new BlockSoil(EnumSoilType.LOAM, "loam", false);
|
||||
Botany.flowerbed = new BlockSoil(EnumSoilType.FLOWERBED, "flowerbed", false);
|
||||
Botany.soilNoWeed = new BlockSoil(EnumSoilType.SOIL, "soilNoWeed", true);
|
||||
Botany.loamNoWeed = new BlockSoil(EnumSoilType.LOAM, "loamNoWeed", true);
|
||||
Botany.flowerbedNoWeed = new BlockSoil(EnumSoilType.FLOWERBED, "flowerbedNoWeed", true);
|
||||
Botany.proxy.registerBlock(Botany.plant = new BlockPlant());
|
||||
Botany.proxy.registerItem(new ItemWeed(Botany.plant).setRegistryName(Botany.plant.getRegistryName()));
|
||||
Botany.soil = new BlockSoil(EnumSoilType.SOIL, "soil", false);
|
||||
Botany.proxy.registerBlock(Botany.soil);
|
||||
Botany.proxy.registerItem(new ItemSoil(Botany.soil).setRegistryName(Botany.soil.getRegistryName()));
|
||||
Botany.loam = new BlockSoil(EnumSoilType.LOAM, "loam", false);
|
||||
Botany.proxy.registerBlock(Botany.loam);
|
||||
Botany.proxy.registerItem(new ItemSoil(Botany.loam).setRegistryName(Botany.loam.getRegistryName()));
|
||||
Botany.flowerbed = new BlockSoil(EnumSoilType.FLOWERBED, "flowerbed", false);
|
||||
Botany.proxy.registerBlock(Botany.flowerbed);
|
||||
Botany.proxy.registerItem(new ItemSoil(Botany.flowerbed).setRegistryName(Botany.flowerbed.getRegistryName()));
|
||||
Botany.soilNoWeed = new BlockSoil(EnumSoilType.SOIL, "soilNoWeed", true);
|
||||
Botany.proxy.registerBlock(Botany.soilNoWeed);
|
||||
Botany.proxy.registerItem(new ItemSoil(Botany.soilNoWeed).setRegistryName(Botany.soilNoWeed.getRegistryName()));
|
||||
Botany.loamNoWeed = new BlockSoil(EnumSoilType.LOAM, "loamNoWeed", true);
|
||||
Botany.proxy.registerBlock(Botany.loamNoWeed);
|
||||
Botany.proxy.registerItem(new ItemSoil(Botany.loamNoWeed).setRegistryName(Botany.loamNoWeed.getRegistryName()));
|
||||
Botany.flowerbedNoWeed = new BlockSoil(EnumSoilType.FLOWERBED, "flowerbedNoWeed", true);
|
||||
Botany.proxy.registerBlock(Botany.flowerbedNoWeed);
|
||||
Botany.proxy.registerItem(new ItemSoil(Botany.flowerbedNoWeed).setRegistryName(Botany.flowerbedNoWeed.getRegistryName()));
|
||||
Botany.soilMeter = new ItemSoilMeter();
|
||||
Botany.proxy.registerItem(Botany.soilMeter);
|
||||
Botany.insulatedTube = new ItemInsulatedTube();
|
||||
Botany.proxy.registerItem(Botany.insulatedTube);
|
||||
Botany.trowelWood = new ItemTrowel(Item.ToolMaterial.WOOD, "Wood");
|
||||
Botany.proxy.registerItem(Botany.trowelWood);
|
||||
Botany.trowelStone = new ItemTrowel(Item.ToolMaterial.STONE, "Stone");
|
||||
Botany.proxy.registerItem(Botany.trowelStone);
|
||||
Botany.trowelIron = new ItemTrowel(Item.ToolMaterial.IRON, "Iron");
|
||||
Botany.proxy.registerItem(Botany.trowelIron);
|
||||
Botany.trowelDiamond = new ItemTrowel(Item.ToolMaterial.DIAMOND, "Diamond");
|
||||
Botany.proxy.registerItem(Botany.trowelDiamond);
|
||||
Botany.trowelGold = new ItemTrowel(Item.ToolMaterial.GOLD, "Gold");
|
||||
Botany.proxy.registerItem(Botany.trowelGold);
|
||||
Botany.misc = Binnie.Item.registerMiscItems(BotanyItems.values(), CreativeTabBotany.instance);
|
||||
Botany.proxy.registerItem(Botany.misc);
|
||||
Botany.pigment = new ItemPigment();
|
||||
Botany.proxy.registerItem(Botany.pigment);
|
||||
Botany.clay = new ItemClay();
|
||||
Botany.proxy.registerItem(Botany.clay);
|
||||
Botany.ceramic = new BlockCeramic();
|
||||
Botany.stained = new BlockStained();
|
||||
Botany.proxy.registerBlock(Botany.ceramic);
|
||||
Botany.proxy.registerItem(new ItemMetadata(Botany.ceramic).setRegistryName(Botany.ceramic.getRegistryName()));
|
||||
// BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(Botany.ceramic), new ItemMetadataRenderer());
|
||||
Botany.stained = new BlockStained();
|
||||
Botany.proxy.registerBlock(Botany.stained);
|
||||
Botany.proxy.registerItem(new ItemMetadata(Botany.stained).setRegistryName(Botany.stained.getRegistryName()));
|
||||
// BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(Botany.stained), new ItemMetadataRenderer());
|
||||
Botany.ceramicTile = new BlockCeramicPatterned();
|
||||
Botany.ceramicBrick = new BlockCeramicBrick();
|
||||
|
||||
Botany.proxy.registerBlock(Botany.ceramicTile);
|
||||
Botany.proxy.registerItem(new ItemMetadata(Botany.ceramicTile).setRegistryName(Botany.ceramicTile.getRegistryName()));
|
||||
Botany.ceramicBrick = new BlockCeramicBrick();
|
||||
Botany.proxy.registerBlock(Botany.ceramicBrick);
|
||||
Botany.proxy.registerItem(new ItemMetadata(Botany.ceramicBrick).setRegistryName(Botany.ceramicBrick.getRegistryName()));
|
||||
// BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(Botany.ceramicTile), new MultipassItemRenderer());
|
||||
|
||||
@@ -36,6 +36,10 @@ public class ModuleGenetics implements IInitializable {
|
||||
Botany.pollen = new ItemBotany("pollen", EnumFlowerStage.POLLEN, "pollen");
|
||||
Botany.seed = new ItemBotany("seed", EnumFlowerStage.SEED, "germling");
|
||||
Botany.database = new ItemDictionary();
|
||||
Botany.proxy.registerItem(Botany.flowerItem);
|
||||
Botany.proxy.registerItem(Botany.pollen);
|
||||
Botany.proxy.registerItem(Botany.seed);
|
||||
Botany.proxy.registerItem(Botany.database);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,6 +31,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
@@ -50,6 +51,10 @@ import java.util.List;
|
||||
@Mod(modid = Constants.CORE_MOD_ID, name = "Binnie Core", useMetadata = true, dependencies = "required-after:forestry")
|
||||
public final class BinnieCore extends AbstractMod {
|
||||
|
||||
public BinnieCore() {
|
||||
FluidRegistry.enableUniversalBucket();
|
||||
}
|
||||
|
||||
@Mod.Instance(Constants.CORE_MOD_ID)
|
||||
public static BinnieCore instance;
|
||||
@SidedProxy(clientSide = "binnie.core.proxy.BinnieProxyClient", serverSide = "binnie.core.proxy.BinnieProxyServer")
|
||||
|
||||
@@ -8,7 +8,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
|
||||
public enum FluidContainer {
|
||||
Bucket,
|
||||
Capsule,
|
||||
Refractory,
|
||||
Can,
|
||||
@@ -20,7 +19,7 @@ public enum FluidContainer {
|
||||
ItemFluidContainer item;
|
||||
|
||||
public int getMaxStackSize() {
|
||||
return (this == FluidContainer.Bucket) ? 1 : 16;
|
||||
return 16;
|
||||
}
|
||||
|
||||
// @SideOnly(Side.CLIENT)
|
||||
@@ -47,9 +46,6 @@ public enum FluidContainer {
|
||||
|
||||
public ItemStack getEmpty() {
|
||||
switch (this) {
|
||||
case Bucket: {
|
||||
return new ItemStack(Items.BUCKET, 1, 0);
|
||||
}
|
||||
case Can: {
|
||||
return Mods.Forestry.stack("canEmpty");
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ public class ManagerLiquid extends ManagerBase {
|
||||
final BinnieFluid bFluid = new BinnieFluid(fluid);
|
||||
FluidRegistry.registerFluid(bFluid);
|
||||
ItemFluidContainer.registerFluid(fluid, id);
|
||||
FluidRegistry.addBucketForFluid(bFluid);
|
||||
return bFluid;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package binnie.core.machines.power;
|
||||
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.machines.IMachine;
|
||||
import binnie.core.machines.MachineComponent;
|
||||
import binnie.core.machines.network.INetwork;
|
||||
@@ -73,13 +74,13 @@ public abstract class ComponentProcessIndefinate extends MachineComponent implem
|
||||
|
||||
@Override
|
||||
public ErrorState canWork() {
|
||||
return (this.actionCancelTask == 0.0f) ? null : new ErrorState("Task Cancelled", "Cancelled by Buildcraft Gate");
|
||||
return (this.actionCancelTask == 0.0f) ? null : new ErrorState(BinnieCore.proxy.localise("machine.errors.task.cancelled.desc"), BinnieCore.proxy.localise("machine.errors.task.cancelled.info"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ErrorState canProgress() {
|
||||
if (this.actionPauseProcess != 0.0f) {
|
||||
return new ErrorState("Process Paused", "Paused by Buildcraft Gate");
|
||||
return new ErrorState(BinnieCore.proxy.localise("machine.errors.task.process.paused.desc"), BinnieCore.proxy.localise("machine.errors.task.process.paused.info"));
|
||||
}
|
||||
return (this.getPower().getInterface().getEnergy(PowerSystem.RF) < this.getEnergyPerTick()) ? new ErrorState.InsufficientPower() : null;
|
||||
}
|
||||
@@ -102,7 +103,7 @@ public abstract class ComponentProcessIndefinate extends MachineComponent implem
|
||||
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
return "Processing";
|
||||
return BinnieCore.proxy.localise("machine.tooltips.processing");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package binnie.core.util;
|
||||
|
||||
public class Fluids {
|
||||
|
||||
public static final String BIO_ETHANOL = "bio.ethanol";
|
||||
}
|
||||
@@ -42,7 +42,7 @@ public class WindowSequencer extends WindowMachine {
|
||||
@Override
|
||||
public void recieveGuiNBT(final Side side, final EntityPlayer player, final String name, final NBTTagCompound action) {
|
||||
if (side == Side.CLIENT && name.equals("username")) {
|
||||
this.slotText.setValue("§8Genes will be sequenced by " + action.getString("username"));
|
||||
this.slotText.setValue(TextFormatting.DARK_GRAY + String.format(Genetics.proxy.localise("machine.machine.sequencer.texts.sequenced.by"), action.getString("username")));
|
||||
}
|
||||
super.recieveGuiNBT(side, player, name, action);
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public class WindowSequencer extends WindowMachine {
|
||||
slotTarget.assign(5);
|
||||
x = 34;
|
||||
y = 92;
|
||||
this.slotText = new ControlText(this, new IArea(0.0f, y, this.w(), 12.0f), TextFormatting.DARK_GRAY + Genetics.proxy.localise("machine.machine.sequencer.userless"), TextJustification.MiddleCenter);
|
||||
this.slotText = new ControlText(this, new IArea(0.0f, y, this.w(), 12.0f), TextFormatting.DARK_GRAY + Genetics.proxy.localise("machine.machine.sequencer.texts.userless"), TextJustification.MiddleCenter);
|
||||
y += 20;
|
||||
final ControlSlot slotDye = new ControlSlot(this, x, y);
|
||||
slotDye.assign(0);
|
||||
|
||||
@@ -74,7 +74,7 @@ public enum ExtraBeeLiquid implements ILiquidType {
|
||||
|
||||
@Override
|
||||
public boolean showInCreative(final FluidContainer container) {
|
||||
return container == FluidContainer.Bucket || container == FluidContainer.Can || container == FluidContainer.Capsule || container == FluidContainer.Refractory;
|
||||
return container == FluidContainer.Can || container == FluidContainer.Capsule || container == FluidContainer.Refractory;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -77,7 +77,7 @@ public enum ExtraTreeLiquid implements ILiquidType {
|
||||
|
||||
@Override
|
||||
public boolean showInCreative(final FluidContainer container) {
|
||||
return container == FluidContainer.Bucket || container == FluidContainer.Can || container == FluidContainer.Capsule;
|
||||
return container == FluidContainer.Can || container == FluidContainer.Capsule;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -141,7 +141,7 @@ public class ModuleItem implements IInitializable {
|
||||
for (final Item c2 : dbs) {
|
||||
for (final Item d : dbs) {
|
||||
if (a2 != b2 && a2 != c2 && a2 != d && b2 != c2 && b2 != d && c2 != d) {
|
||||
// GameRegistry.addShapedRecipe(new ItemStack(Genetics.registry), new Object[] { " b ", "fct", " l ", 'c', GeneticsItems.IntegratedCircuit.get(itemGenetics, 1), 'b', a2, 't', b2, 'f', c2, 'l', d });
|
||||
GameRegistry.addShapedRecipe(new ItemStack(Genetics.registry), new Object[] { " b ", "fct", " l ", 'c', GeneticsItems.IntegratedCircuit.get(itemGenetics, 1), 'b', a2, 't', b2, 'f', c2, 'l', d });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,10 +17,10 @@ public class AcclimatiserLogic extends ComponentProcessIndefinate {
|
||||
@Override
|
||||
public ErrorState canWork() {
|
||||
if (this.getUtil().getStack(Acclimatiser.SLOT_TARGET) == null) {
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.labMachine.acclimatiser.no.individual"), Acclimatiser.SLOT_TARGET);
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.labMachine.acclimatiser.errors.no.individual.desc"), Acclimatiser.SLOT_TARGET);
|
||||
}
|
||||
if (this.getUtil().getNonNullStacks(Acclimatiser.SLOT_ACCLIMATISER).isEmpty()) {
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.labMachine.acclimatiser.no.item"), Acclimatiser.SLOT_ACCLIMATISER);
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.labMachine.acclimatiser.errors.no.item.desc"), Acclimatiser.SLOT_ACCLIMATISER);
|
||||
}
|
||||
return super.canWork();
|
||||
}
|
||||
@@ -28,7 +28,7 @@ public class AcclimatiserLogic extends ComponentProcessIndefinate {
|
||||
@Override
|
||||
public ErrorState canProgress() {
|
||||
if (!Acclimatiser.canAcclimatise(this.getUtil().getStack(Acclimatiser.SLOT_TARGET), this.getUtil().getNonNullStacks(Acclimatiser.SLOT_ACCLIMATISER))) {
|
||||
return new ErrorState.InvalidItem(Genetics.proxy.localise("machine.labMachine.acclimatiser.can.not.acclimatise"), Acclimatiser.SLOT_TARGET);
|
||||
return new ErrorState.InvalidItem(Genetics.proxy.localise("machine.labMachine.acclimatiser.errors.can.not.acclimatise.desc"), Acclimatiser.SLOT_TARGET);
|
||||
}
|
||||
return super.canProgress();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package binnie.genetics.machine.acclimatiser;
|
||||
|
||||
import binnie.core.machines.inventory.SlotValidator;
|
||||
import binnie.genetics.Genetics;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ValidatorAcclimatiserItem extends SlotValidator {
|
||||
@@ -20,6 +21,6 @@ public class ValidatorAcclimatiserItem extends SlotValidator {
|
||||
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
return "Acclimatising Items";
|
||||
return Genetics.proxy.localise("machine.labMachine.acclimatiser.tooltips.slots.acclimatising");
|
||||
}
|
||||
}
|
||||
@@ -17,11 +17,11 @@ public class AnalyserLogic extends ComponentProcessSetCost implements IProcess {
|
||||
@Override
|
||||
public ErrorState canWork() {
|
||||
if (this.getUtil().isSlotEmpty(Analyser.SLOT_TARGET)) {
|
||||
return new ErrorState.NoItem("No item to analyse", Analyser.SLOT_TARGET);
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.labMachine.analyser.errors.no.item.desc"), Analyser.SLOT_TARGET);
|
||||
}
|
||||
final boolean analysed = Analyser.isAnalysed(this.getUtil().getStack(Analyser.SLOT_TARGET));
|
||||
if (analysed) {
|
||||
return new ErrorState.InvalidItem(Genetics.proxy.localise("machine.labMachine.analyser.already.analysed"), Genetics.proxy.localise("machine.labMachine.analyser.already.analysed.info"), Analyser.SLOT_TARGET);
|
||||
return new ErrorState.InvalidItem(Genetics.proxy.localise("machine.labMachine.analyser.errors.already.analysed.desc"), Genetics.proxy.localise("machine.labMachine.analyser.errors.already.analysed.info"), Analyser.SLOT_TARGET);
|
||||
}
|
||||
return super.canWork();
|
||||
}
|
||||
@@ -29,7 +29,7 @@ public class AnalyserLogic extends ComponentProcessSetCost implements IProcess {
|
||||
@Override
|
||||
public ErrorState canProgress() {
|
||||
if (this.getUtil().getSlotCharge(Analyser.SLOT_DYE) == 0.0f) {
|
||||
return new ErrorState.Item(Genetics.proxy.localise("machine.labMachine.analyser.insufficient.dye"), Genetics.proxy.localise("machine.labMachine.analyser.insufficient.dye.info"), new int[]{13});
|
||||
return new ErrorState.Item(Genetics.proxy.localise("machine.labMachine.analyser.errors.insufficient.dye.desc"), Genetics.proxy.localise("machine.labMachine.analyser.errors.insufficient.dye.info"), new int[]{13});
|
||||
}
|
||||
return super.canProgress();
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class PackageAnalyser extends GeneticMachine.PackageGeneticBase implement
|
||||
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
return "DNA Dye";
|
||||
return GeneticsItems.DNADye.get(1).getDisplayName();
|
||||
}
|
||||
});
|
||||
for (InventorySlot slot : inventory.addSlotArray(Analyser.SLOT_FINISHED, "output")) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package binnie.genetics.machine.analyser;
|
||||
|
||||
import binnie.core.machines.inventory.SlotValidator;
|
||||
import binnie.genetics.Genetics;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class SlotValidatorUnanalysed extends SlotValidator {
|
||||
@@ -15,6 +16,6 @@ public class SlotValidatorUnanalysed extends SlotValidator {
|
||||
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
return "Unanalysed Item";
|
||||
return Genetics.proxy.localise("machine.labMachine.analyser.tooltips.slots.unanalysed");
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public class GenepoolLogic extends ComponentProcessSetCost implements IProcess {
|
||||
@Override
|
||||
public ErrorState canWork() {
|
||||
if (this.getUtil().isSlotEmpty(Genepool.SLOT_BEE)) {
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.labMachine.genepool.no.individual"), Genepool.SLOT_BEE);
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.errors.no.individual.desc"), Genepool.SLOT_BEE);
|
||||
}
|
||||
return super.canWork();
|
||||
}
|
||||
@@ -35,13 +35,13 @@ public class GenepoolLogic extends ComponentProcessSetCost implements IProcess {
|
||||
@Override
|
||||
public ErrorState canProgress() {
|
||||
if (!this.getUtil().spaceInTank(Genepool.TANK_DNA, this.getDNAAmount(this.getUtil().getStack(0)))) {
|
||||
return new ErrorState.NoSpace(Genetics.proxy.localise("machine.labMachine.genepool.no.room"), new int[]{0});
|
||||
return new ErrorState.NoSpace(Genetics.proxy.localise("machine.errors.tanks.no.room.desc"), new int[]{0});
|
||||
}
|
||||
if (!this.getUtil().liquidInTank(Genepool.TANK_ETHANOL, 1)) {
|
||||
return new ErrorState.InsufficientLiquid(Genetics.proxy.localise("machine.labMachine.genepool.not.enough.ethanol"), Genepool.TANK_ETHANOL);
|
||||
return new ErrorState.InsufficientLiquid(Genetics.proxy.localise("machine.labMachine.genepool.errors.not.enough.ethanol.desc"), Genepool.TANK_ETHANOL);
|
||||
}
|
||||
if (this.getUtil().getSlotCharge(Genepool.SLOT_ENZYME) == 0.0f) {
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.labMachine.genepool.insufficient.enzyme"), Genepool.SLOT_ENZYME);
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.labMachine.genepool.errors.insufficient.enzyme.desc"), Genepool.SLOT_ENZYME);
|
||||
}
|
||||
return super.canProgress();
|
||||
}
|
||||
@@ -75,7 +75,7 @@ public class GenepoolLogic extends ComponentProcessSetCost implements IProcess {
|
||||
protected void onTickTask() {
|
||||
this.ethanolDrain += this.getDNAAmount(this.getUtil().getStack(Genepool.SLOT_BEE)) * 1.2f * this.getProgressPerTick() / 100.0f;
|
||||
if (this.ethanolDrain >= 1.0f) {
|
||||
this.getUtil().drainTank(1, 1);
|
||||
this.getUtil().drainTank(Genepool.TANK_ETHANOL, 1);
|
||||
--this.ethanolDrain;
|
||||
}
|
||||
this.getMachine().getInterface(IChargedSlots.class).alterCharge(Genepool.SLOT_ENZYME, -this.enzymePerProcess * this.getProgressPerTick() / 100.0f);
|
||||
|
||||
@@ -19,6 +19,7 @@ import binnie.genetics.machine.ComponentGeneticGUI;
|
||||
import binnie.genetics.machine.GeneticMachine;
|
||||
import binnie.genetics.machine.ModuleMachine;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class PackageGenepool extends GeneticMachine.PackageGeneticBase implements IMachineInformation {
|
||||
@@ -49,7 +50,7 @@ public class PackageGenepool extends GeneticMachine.PackageGeneticBase implement
|
||||
tankEthanol.setValidator(new TankValidator() {
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
return "Ethanol";
|
||||
return FluidRegistry.getFluidStack("bio.ethanol", 1).getLocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -27,7 +27,7 @@ public class IncubatorLogic extends ComponentProcessIndefinate implements IProce
|
||||
@Override
|
||||
public ErrorState canWork() {
|
||||
if (this.recipe == null) {
|
||||
return new ErrorState(Genetics.proxy.localise("machine.labMachine.incubator.no.recipe"), Genetics.proxy.localise("machine.labMachine.incubator.no.recipe.info"));
|
||||
return new ErrorState(Genetics.proxy.localise("machine.errors.no.recipe.desc"), Genetics.proxy.localise("machine.errors.no.recipe.info"));
|
||||
}
|
||||
return super.canWork();
|
||||
}
|
||||
@@ -36,10 +36,10 @@ public class IncubatorLogic extends ComponentProcessIndefinate implements IProce
|
||||
public ErrorState canProgress() {
|
||||
if (this.recipe != null) {
|
||||
if (!this.recipe.isInputLiquidSufficient(this.getUtil().getFluid(Incubator.TANK_INPUT))) {
|
||||
return new ErrorState.InsufficientLiquid(Genetics.proxy.localise("machine.labMachine.incubator.no.liquid"), Incubator.TANK_INPUT);
|
||||
return new ErrorState.InsufficientLiquid(Genetics.proxy.localise("machine.labMachine.incubator.errors.no.liquid.desc"), Incubator.TANK_INPUT);
|
||||
}
|
||||
if (!this.roomForOutput) {
|
||||
return new ErrorState.TankSpace(Genetics.proxy.localise("machine.labMachine.incubator.no.room"), Incubator.TANK_OUTPUT);
|
||||
return new ErrorState.TankSpace(Genetics.proxy.localise("machine.labMachine.incubator.errors.no.room.desc"), Incubator.TANK_OUTPUT);
|
||||
}
|
||||
}
|
||||
return super.canProgress();
|
||||
|
||||
@@ -37,8 +37,12 @@ public class InoculatorLogic extends ComponentProcessSetCost implements IProcess
|
||||
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
final int n = this.getNumberOfGenes();
|
||||
return "Inoculating with " + n + " gene" + ((n > 1) ? "s" : "");
|
||||
int n = this.getNumberOfGenes();
|
||||
if(n > 1){
|
||||
return String.format(Genetics.proxy.localise("genetics.machine.machine.inoculator.tooltips.logic.genes"), Integer.valueOf(n).toString());
|
||||
}else{
|
||||
return Genetics.proxy.localise("genetics.machine.machine.inoculator.tooltips.logic.gene");
|
||||
}
|
||||
}
|
||||
|
||||
public InoculatorLogic(final Machine machine) {
|
||||
@@ -49,17 +53,17 @@ public class InoculatorLogic extends ComponentProcessSetCost implements IProcess
|
||||
@Override
|
||||
public ErrorState canWork() {
|
||||
if (this.getUtil().isSlotEmpty(Inoculator.SLOT_TARGET)) {
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.machine.inoculator.no.individual"), Inoculator.SLOT_TARGET);
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.machine.inoculator.errors.no.individual.desc"), Inoculator.SLOT_TARGET);
|
||||
}
|
||||
if (this.getUtil().isSlotEmpty(Inoculator.SLOT_SERUM_VIAL)) {
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.machine.inoculator.no.serum"), Inoculator.SLOT_SERUM_VIAL);
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.errors.no.serum.desc"), Inoculator.SLOT_SERUM_VIAL);
|
||||
}
|
||||
final ErrorState state = this.isValidSerum();
|
||||
if (state != null) {
|
||||
return state;
|
||||
}
|
||||
if (this.getUtil().getStack(0) != null && Engineering.getCharges(this.getUtil().getStack(Inoculator.SLOT_SERUM_VIAL)) == 0) {
|
||||
return new ErrorState(Genetics.proxy.localise("machine.machine.inoculator.empty.serum"), Genetics.proxy.localise("machine.machine.inoculator.empty.serum.info"));
|
||||
if (this.getUtil().getStack(Inoculator.SLOT_SERUM_VIAL) != null && Engineering.getCharges(this.getUtil().getStack(Inoculator.SLOT_SERUM_VIAL)) == 0) {
|
||||
return new ErrorState(Genetics.proxy.localise("machine.errors.empty.serum.desc"), Genetics.proxy.localise("machine.errors.empty.serum.info"));
|
||||
}
|
||||
return super.canWork();
|
||||
}
|
||||
@@ -69,10 +73,10 @@ public class InoculatorLogic extends ComponentProcessSetCost implements IProcess
|
||||
final ItemStack target = this.getUtil().getStack(Inoculator.SLOT_TARGET);
|
||||
final IGene[] genes = Engineering.getGenes(serum);
|
||||
if (genes.length == 0) {
|
||||
return new ErrorState(Genetics.proxy.localise("machine.machine.inoculator.invalid.serum"), Genetics.proxy.localise("machine.machine.inoculator.invalid.serum.no.genes"));
|
||||
return new ErrorState(Genetics.proxy.localise("machine.errors.invalid.serum.desc"), Genetics.proxy.localise("machine.errors.invalid.serum.no.genes.info"));
|
||||
}
|
||||
if (!genes[0].getSpeciesRoot().isMember(target)) {
|
||||
return new ErrorState(Genetics.proxy.localise("machine.machine.inoculator.invalid.serum"), Genetics.proxy.localise("machine.machine.inoculator.invalid.serum.mismatch"));
|
||||
return new ErrorState(Genetics.proxy.localise("machine.errors.invalid.serum.desc"), Genetics.proxy.localise("machine.errors.invalid.serum.mismatch.info"));
|
||||
}
|
||||
final IIndividual individual = genes[0].getSpeciesRoot().getMember(target);
|
||||
boolean hasAll = true;
|
||||
@@ -84,7 +88,7 @@ public class InoculatorLogic extends ComponentProcessSetCost implements IProcess
|
||||
}
|
||||
}
|
||||
if (hasAll) {
|
||||
return new ErrorState("Defunct Serum", "Individual already possesses this allele");
|
||||
return new ErrorState(Genetics.proxy.localise("genetics.machine.errors.defunct.serum.desc"), Genetics.proxy.localise("genetics.machine.errors.defunct.serum.info"));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -30,13 +30,13 @@ public class IsolatorLogic extends ComponentProcessSetCost implements IProcess {
|
||||
@Override
|
||||
public ErrorState canWork() {
|
||||
if (this.getUtil().isSlotEmpty(Isolator.SLOT_TARGET)) {
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.machine.isolator.no.individual"), Isolator.SLOT_TARGET);
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.machine.isolator.errors.no.individual.desc"), Isolator.SLOT_TARGET);
|
||||
}
|
||||
if (!this.getUtil().isSlotEmpty(Isolator.SLOT_RESULUT)) {
|
||||
return new ErrorState.NoSpace(Genetics.proxy.localise("machine.machine.isolator.no.room"), Isolator.SLOT_FINISHED);
|
||||
return new ErrorState.NoSpace(Genetics.proxy.localise("machine.machine.isolator.errors.no.room.desc"), Isolator.SLOT_FINISHED);
|
||||
}
|
||||
if (this.getUtil().isSlotEmpty(Isolator.SLOT_SEQUENCER_VIAL)) {
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.machine.isolator.no.empty.sequencer"), Isolator.SLOT_SEQUENCER_VIAL);
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.machine.isolator.errors.no.empty.sequencer.desc"), Isolator.SLOT_SEQUENCER_VIAL);
|
||||
}
|
||||
return super.canWork();
|
||||
}
|
||||
@@ -44,10 +44,10 @@ public class IsolatorLogic extends ComponentProcessSetCost implements IProcess {
|
||||
@Override
|
||||
public ErrorState canProgress() {
|
||||
if (!this.getUtil().liquidInTank(Isolator.TANK_ETHANOL, (int) this.ethanolPerProcess)) {
|
||||
return new ErrorState.InsufficientLiquid(Genetics.proxy.localise("machine.machine.isolator.insufficient.ethanol"), Isolator.TANK_ETHANOL);
|
||||
return new ErrorState.InsufficientLiquid(Genetics.proxy.localise("machine.machine.isolator.errors.insufficient.ethanol.desc"), Isolator.TANK_ETHANOL);
|
||||
}
|
||||
if (this.getUtil().getSlotCharge(Isolator.SLOT_ENZYME) == 0.0f) {
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.machine.isolator.no.enzyme"), Isolator.SLOT_ENZYME);
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.errors.no.enzyme.desc"), Isolator.SLOT_ENZYME);
|
||||
}
|
||||
return super.canProgress();
|
||||
}
|
||||
@@ -56,11 +56,11 @@ public class IsolatorLogic extends ComponentProcessSetCost implements IProcess {
|
||||
protected void onFinishTask() {
|
||||
super.onFinishTask();
|
||||
final Random rand = this.getMachine().getWorld().rand;
|
||||
final ISpeciesRoot root = AlleleManager.alleleRegistry.getSpeciesRoot(this.getUtil().getStack(5));
|
||||
final ISpeciesRoot root = AlleleManager.alleleRegistry.getSpeciesRoot(this.getUtil().getStack(Isolator.SLOT_TARGET));
|
||||
if (root == null) {
|
||||
return;
|
||||
}
|
||||
final IIndividual individual = root.getMember(this.getUtil().getStack(5));
|
||||
final IIndividual individual = root.getMember(this.getUtil().getStack(Isolator.SLOT_TARGET));
|
||||
if (individual == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import binnie.core.machines.inventory.InventorySlot;
|
||||
import binnie.core.machines.inventory.SlotValidator;
|
||||
import binnie.core.machines.inventory.TankValidator;
|
||||
import binnie.core.machines.power.ComponentPowerReceptor;
|
||||
import binnie.core.util.Fluids;
|
||||
import binnie.craftgui.minecraft.IMachineInformation;
|
||||
import binnie.genetics.core.GeneticsGUI;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
@@ -20,6 +21,7 @@ import binnie.genetics.machine.ComponentGeneticGUI;
|
||||
import binnie.genetics.machine.GeneticMachine;
|
||||
import binnie.genetics.machine.ModuleMachine;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
public class PackageIsolator extends GeneticMachine.PackageGeneticBase implements IMachineInformation {
|
||||
@@ -56,12 +58,12 @@ public class PackageIsolator extends GeneticMachine.PackageGeneticBase implement
|
||||
tanks.addTank(Isolator.TANK_ETHANOL, "input", 1000).setValidator(new TankValidator() {
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
return "Ethanol";
|
||||
return FluidRegistry.getFluidStack(Fluids.BIO_ETHANOL, 1).getLocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(final FluidStack stack) {
|
||||
return Objects.equals(stack.getFluid().getName(), "bioethanol");
|
||||
return Objects.equals(stack.getFluid().getName(), Fluids.BIO_ETHANOL);
|
||||
}
|
||||
});
|
||||
final ComponentChargedSlots chargedSlots = new ComponentChargedSlots(machine);
|
||||
|
||||
@@ -11,7 +11,6 @@ import binnie.core.machines.inventory.SlotValidator;
|
||||
import binnie.core.machines.inventory.Validator;
|
||||
import binnie.core.machines.power.ComponentPowerReceptor;
|
||||
import binnie.craftgui.minecraft.IMachineInformation;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.core.GeneticsGUI;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.item.GeneticLiquid;
|
||||
@@ -66,7 +65,7 @@ public class PackagePolymeriser extends GeneticMachine.PackageGeneticBase implem
|
||||
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
return Genetics.proxy.localise("machine.machine.polymeriser.tank.bacteria.info");
|
||||
return GeneticLiquid.BacteriaPoly.get(1).getLocalizedName();
|
||||
}
|
||||
});
|
||||
tank.addTank(Polymeriser.TANK_DNA, "input", 1000).setValidator(new Validator<FluidStack>() {
|
||||
@@ -77,7 +76,7 @@ public class PackagePolymeriser extends GeneticMachine.PackageGeneticBase implem
|
||||
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
return Genetics.proxy.localise("machine.machine.polymeriser.tank.dna.info");
|
||||
return GeneticLiquid.RawDNA.get(1).getLocalizedName();
|
||||
}
|
||||
});
|
||||
new ComponentChargedSlots(machine).addCharge(1);
|
||||
|
||||
@@ -65,19 +65,19 @@ public class PolymeriserLogic extends ComponentProcessSetCost implements IProces
|
||||
public String getTooltip() {
|
||||
int n = this.getNumberOfGenes();
|
||||
if(n > 1){
|
||||
return Genetics.proxy.localise("machine.machine.polymeriser.logic.genes").replaceAll("%GENES", Integer.valueOf(n).toString());
|
||||
return String.format(Genetics.proxy.localise("genetics.machine.machine.polymeriser.tooltips.logic.genes"), Integer.valueOf(n).toString());
|
||||
}else{
|
||||
return Genetics.proxy.localise("machine.machine.polymeriser.logic.gene");
|
||||
return Genetics.proxy.localise("genetics.machine.machine.polymeriser.tooltips.logic.gene");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ErrorState canWork() {
|
||||
if (this.getUtil().isSlotEmpty(Polymeriser.SLOT_SERUM)) {
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.machine.polymeriser.logic.item.no"), Polymeriser.SLOT_SERUM);
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.machine.polymeriser.errors.item.no"), Polymeriser.SLOT_SERUM);
|
||||
}
|
||||
if (!this.getUtil().getStack(Polymeriser.SLOT_SERUM).isItemDamaged()) {
|
||||
return new ErrorState.InvalidItem(Genetics.proxy.localise("machine.machine.polymeriser.logic.item.filled"), Polymeriser.SLOT_SERUM);
|
||||
return new ErrorState.InvalidItem(Genetics.proxy.localise("machine.machine.polymeriser.errors.item.filled"), Polymeriser.SLOT_SERUM);
|
||||
}
|
||||
return super.canWork();
|
||||
}
|
||||
@@ -85,10 +85,10 @@ public class PolymeriserLogic extends ComponentProcessSetCost implements IProces
|
||||
@Override
|
||||
public ErrorState canProgress() {
|
||||
if (this.getUtil().getFluid(Polymeriser.TANK_BACTERIA) == null) {
|
||||
return new ErrorState.InsufficientLiquid(Genetics.proxy.localise("machine.machine.polymeriser.logic.insufficient.bacteria"), Polymeriser.TANK_BACTERIA);
|
||||
return new ErrorState.InsufficientLiquid(Genetics.proxy.localise("machine.machine.polymeriser.errors.insufficient.bacteria"), Polymeriser.TANK_BACTERIA);
|
||||
}
|
||||
if (this.getUtil().getFluid(Polymeriser.TANK_DNA) == null) {
|
||||
return new ErrorState.InsufficientLiquid(Genetics.proxy.localise("machine.machine.polymeriser.logic.insufficient.dna"), Polymeriser.TANK_DNA);
|
||||
return new ErrorState.InsufficientLiquid(Genetics.proxy.localise("machine.machine.polymeriser.errors.insufficient.dna"), Polymeriser.TANK_DNA);
|
||||
}
|
||||
return super.canProgress();
|
||||
}
|
||||
|
||||
@@ -18,6 +18,6 @@ public class SlotValidatorUnfilledSerum extends SlotValidator {
|
||||
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
return Genetics.proxy.localise("machine.machine.polymeriser.slot.unfilled");
|
||||
return Genetics.proxy.localise("machine.machine.polymeriser.tooltips.slots.unfilled");
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ public class SequencerLogic extends ComponentProcess implements IProcess {
|
||||
@Override
|
||||
public ErrorState canWork() {
|
||||
if (this.getUtil().isSlotEmpty(Sequencer.SLOT_TARGET)) {
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.machine.sequencer.no.dna"), 5);
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.machine.sequencer.errors.no.dna"), 5);
|
||||
}
|
||||
return super.canWork();
|
||||
}
|
||||
@@ -45,13 +45,13 @@ public class SequencerLogic extends ComponentProcess implements IProcess {
|
||||
@Override
|
||||
public ErrorState canProgress() {
|
||||
if (this.getMachine().getOwner() == null) {
|
||||
return new ErrorState(Genetics.proxy.localise("machine.machine.sequencer.no.owner"), Genetics.proxy.localise("machine.machine.sequencer.no.owner.info"));
|
||||
return new ErrorState(Genetics.proxy.localise("machine.errors.no.owner.desc"), Genetics.proxy.localise("machine.errors.no.owner.info"));
|
||||
}
|
||||
if (this.getUtil().getSlotCharge(Sequencer.SLOT_DYE) == 0.0f) {
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.machine.sequencer.insufficient.dye"), Sequencer.SLOT_DYE);
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.machine.sequencer.errors.insufficient.dye"), Sequencer.SLOT_DYE);
|
||||
}
|
||||
if (this.getUtil().getStack(Sequencer.SLOT_DRONE) != null && this.getUtil().getStack(Sequencer.SLOT_DRONE).stackSize >= 64) {
|
||||
return new ErrorState.NoSpace(Genetics.proxy.localise("machine.machine.sequencer.no.space"), new int[]{Sequencer.SLOT_DRONE});
|
||||
return new ErrorState.NoSpace(Genetics.proxy.localise("machine.machine.sequencer.errors.no.space"), new int[]{Sequencer.SLOT_DRONE});
|
||||
}
|
||||
return super.canProgress();
|
||||
}
|
||||
|
||||
@@ -22,6 +22,6 @@ public class SlotValidatorUnsequenced extends SlotValidator {
|
||||
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
return "Unsequenced DNA";
|
||||
return Genetics.proxy.localise("machine.machine.sequencer.tooltips.slots.unsequenced.dna");
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import binnie.core.machines.inventory.InventorySlot;
|
||||
import binnie.core.machines.inventory.SlotValidator;
|
||||
import binnie.core.machines.power.ComponentPowerReceptor;
|
||||
import binnie.craftgui.minecraft.IMachineInformation;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.api.IItemSerum;
|
||||
import binnie.genetics.core.GeneticsGUI;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
@@ -38,7 +39,7 @@ public class PackageSplicer extends AdvGeneticMachine.PackageAdvGeneticBase impl
|
||||
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
return "Serum Vials & Arrays";
|
||||
return Genetics.proxy.localise("genetics.machine.advMachine.splicer.tooltips.slots.serum");
|
||||
}
|
||||
};
|
||||
slotSerumVial.setValidator(serumValid);
|
||||
@@ -64,8 +65,8 @@ public class PackageSplicer extends AdvGeneticMachine.PackageAdvGeneticBase impl
|
||||
slot.setValidator(new ValidatorIndividualInoculate());
|
||||
}
|
||||
final ComponentInventoryTransfer transfer = new ComponentInventoryTransfer(machine);
|
||||
transfer.addRestock(Splicer.SLOT_RESERVE, 9, 1);
|
||||
transfer.addRestock(Splicer.SLOT_SERUM_RESERVE, 0);
|
||||
transfer.addRestock(Splicer.SLOT_RESERVE, Splicer.SLOT_TARGET, 1);
|
||||
transfer.addRestock(Splicer.SLOT_SERUM_RESERVE, Splicer.SLOT_SERUM_VIAL);
|
||||
transfer.addStorage(Splicer.SLOT_SERUM_VIAL, Splicer.SLOT_SERUM_EXPENDED, new ComponentInventoryTransfer.Condition() {
|
||||
@Override
|
||||
public boolean fufilled(final ItemStack stack) {
|
||||
@@ -75,7 +76,7 @@ public class PackageSplicer extends AdvGeneticMachine.PackageAdvGeneticBase impl
|
||||
transfer.addStorage(Splicer.SLOT_TARGET, Splicer.SLOT_FINISHED, new ComponentInventoryTransfer.Condition() {
|
||||
@Override
|
||||
public boolean fufilled(final ItemStack stack) {
|
||||
return stack != null && this.transfer.getMachine().getMachineUtil().getStack(0) != null && this.transfer.getMachine().getInterface(SplicerLogic.class).isValidSerum() != null;
|
||||
return stack != null && this.transfer.getMachine().getMachineUtil().getStack(Splicer.SLOT_SERUM_VIAL) != null && this.transfer.getMachine().getInterface(SplicerLogic.class).isValidSerum() != null;
|
||||
}
|
||||
});
|
||||
new ComponentPowerReceptor(machine, 20000);
|
||||
|
||||
@@ -4,6 +4,7 @@ import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.power.ComponentProcessSetCost;
|
||||
import binnie.core.machines.power.ErrorState;
|
||||
import binnie.core.machines.power.IProcess;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.api.IGene;
|
||||
import binnie.genetics.api.IItemSerum;
|
||||
import binnie.genetics.genetics.Engineering;
|
||||
@@ -88,31 +89,31 @@ public class SplicerLogic extends ComponentProcessSetCost implements IProcess {
|
||||
|
||||
@Override
|
||||
public ErrorState canWork() {
|
||||
if (this.getUtil().isSlotEmpty(9)) {
|
||||
return new ErrorState.NoItem("No Individual to Splice", 9);
|
||||
if (this.getUtil().isSlotEmpty(Splicer.SLOT_TARGET)) {
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.advMachine.splicer.errors.no.individual.desc"), Splicer.SLOT_TARGET);
|
||||
}
|
||||
if (this.getUtil().isSlotEmpty(0)) {
|
||||
return new ErrorState.NoItem("No Serum", 0);
|
||||
if (this.getUtil().isSlotEmpty(Splicer.SLOT_SERUM_VIAL)) {
|
||||
return new ErrorState.NoItem(Genetics.proxy.localise("machine.errors.no.serum.desc"), Splicer.SLOT_SERUM_VIAL);
|
||||
}
|
||||
final ErrorState state = this.isValidSerum();
|
||||
if (state != null) {
|
||||
return state;
|
||||
}
|
||||
if (this.getUtil().getStack(0) != null && Engineering.getCharges(this.getUtil().getStack(0)) == 0) {
|
||||
return new ErrorState("Empty Serum", "Serum is empty");
|
||||
if (this.getUtil().getStack(Splicer.SLOT_SERUM_VIAL) != null && Engineering.getCharges(this.getUtil().getStack(Splicer.SLOT_SERUM_VIAL)) == 0) {
|
||||
return new ErrorState(Genetics.proxy.localise("machine.errors.empty.serum.desc"), Genetics.proxy.localise("machine.errors.empty.serum.info"));
|
||||
}
|
||||
return super.canWork();
|
||||
}
|
||||
|
||||
public ErrorState isValidSerum() {
|
||||
final ItemStack serum = this.getUtil().getStack(0);
|
||||
final ItemStack target = this.getUtil().getStack(9);
|
||||
final ItemStack serum = this.getUtil().getStack(Splicer.SLOT_SERUM_VIAL);
|
||||
final ItemStack target = this.getUtil().getStack(Splicer.SLOT_TARGET);
|
||||
final IGene[] genes = Engineering.getGenes(serum);
|
||||
if (genes.length == 0) {
|
||||
return new ErrorState("Invalid Serum", "Serum does not hold any genes");
|
||||
return new ErrorState(Genetics.proxy.localise("machine.errors.invalid.serum.desc"), Genetics.proxy.localise("machine.errors.invalid.serum.no.genes.info"));
|
||||
}
|
||||
if (!genes[0].getSpeciesRoot().isMember(target)) {
|
||||
return new ErrorState("Invalid Serum", "Mismatch of Serum Type and Target");
|
||||
return new ErrorState(Genetics.proxy.localise("machine.errors.invalid.serum.desc"), Genetics.proxy.localise("machine.errors.invalid.serum.mismatch.info"));
|
||||
}
|
||||
final IIndividual individual = genes[0].getSpeciesRoot().getMember(target);
|
||||
boolean hasAll = true;
|
||||
@@ -124,7 +125,7 @@ public class SplicerLogic extends ComponentProcessSetCost implements IProcess {
|
||||
}
|
||||
}
|
||||
if (hasAll) {
|
||||
return new ErrorState("Defunct Serum", "Individual already possesses this allele");
|
||||
return new ErrorState(Genetics.proxy.localise("genetics.machine.errors.defunct.serum.desc"), Genetics.proxy.localise("machine.errors.defunct.serum.info"));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -137,8 +138,8 @@ public class SplicerLogic extends ComponentProcessSetCost implements IProcess {
|
||||
@Override
|
||||
protected void onFinishTask() {
|
||||
super.onFinishTask();
|
||||
final ItemStack serum = this.getUtil().getStack(0);
|
||||
final ItemStack target = this.getUtil().getStack(9);
|
||||
final ItemStack serum = this.getUtil().getStack(Splicer.SLOT_SERUM_VIAL);
|
||||
final ItemStack target = this.getUtil().getStack(Splicer.SLOT_TARGET);
|
||||
final IIndividual ind = AlleleManager.alleleRegistry.getIndividual(target);
|
||||
if (!ind.isAnalyzed()) {
|
||||
ind.analyze();
|
||||
@@ -152,7 +153,7 @@ public class SplicerLogic extends ComponentProcessSetCost implements IProcess {
|
||||
Splicer.setGene(gene, target, 0);
|
||||
Splicer.setGene(gene, target, 1);
|
||||
}
|
||||
this.getUtil().damageItem(0, 1);
|
||||
this.getUtil().damageItem(Splicer.SLOT_SERUM_VIAL, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,6 +2,7 @@ package binnie.genetics.machine.splicer;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.core.machines.inventory.SlotValidator;
|
||||
import binnie.genetics.Genetics;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -19,6 +20,6 @@ public class ValidatorIndividualInoculate extends SlotValidator {
|
||||
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
return "Splicable Individual";
|
||||
return Genetics.proxy.localise("machine.advMachine.splicer.tooltips.slots.individual");
|
||||
}
|
||||
}
|
||||
@@ -204,6 +204,13 @@ binniecore.machine.storage.compartmentCopper=Copper Compartment
|
||||
binniecore.machine.storage.compartmentBronze=Bronze Compartment
|
||||
binniecore.machine.storage.compartmentGold=Gold Compartment
|
||||
|
||||
binniecore.machine.tooltips.processing=Processing
|
||||
|
||||
binniecore.machine.errors.task.cancelled.desc=Task Cancelled
|
||||
binniecore.machine.errors.task.cancelled.info=Cancelled by Buildcraft Gate
|
||||
binniecore.machine.errors.task.process.paused.desc=Process Paused
|
||||
binniecore.machine.errors.task.process.paused.info=Paused by Buildcraft Gate
|
||||
|
||||
< %1$s is the name of the pattern >
|
||||
binniecore.gui.designer.pattern=%1$s Pattern
|
||||
|
||||
|
||||
@@ -1,74 +1,86 @@
|
||||
##################################################
|
||||
## Machines
|
||||
|
||||
genetics.machine.errors.no.owner.desc=No Owner
|
||||
genetics.machine.errors.no.owner.info=Replace this block to claim this machine
|
||||
genetics.machine.errors.no.serum.desc=No Serum
|
||||
genetics.machine.errors.no.enzyme.desc=No enzyme
|
||||
genetics.machine.errors.no.recipe.desc=No Recipe
|
||||
genetics.machine.errors.no.recipe.info=There is no valid recipe
|
||||
genetics.machine.errors.no.individual.desc=No Individual
|
||||
genetics.machine.errors.empty.serum.desc=Empty Serum
|
||||
genetics.machine.errors.empty.serum.info=Serum is empty
|
||||
genetics.machine.errors.invalid.serum.desc=Invalid Serum
|
||||
genetics.machine.errors.invalid.serum.mismatch.info=Mismatch of Serum Type and Target
|
||||
genetics.machine.errors.invalid.serum.no.genes.info=Serum does not hold any genes
|
||||
genetics.machine.errors.defunct.serum.desc=Defunct Serum
|
||||
genetics.machine.errors.defunct.serum.info=Individual already possesses this allele
|
||||
genetics.machine.errors.tanks.no.room.desc=Not enough room in Tank
|
||||
|
||||
genetics.machine.machine.isolator=Isolator
|
||||
genetics.machine.machine.isolator.info=The Isolator takes a random allele from a bee, tree or other individual and copies it into an empty sequence vial. This requires the use of ethanol as a solvent and an enzyme to cut up the DNA. The unsequenced serums can then be amplified in a Polymeriser and sequenced in a Sequencer.
|
||||
genetics.machine.machine.isolator.no.individual=No individual to isolate
|
||||
genetics.machine.machine.isolator.no.room=No room for DNA sequences
|
||||
genetics.machine.machine.isolator.no.empty.sequencer=No empty sequencer vials
|
||||
genetics.machine.machine.isolator.insufficient.ethanol=Insufficient ethanol
|
||||
genetics.machine.machine.isolator.no.enzyme=No enzyme
|
||||
genetics.machine.machine.isolator.errors.no.individual.desc=No individual to isolate
|
||||
genetics.machine.machine.isolator.errors.no.room.desc=No room for DNA sequences
|
||||
genetics.machine.machine.isolator.errors.no.empty.sequencer.desc=No empty sequencer vials
|
||||
genetics.machine.machine.isolator.errors.insufficient.ethanol.desc=Insufficient ethanol
|
||||
|
||||
genetics.machine.machine.sequencer=Sequencer
|
||||
genetics.machine.machine.sequencer.info=The Sequencer takes unsequenced serums and determines which allele is present in them. This process is slow and requires the use of fluorescent dye.
|
||||
genetics.machine.machine.sequencer.no.owner=No Owner
|
||||
genetics.machine.machine.sequencer.no.owner.info=Replace this block to claim this machine
|
||||
genetics.machine.machine.sequencer.insufficient.dye=Insufficient Dye
|
||||
genetics.machine.machine.sequencer.no.space=No space for empty sequences
|
||||
genetics.machine.machine.sequencer.no.dna=No DNA sequence
|
||||
genetics.machine.machine.sequencer.userless=Userless. Will not save sequences
|
||||
genetics.machine.machine.sequencer.errors.insufficient.dye=Insufficient Dye
|
||||
genetics.machine.machine.sequencer.errors.no.space=No space for empty sequences
|
||||
genetics.machine.machine.sequencer.errors.no.dna=No DNA sequence
|
||||
genetics.machine.machine.sequencer.texts.userless=Userless. Will not save sequences
|
||||
genetics.machine.machine.sequencer.texts.sequenced.by=Genes will be sequenced by %s
|
||||
genetics.machine.machine.sequencer.tooltips.slots.unsequenced.dna=Unsequenced DNA
|
||||
|
||||
genetics.machine.machine.polymeriser=Polymeriser
|
||||
genetics.machine.machine.polymeriser.info=The Polymeriser fills empty serums with Raw DNA and replicating bacteria. This process can be accelerated using gold nuggets.
|
||||
genetics.machine.machine.polymeriser.logic.gene=Replicating 1 genes
|
||||
genetics.machine.machine.polymeriser.logic.genes=Replicating %GENES geness
|
||||
genetics.machine.machine.polymeriser.logic.item.no=No item to replicate
|
||||
genetics.machine.machine.polymeriser.logic.item.filled=Item filled
|
||||
genetics.machine.machine.polymeriser.logic.insufficient.bacteria=Insufficient Bacteria
|
||||
genetics.machine.machine.polymeriser.logic.insufficient.dna=Insufficient DNA
|
||||
genetics.machine.machine.polymeriser.slot.unfilled=Unfilled Serum
|
||||
genetics.machine.machine.polymeriser.tank.bacteria.info=Polymerising Bacteria
|
||||
genetics.machine.machine.polymeriser.tank.dna.info=Raw DNA
|
||||
genetics.machine.machine.polymeriser.errors.item.no=No item to replicate
|
||||
genetics.machine.machine.polymeriser.errors.item.filled=Item filled
|
||||
genetics.machine.machine.polymeriser.errors.insufficient.bacteria=Insufficient Bacteria
|
||||
genetics.machine.machine.polymeriser.errors.insufficient.dna=Insufficient DNA
|
||||
genetics.machine.machine.polymeriser.tooltips.logic.gene=Replicating 1 genes
|
||||
genetics.machine.machine.polymeriser.tooltips.logic.genes=Replicating %s geness
|
||||
genetics.machine.machine.polymeriser.tooltips.slots.unfilled=Unfilled Serum
|
||||
|
||||
genetics.machine.machine.inoculator=Inoculator
|
||||
genetics.machine.machine.inoculator.info=The Inoculator uses serums to add genes to breedable individuals. This process is very slow and requires a Bacteria Vector, but is always successful.
|
||||
genetics.machine.machine.inoculator.no.individual=No Individual to Inoculate
|
||||
genetics.machine.machine.inoculator.no.serum=No Serum
|
||||
genetics.machine.machine.inoculator.empty.serum.info=Serum is empty
|
||||
genetics.machine.machine.inoculator.invalid.serum=Invalid Serum
|
||||
genetics.machine.machine.inoculator.invalid.serum.no.genes=Serum does not hold any genes
|
||||
genetics.machine.machine.inoculator.invalid.serum.mismatch=Mismatch of Serum Type and Target
|
||||
genetics.machine.machine.inoculator.errors.no.individual.desc=No Individual to Inoculate
|
||||
genetics.machine.machine.inoculator.tooltips.logic.gene=Inoculating with 1 gene
|
||||
genetics.machine.machine.inoculator.tooltips.logic.genes=Inoculating with %s genes
|
||||
|
||||
genetics.machine.labMachine.genepool=Genepool
|
||||
genetics.machine.labMachine.genepool.info=The Genepool uses enzymes and ethanol to break down living things into DNA. During this process, all genetic information is lost and the source of the DNA is destroyed.
|
||||
genetics.machine.labMachine.genepool.no.individual=No Individual
|
||||
genetics.machine.labMachine.genepool.no.room=Not enough room in Tank
|
||||
genetics.machine.labMachine.genepool.not.enough.ethanol=Not enough Ethanol
|
||||
genetics.machine.labMachine.genepool.insufficient.enzyme=Insufficient Enzyme
|
||||
genetics.machine.labMachine.genepool.errors.not.enough.ethanol.desc=Not enough Ethanol
|
||||
genetics.machine.labMachine.genepool.errors.insufficient.enzyme.desc=Insufficient Enzyme
|
||||
|
||||
genetics.machine.labMachine.labMachine=Lab Stand
|
||||
|
||||
genetics.machine.labMachine.analyser=Analyser
|
||||
genetics.machine.labMachine.analyser.info=The Analyser takes breedable individuals and DNA sequencers and analyses them to determine the genes present. This requires DNA Dye, created from purple dye and glowstone
|
||||
genetics.machine.labMachine.analyser.insufficient.dye=Insufficient Dye
|
||||
genetics.machine.labMachine.analyser.insufficient.dye.info=Not enough DNA dye to analyse
|
||||
genetics.machine.labMachine.analyser.already.analysed=Already Analysed
|
||||
genetics.machine.labMachine.analyser.already.analysed.info=Item has already been analysed
|
||||
genetics.machine.labMachine.analyser.errors.insufficient.dye.desc=Insufficient Dye
|
||||
genetics.machine.labMachine.analyser.errors.insufficient.dye.info=Not enough DNA dye to analyse
|
||||
genetics.machine.labMachine.analyser.errors.already.analysed.desc=Already Analysed
|
||||
genetics.machine.labMachine.analyser.errors.already.analysed.info=Item has already been analysed
|
||||
genetics.machine.labMachine.analyser.errors.no.item.desc=No item to analyse
|
||||
genetics.machine.labMachine.analyser.tooltips.slots.unanalysed=Unanalysed Item
|
||||
|
||||
genetics.machine.labMachine.incubator=Incubator
|
||||
genetics.machine.labMachine.incubator.info=The Incubator combines liquids and items and allows them to sit at an ideal temperature to encourage bacterial growth.
|
||||
genetics.machine.labMachine.incubator.no.recipe=No Recipe
|
||||
genetics.machine.labMachine.incubator.no.recipe.info=There is no valid recipe
|
||||
genetics.machine.labMachine.incubator.no.liquid=Not enough incubation liquid
|
||||
genetics.machine.labMachine.incubator.no.room=No room for output
|
||||
genetics.machine.labMachine.incubator.errors.no.liquid.desc=Not enough incubation liquid
|
||||
genetics.machine.labMachine.incubator.errors.no.room.desc=No room for output
|
||||
|
||||
genetics.machine.labMachine.acclimatiser=Acclimatiser
|
||||
genetics.machine.labMachine.acclimatiser.no.individual=No Individual to Acclimatise
|
||||
genetics.machine.labMachine.acclimatiser.no.item=No Acclimatising Items
|
||||
genetics.machine.labMachine.acclimatiser.can.not.acclimatise=Cannot Acclimatise this individual with these items
|
||||
genetics.machine.labMachine.acclimatiser.errors.no.individual.desc=No Individual to Acclimatise
|
||||
genetics.machine.labMachine.acclimatiser.errors.no.item.desc=No Acclimatising Items
|
||||
genetics.machine.labMachine.acclimatiser.errors.can.not.acclimatise.desc=Cannot Acclimatise this individual with these items
|
||||
genetics.machine.labMachine.acclimatiser.tooltips.slots.acclimatising=Acclimatising Items
|
||||
|
||||
genetics.machine.advMachine.splicer=Splicer
|
||||
genetics.machine.advMachine.splicer.info=The Splicer is an incredibly powerful machine that is used to insert genes into individuals. This process is fast, but requires monumental amounts of power.
|
||||
genetics.machine.advMachine.splicer.tooltips.slots.serum=Serum Vials & Arrays
|
||||
genetics.machine.advMachine.splicer.tooltips.slots.individual=Splicable Individual
|
||||
genetics.machine.advMachine.splicer.errors.no.individual.desc=No Individual to Splice
|
||||
|
||||
genetic.item.gene.empty=Empty
|
||||
genetic.item.gene.charge=Charge
|
||||
|
||||
Reference in new issue
Block a user