mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-24 05:54:47 +00:00
Localization and refactoring (#77)
* Some refactoring for bee production * Code cleanup * Code cleanup * Added some localization * Fix wrong dropped class * Added some localization * Added some localization * Added some localization * Fix wrong import
This commit is contained in:
1 parent
68bbe7710c
commit
1ea7b62e5f
157 files changed
+3240
-5045
No files matched your search
@@ -80,8 +80,8 @@ public class ControlGene extends Control implements IControlValue<IGene>, IToolt
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
if (isMouseOver() && canFill(Window.get(this).getHeldItemStack())) {
|
||||
CraftGUI.Render.solid(getArea(), -1);
|
||||
CraftGUI.Render.solid(getArea().inset(1), -12303292);
|
||||
CraftGUI.Render.solid(getArea(), 0xffffffff);
|
||||
CraftGUI.Render.solid(getArea().inset(1), 0xff444444);
|
||||
}
|
||||
|
||||
CraftGUI.Render.colour(-1);
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.core.craftgui.CraftGUI;
|
||||
import binnie.core.craftgui.IWidget;
|
||||
import binnie.core.craftgui.geometry.IArea;
|
||||
import binnie.core.craftgui.geometry.IPoint;
|
||||
import binnie.core.craftgui.minecraft.control.ControlMachineProgress;
|
||||
|
||||
// TODO unused class?
|
||||
public class ControlProcessTemporary extends ControlMachineProgress {
|
||||
public ControlProcessTemporary(IWidget parent, int x, int y, int width, int height) {
|
||||
super(parent, x, y, null, null, null);
|
||||
setSize(new IPoint(width, height));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.solid(getArea(), -4868683);
|
||||
float w = getSize().y() * progress / 100.0f;
|
||||
CraftGUI.Render.solid(new IArea(getArea().x(), getArea().y(), w, getArea().h()), -65536);
|
||||
}
|
||||
}
|
||||
@@ -10,21 +10,17 @@ import binnie.core.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotArray;
|
||||
import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extrabees.core.ExtraBeeTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.machine.Acclimatiser;
|
||||
import binnie.genetics.machine.acclimatiser.Acclimatiser;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
public class WindowAcclimatiser extends WindowMachine {
|
||||
public static int[] slotReserve = new int[]{0, 1, 2, 3};
|
||||
public static int slotTarget = 4;
|
||||
public static int[] slotAcclimatiser = new int[]{5, 6, 7};
|
||||
public static int[] slotDone = new int[]{8, 9, 10, 11};
|
||||
|
||||
protected static Texture ProgressBase = new StandardTexture(64, 0, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
protected static Texture Progress = new StandardTexture(64, 21, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
protected static Texture progressBase = new StandardTexture(64, 0, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
protected static Texture progress = new StandardTexture(64, 21, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
|
||||
public WindowAcclimatiser(EntityPlayer player, IInventory inventory, Side side) {
|
||||
super(280, 198, player, inventory, side);
|
||||
@@ -36,15 +32,15 @@ public class WindowAcclimatiser extends WindowMachine {
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
setTitle("Acclimatiser");
|
||||
int x = 16;
|
||||
setTitle(I18N.localise(Genetics.instance, "machine.labMachine.acclimatiser"));
|
||||
int x = 59;
|
||||
int y = 32;
|
||||
new ControlSlotArray(this, x, y, 2, 2).create(Acclimatiser.slotReserve);
|
||||
new ControlSlotArray(this, x, y, 2, 2).create(Acclimatiser.SLOT_RESERVE);
|
||||
x += 54;
|
||||
new ControlSlot(this, x + 18, y).assign(4);
|
||||
new ControlSlotArray(this, x, y + 18 + 18, 3, 1).create(Acclimatiser.slotAcclimatiser);
|
||||
new ControlSlotArray(this, x, y + 18 + 18, 3, 1).create(Acclimatiser.SLOT_ACCLIMATISER);
|
||||
x += 72;
|
||||
new ControlSlotArray(this, x, y, 2, 2).create(Acclimatiser.slotDone);
|
||||
new ControlSlotArray(this, x, y, 2, 2).create(Acclimatiser.SLOT_DONE);
|
||||
new ControlEnergyBar(this, 21, 115, 16, 60, Position.Bottom);
|
||||
new ControlErrorState(this, 181.0f, 83.0f);
|
||||
new ControlPlayerInventory(this);
|
||||
@@ -52,7 +48,7 @@ public class WindowAcclimatiser extends WindowMachine {
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return "Acclimatiser";
|
||||
return I18N.localise(Genetics.instance, "machine.labMachine.acclimatiser");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,6 +58,6 @@ public class WindowAcclimatiser extends WindowMachine {
|
||||
|
||||
@Override
|
||||
protected String getName() {
|
||||
return "Acclimatiser";
|
||||
return I18N.localise(Genetics.instance, "machine.labMachine.acclimatiser");
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ import binnie.core.craftgui.window.Panel;
|
||||
import binnie.extrabees.core.ExtraBeeTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.machine.Analyser;
|
||||
import binnie.genetics.machine.analyser.Analyser;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@@ -42,7 +42,7 @@ public class WindowAnalyser extends WindowMachine {
|
||||
WindowAnalyser.Progress = new StandardTexture(66, 51, 66, 40, GeneticsTexture.GUIProcess.getTexture());
|
||||
int x = 16;
|
||||
int y = 32;
|
||||
new ControlSlotArray(this, x, y, 2, 3).create(Analyser.slotReserve);
|
||||
new ControlSlotArray(this, x, y, 2, 3).create(Analyser.SLOT_RESERVE);
|
||||
x += 28;
|
||||
new ControlSlot(this, x, y + 54 + 8).assign(13);
|
||||
new ControlSlotCharge(this, x + 20, y + 54 + 8, 13).setColor(10040319);
|
||||
@@ -56,7 +56,7 @@ public class WindowAnalyser extends WindowMachine {
|
||||
new ControlSlot(this, x + 38 - 9, y + 25 - 9).assign(6);
|
||||
new ControlIconDisplay(this, x + 76 + 2, y + 18, GUIIcon.ArrowRight.getIcon());
|
||||
x += 96;
|
||||
new ControlSlotArray(this, x, y, 2, 3).create(Analyser.slotFinished);
|
||||
new ControlSlotArray(this, x, y, 2, 3).create(Analyser.SLOT_FINISHED);
|
||||
x += 52;
|
||||
setTitle("Analyser");
|
||||
new ControlPlayerInventory(this);
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.genetics.Genetics;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
// TODO unused class?
|
||||
public class WindowGeneProject extends Window {
|
||||
public WindowGeneProject(EntityPlayer player, IInventory inventory, Side side) {
|
||||
super(100.0f, 100.0f, player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AbstractMod getMod() {
|
||||
return Genetics.instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getName() {
|
||||
return "GeneProjects";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
setTitle("Gene Projects");
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.extrabees.core.ExtraBeeTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.machine.Genepool;
|
||||
import binnie.genetics.machine.genepool.Genepool;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@@ -41,7 +41,7 @@ public class WindowGenepool extends WindowMachine {
|
||||
int y = 32;
|
||||
new ControlLiquidTank(this, x, y).setTankID(1);
|
||||
x += 26;
|
||||
new ControlSlotArray(this, x, y + 3, 2, 3).create(Genepool.slotReserve);
|
||||
new ControlSlotArray(this, x, y + 3, 2, 3).create(Genepool.SLOT_RESERVE);
|
||||
x += 38;
|
||||
new ControlIconDisplay(this, x, y + 3 + 18 + 1, GUIIcon.ArrowRight.getIcon());
|
||||
x += 18;
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
package binnie.genetics.craftgui;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.genetics.Genetics;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
// TODO unused class?
|
||||
public class WindowGenomeAssembler extends WindowMachine {
|
||||
public WindowGenomeAssembler(EntityPlayer player, IInventory inventory, Side side) {
|
||||
super(320, 240, player, inventory, side);
|
||||
}
|
||||
|
||||
public static Window create(EntityPlayer player, IInventory inventory, Side side) {
|
||||
return new WindowGenomeAssembler(player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return "Genome Assembler";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AbstractMod getMod() {
|
||||
return Genetics.instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getName() {
|
||||
return "GenomeAssembler";
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.machine.Incubator;
|
||||
import binnie.genetics.machine.incubator.Incubator;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@@ -40,7 +40,7 @@ public class WindowIncubator extends WindowMachine {
|
||||
int y = 32;
|
||||
new ControlLiquidTank(this, x, y).setTankID(0);
|
||||
x += 26;
|
||||
new ControlSlotArray(this, x, y + 3, 1, 3).create(Incubator.slotQueue);
|
||||
new ControlSlotArray(this, x, y + 3, 1, 3).create(Incubator.SLOT_QUEUE);
|
||||
x += 20;
|
||||
new ControlIconDisplay(this, x, y + 3 + 10, GUIIcon.ArrowRight.getIcon());
|
||||
x += 18;
|
||||
@@ -49,7 +49,7 @@ public class WindowIncubator extends WindowMachine {
|
||||
x += 40;
|
||||
new ControlIconDisplay(this, x, y + 3 + 10, GUIIcon.ArrowRight.getIcon());
|
||||
x += 18;
|
||||
new ControlSlotArray(this, x, y + 3, 1, 3).create(Incubator.slotOutput);
|
||||
new ControlSlotArray(this, x, y + 3, 1, 3).create(Incubator.SLOT_OUTPUT);
|
||||
x += 26;
|
||||
new ControlLiquidTank(this, x, y).setTankID(1);
|
||||
x += 34;
|
||||
|
||||
@@ -17,7 +17,7 @@ import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.extrabees.core.ExtraBeeTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.machine.Isolator;
|
||||
import binnie.genetics.machine.isolator.Isolator;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@@ -41,7 +41,7 @@ public class WindowIsolator extends WindowMachine {
|
||||
int y = 32;
|
||||
new ControlLiquidTank(this, x, y).setTankID(0);
|
||||
x += 26;
|
||||
new ControlSlotArray(this, x, y + 3, 1, 3).create(Isolator.slotReserve);
|
||||
new ControlSlotArray(this, x, y + 3, 1, 3).create(Isolator.SLOT_RESERVE);
|
||||
x += 20;
|
||||
new ControlIconDisplay(this, x, y + 3 + 1, GUIIcon.ArrowRight.getIcon());
|
||||
x += 18;
|
||||
@@ -57,7 +57,7 @@ public class WindowIsolator extends WindowMachine {
|
||||
x += 20;
|
||||
new ControlIconDisplay(this, x, y + 3 + 1, GUIIcon.ArrowRight.getIcon());
|
||||
x += 18;
|
||||
new ControlSlotArray(this, x, y + 3, 2, 3).create(Isolator.slotFinished);
|
||||
new ControlSlotArray(this, x, y + 3, 2, 3).create(Isolator.SLOT_FINISHED);
|
||||
new ControlEnergyBar(this, 260, 130, 16, 60, Position.Bottom);
|
||||
new ControlErrorState(this, 153.0f, 81.0f);
|
||||
new ControlPlayerInventory(this);
|
||||
|
||||
@@ -17,7 +17,7 @@ import binnie.core.craftgui.resource.Texture;
|
||||
import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.machine.Polymeriser;
|
||||
import binnie.genetics.machine.polymeriser.Polymeriser;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@@ -42,7 +42,7 @@ public class WindowPolymeriser extends WindowMachine {
|
||||
super.initialiseClient();
|
||||
int x = 16;
|
||||
int y = 38;
|
||||
new ControlSlotArray(this, x, y, 1, 4).create(Polymeriser.slotSerumReserve);
|
||||
new ControlSlotArray(this, x, y, 1, 4).create(Polymeriser.SLOT_SERUM_RESERVE);
|
||||
new ControlIconDisplay(this, x + 18, y + 1, GUIIcon.ArrowRight.getIcon());
|
||||
x += 34;
|
||||
new ControlMachineProgress(this, x + 18, y - 6, WindowPolymeriser.ProgressBase, WindowPolymeriser.Progress, Position.Left);
|
||||
@@ -54,7 +54,7 @@ public class WindowPolymeriser extends WindowMachine {
|
||||
new ControlSlot(this, x + 30, y + 18 + 8).assign(1);
|
||||
new ControlSlotCharge(this, x + 30 + 20, y + 18 + 8, 1).setColor(16766976);
|
||||
x += 138;
|
||||
new ControlSlotArray(this, x, y + 9, 2, 2).create(Polymeriser.slotSerumFinished);
|
||||
new ControlSlotArray(this, x, y + 9, 2, 2).create(Polymeriser.SLOT_SERUM_FINISHED);
|
||||
ControlErrorState errorState = new ControlErrorState(this, 244.0f, 97.0f);
|
||||
new ControlPlayerInventory(this);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import binnie.core.craftgui.resource.minecraft.StandardTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.machine.inoculator.Inoculator;
|
||||
import binnie.genetics.machine.Splicer;
|
||||
import binnie.genetics.machine.splicer.Splicer;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@@ -39,8 +39,8 @@ public class WindowSplicer extends WindowMachine {
|
||||
setTitle("Splicer");
|
||||
int x = 16;
|
||||
new ControlSplicerProgress(this, 84.0f, 32.0f, w() - 172.0f, 102.0f);
|
||||
CraftGUIUtil.horizontalGrid(x, 62.0f, new ControlSlotArray(this, 0, 0, 2, 1).create(Splicer.slotSerumReserve), new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowRight.getIcon()), new ControlSlot(this, 0.0f, 0.0f).assign(0));
|
||||
new ControlSlotArray(this, x + 12, 84, 2, 1).create(Splicer.slotSerumExpended);
|
||||
CraftGUIUtil.horizontalGrid(x, 62.0f, new ControlSlotArray(this, 0, 0, 2, 1).create(Splicer.SLOT_SERUM_RESERVE), new ControlIconDisplay(this, 0.0f, 0.0f, GUIIcon.ArrowRight.getIcon()), new ControlSlot(this, 0.0f, 0.0f).assign(0));
|
||||
new ControlSlotArray(this, x + 12, 84, 2, 1).create(Splicer.SLOT_SERUM_EXPENDED);
|
||||
new ControlIconDisplay(this, x + 12 + 36 + 4, 86.0f, GUIIcon.ArrowUpLeft.getIcon());
|
||||
new ControlEnergyBar(this, 196, 64, 60, 16, Position.Left);
|
||||
new ControlErrorState(this, 218.0f, 86.0f);
|
||||
|
||||
Reference in new issue
Block a user