Fixed some inconsistencies in how damage/speed of tools is calculated in GUIs

* Fixed damage not being calculated properly in Crafting Stations
 * Fixed Crafting Stations stonebound speed calculations (they were using a different algorithm)
 * Fixed typo that made GUIs show the primary mining speed of dual harvest twice
 * Fixed Stonebound damage bonus/loss always being truncated to an int in GUIs

Conflicts:
	src/main/java/tconstruct/tools/gui/CraftingStationGui.java
	src/main/java/tconstruct/tools/gui/ToolStationGui.java
This commit is contained in:
squeek committed 2014-07-06 23:53:35 -07:00
1 parent 41ff78b75c
commit d719885de7
2 files changed
+9 -7

No files matched your search

@@ -231,9 +231,10 @@ public class ToolStationGui extends GuiContainer
if (stoneboundDamage != 0)
{
DecimalFormat df = new DecimalFormat("##.##");
heart = stoneboundDamage == 2 ? StatCollector.translateToLocal("gui.partcrafter8") : StatCollector.translateToLocal("gui.partcrafter9");
String bloss = stoneboundDamage > 0 ? StatCollector.translateToLocal("gui.toolstation4") : StatCollector.translateToLocal("gui.toolstation5");
this.fontRendererObj.drawString(bloss + (int) stoneboundDamage / 2 + heart, 294, base + offset * 10, 0xffffff);
this.fontRendererObj.drawString(bloss + df.format(stoneboundDamage / 2f) + heart, xSize + 8, base + offset * 10, 0xffffff);
offset++;
}
offset++;
@@ -300,7 +301,7 @@ public class ToolStationGui extends GuiContainer
DecimalFormat df = new DecimalFormat("##.##");
df.setRoundingMode(RoundingMode.DOWN);
float trueSpeed = mineSpeed + stoneboundSpeed;
float trueSpeed2 = mineSpeed + stoneboundSpeed;
float trueSpeed2 = mineSpeed2 + stoneboundSpeed;
fontRendererObj.drawString(StatCollector.translateToLocal("gui.toolstation12"), 294, base + offset * 10, 0xffffff);
offset++;