Resolved #429 - Missing localization
This commit is contained in:
parent
81b8d9bd5d
commit
f05e01cac1
7 changed files with 44 additions and 28 deletions
|
@ -1,5 +1,8 @@
|
|||
package resonantinduction.archaic.crate;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import resonantinduction.core.render.RenderItemOverlayTile;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
@ -13,8 +16,10 @@ public class RenderCrate extends RenderItemOverlayTile
|
|||
{
|
||||
if (tileEntity instanceof TileCrate)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
TileCrate tile = (TileCrate) tileEntity;
|
||||
renderItemOnSides(tileEntity, tile.getSampleStack(), x, y, z, "Empty");
|
||||
renderItemOnSides(tileEntity, tile.getSampleStack(), x, y, z, LanguageUtility.getLocal("tooltip.empty"));
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ public class GuiMultimeter extends GuiContainerBase
|
|||
this.fontRenderer.drawString(EnumColor.INDIGO + "Detection Type", 9, 20, 4210752);
|
||||
this.fontRenderer.drawString(multimeter.getNetwork().getDisplay(multimeter.detectType), 9, 60, 4210752);
|
||||
this.fontRenderer.drawString("Logic: " + EnumColor.RED + LanguageUtility.getLocal("gui.resonantinduction.multimeter." + this.multimeter.getMode().display), 9, 75, 4210752);
|
||||
this.fontRenderer.drawString(multimeter.getNetwork().graphs.get(multimeter.graphType).name, 95, 115, 4210752);
|
||||
this.fontRenderer.drawString(multimeter.getNetwork().getLocalized(multimeter.getNetwork().graphs.get(multimeter.graphType)), 95, 115, 4210752);
|
||||
this.textFieldLimit.drawTextBox();
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import universalelectricity.api.energy.UnitDisplay;
|
||||
|
@ -25,18 +26,16 @@ public class MultimeterNetwork extends Network<MultimeterNetwork, PartMultimeter
|
|||
* The available graphs to be handled.
|
||||
*/
|
||||
public final List<Graph> graphs = new ArrayList<Graph>();
|
||||
/**
|
||||
* Energy Related
|
||||
*/
|
||||
public final GraphL energyGraph = new GraphL("Energy", maxData);
|
||||
public final GraphL powerGraph = new GraphL("Power", maxData);
|
||||
public final GraphL energyCapacityGraph = new GraphL("Capacity", 1);
|
||||
public final GraphL voltageGraph = new GraphL("Voltage", maxData);
|
||||
public final GraphD torqueGraph = new GraphD("Torque", maxData);
|
||||
public final GraphD angularVelocityGraph = new GraphD("Speed", maxData);
|
||||
public final GraphI fluidGraph = new GraphI("Fluid", maxData);
|
||||
public final GraphF thermalGraph = new GraphF("Temperature", maxData);
|
||||
public final GraphI pressureGraph = new GraphI("Pressure", maxData);
|
||||
|
||||
public final GraphL energyGraph = new GraphL("energy", maxData);
|
||||
public final GraphL powerGraph = new GraphL("power", maxData);
|
||||
public final GraphL energyCapacityGraph = new GraphL("capacity", 1);
|
||||
public final GraphL voltageGraph = new GraphL("voltage", maxData);
|
||||
public final GraphD torqueGraph = new GraphD("torque", maxData);
|
||||
public final GraphD angularVelocityGraph = new GraphD("speed", maxData);
|
||||
public final GraphI fluidGraph = new GraphI("fluid", maxData);
|
||||
public final GraphF thermalGraph = new GraphF("temperature", maxData);
|
||||
public final GraphI pressureGraph = new GraphI("pressure", maxData);
|
||||
|
||||
/**
|
||||
* The absolute center of the multimeter screens.
|
||||
|
@ -111,10 +110,15 @@ public class MultimeterNetwork extends Network<MultimeterNetwork, PartMultimeter
|
|||
if (graph == pressureGraph)
|
||||
graphValue = UnitDisplay.roundDecimals(pressureGraph.get()) + " Pa";
|
||||
|
||||
return graph.name + ": " + graphValue;
|
||||
return getLocalized(graph) + ": " + graphValue;
|
||||
|
||||
}
|
||||
|
||||
public String getLocalized(Graph graph)
|
||||
{
|
||||
return LanguageUtility.getLocal("tooltip.graph." + graph.name);
|
||||
}
|
||||
|
||||
public boolean isPrimary(PartMultimeter check)
|
||||
{
|
||||
return primaryMultimeter == check;
|
||||
|
|
|
@ -15,6 +15,7 @@ import resonantinduction.core.ResonantInduction;
|
|||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.render.RenderUtility;
|
||||
import calclavia.lib.render.item.ISimpleItemRenderer;
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -196,7 +197,7 @@ public class RenderMultimeter implements ISimpleItemRenderer
|
|||
}
|
||||
|
||||
if (information.size() <= 0)
|
||||
information.add("No information");
|
||||
information.add(LanguageUtility.getLocal("tooltip.noInformation"));
|
||||
|
||||
float displacement = 0.72f / information.size();
|
||||
float maxScale = (float) (part.getNetwork().size.x + part.getNetwork().size.z) * 0.004f;
|
||||
|
|
|
@ -20,6 +20,7 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.render.RenderUtility;
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
import calclavia.lib.utility.WorldUtility;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
@ -90,7 +91,7 @@ public abstract class RenderItemOverlayTile extends TileEntitySpecialRenderer
|
|||
|
||||
public static void renderItemOnSides(TileEntity tile, ItemStack itemStack, double x, double y, double z)
|
||||
{
|
||||
renderItemOnSides(tile, itemStack, x, y, z, "No Output");
|
||||
renderItemOnSides(tile, itemStack, x, y, z, LanguageUtility.getLocal("tooltip.noOutput"));
|
||||
}
|
||||
|
||||
public static void renderItemOnSides(TileEntity tile, ItemStack itemStack, double x, double y, double z, String renderText)
|
||||
|
@ -110,9 +111,17 @@ public abstract class RenderItemOverlayTile extends TileEntitySpecialRenderer
|
|||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
renderItemOnSide(tile, itemStack, direction, x, y, z, renderText, amount);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
setupLight(tile, direction.offsetX, direction.offsetZ);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240);
|
||||
GL11.glDisable(2896);
|
||||
RenderUtility.renderText(renderText, direction, 0.02f, x, y - 0.35f, z);
|
||||
RenderUtility.renderText(amount, direction, 0.02f, x, y - 0.15f, z);
|
||||
GL11.glEnable(2896);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -129,15 +138,20 @@ public abstract class RenderItemOverlayTile extends TileEntitySpecialRenderer
|
|||
}
|
||||
|
||||
renderItemOnSide(tile, itemStack, direction, x, y, z, renderText, amount);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
setupLight(tile, direction.offsetX, direction.offsetZ);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240);
|
||||
GL11.glDisable(2896);
|
||||
RenderUtility.renderText(renderText, direction, 0.02f, x, y - 0.35f, z);
|
||||
RenderUtility.renderText(amount, direction, 0.02f, x, y - 0.15f, z);
|
||||
RenderUtility.disableLightmap();
|
||||
GL11.glEnable(2896);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
protected static void renderItemOnSide(TileEntity tile, ItemStack itemStack, ForgeDirection direction, double x, double y, double z, String renderText, String amount)
|
||||
{
|
||||
|
||||
if (itemStack != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
|
|
|
@ -9,19 +9,11 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import resonantinduction.api.recipe.MachineRecipes;
|
||||
import resonantinduction.api.recipe.MachineRecipes.RecipeType;
|
||||
import resonantinduction.api.recipe.RecipeResource;
|
||||
import resonantinduction.archaic.fluid.gutter.TileGutter;
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.ResonantInduction;
|
||||
import resonantinduction.core.TabRI;
|
||||
import universalelectricity.api.vector.Vector3;
|
||||
import calclavia.lib.utility.LanguageUtility;
|
||||
import calclavia.lib.utility.inventory.InventoryUtility;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 645b6d0cb900475eac7b1621df0bd0ade542b5f3
|
||||
Subproject commit b844cd552de8c92eff809688b259c3b3a0600980
|
Loading…
Reference in a new issue