diff --git a/src/main/resources/assets/powersuits/lang/de_DE.lang b/src/main/resources/assets/powersuits/lang/de_DE.lang index d6345f3..8aadc49 100644 --- a/src/main/resources/assets/powersuits/lang/de_DE.lang +++ b/src/main/resources/assets/powersuits/lang/de_DE.lang @@ -117,4 +117,27 @@ module.aquaAffinity.desc=Reduces the speed penalty for using your tool underwate module.coolingSystem.desc=Cools down heat-producing modules quicker. module.tint.desc=Give your armor some coloured tinting to customize your armor's appearance. module.transparentArmor.desc=Make the item transparent, so you can show off your skin without losing armor. -module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor. \ No newline at end of file +module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor. + + +gui.noModulesFound.line1=No modular powersuit items +gui.noModulesFound.line2=found in inventory. Make some! + +gui.red=Red +gui.green=Green +gui.blue=Blue + +gui.install=Install +gui.salvage=Salvage + +gui.newKeybind=New +gui.trashKeybind=Trash +gui.pressKey=Press Key +gui.keybindInstructions1=Use 'new' to bind new keys. +gui.keybindInstructions2=Drag and drop modules to bind them to keys. +gui.keybindInstructions3=Drop keys on 'trash' to unbind them. +gui.keybindTaken=Taken! + +gui.tab.tinker=Tinker +gui.tab.keybinds=Keybinds +gui.tab.visual=Visual \ No newline at end of file diff --git a/src/main/resources/assets/powersuits/lang/en_US.lang b/src/main/resources/assets/powersuits/lang/en_US.lang index 0ef0ede..d97dfbf 100644 --- a/src/main/resources/assets/powersuits/lang/en_US.lang +++ b/src/main/resources/assets/powersuits/lang/en_US.lang @@ -119,4 +119,26 @@ module.aquaAffinity.desc=Reduces the speed penalty for using your tool underwate module.coolingSystem.desc=Cools down heat-producing modules quicker. module.tint.desc=Give your armor some coloured tinting to customize your armor's appearance. module.transparentArmor.desc=Make the item transparent, so you can show off your skin without losing armor. -module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor. \ No newline at end of file +module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor. + +gui.noModulesFound.line1=No modular powersuit items +gui.noModulesFound.line2=found in inventory. Make some! + +gui.red=Red +gui.green=Green +gui.blue=Blue + +gui.install=Install +gui.salvage=Salvage + +gui.newKeybind=New +gui.trashKeybind=Trash +gui.pressKey=Press Key +gui.keybindInstructions1=Use 'new' to bind new keys. +gui.keybindInstructions2=Drag and drop modules to bind them to keys. +gui.keybindInstructions3=Drop keys on 'trash' to unbind them. +gui.keybindTaken=Taken! + +gui.tab.tinker=Tinker +gui.tab.keybinds=Keybinds +gui.tab.visual=Visual \ No newline at end of file diff --git a/src/main/resources/assets/powersuits/lang/fr_FR.lang b/src/main/resources/assets/powersuits/lang/fr_FR.lang index 4821979..78bf7cf 100644 --- a/src/main/resources/assets/powersuits/lang/fr_FR.lang +++ b/src/main/resources/assets/powersuits/lang/fr_FR.lang @@ -119,4 +119,27 @@ module.aquaAffinity.desc=Reduces the speed penalty for using your tool underwate module.coolingSystem.desc=Cools down heat-producing modules quicker. module.tint.desc=Give your armor some coloured tinting to customize your armor's appearance. module.transparentArmor.desc=Make the item transparent, so you can show off your skin without losing armor. -module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor. \ No newline at end of file +module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor. + + +gui.noModulesFound.line1=No modular powersuit items +gui.noModulesFound.line2=found in inventory. Make some! + +gui.red=Red +gui.green=Green +gui.blue=Blue + +gui.install=Install +gui.salvage=Salvage + +gui.newKeybind=New +gui.trashKeybind=Trash +gui.pressKey=Press Key +gui.keybindInstructions1=Use 'new' to bind new keys. +gui.keybindInstructions2=Drag and drop modules to bind them to keys. +gui.keybindInstructions3=Drop keys on 'trash' to unbind them. +gui.keybindTaken=Taken! + +gui.tab.tinker=Tinker +gui.tab.keybinds=Keybinds +gui.tab.visual=Visual \ No newline at end of file diff --git a/src/main/resources/assets/powersuits/lang/he_IL.lang b/src/main/resources/assets/powersuits/lang/he_IL.lang index 4eeccd0..dd4e804 100644 --- a/src/main/resources/assets/powersuits/lang/he_IL.lang +++ b/src/main/resources/assets/powersuits/lang/he_IL.lang @@ -116,4 +116,27 @@ module.aquaAffinity.desc=Reduces the speed penalty for using your tool underwate module.coolingSystem.desc=Cools down heat-producing modules quicker. module.tint.desc=Give your armor some coloured tinting to customize your armor's appearance. module.transparentArmor.desc=Make the item transparent, so you can show off your skin without losing armor. -module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor. \ No newline at end of file +module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor. + + +gui.noModulesFound.line1=No modular powersuit items +gui.noModulesFound.line2=found in inventory. Make some! + +gui.red=Red +gui.green=Green +gui.blue=Blue + +gui.install=Install +gui.salvage=Salvage + +gui.newKeybind=New +gui.trashKeybind=Trash +gui.pressKey=Press Key +gui.keybindInstructions1=Use 'new' to bind new keys. +gui.keybindInstructions2=Drag and drop modules to bind them to keys. +gui.keybindInstructions3=Drop keys on 'trash' to unbind them. +gui.keybindTaken=Taken! + +gui.tab.tinker=Tinker +gui.tab.keybinds=Keybinds +gui.tab.visual=Visual \ No newline at end of file diff --git a/src/main/resources/assets/powersuits/lang/pt_BR.lang b/src/main/resources/assets/powersuits/lang/pt_BR.lang index 9257b4e..3f80345 100644 --- a/src/main/resources/assets/powersuits/lang/pt_BR.lang +++ b/src/main/resources/assets/powersuits/lang/pt_BR.lang @@ -120,4 +120,27 @@ module.aquaAffinity.desc=Reduces the speed penalty for using your tool underwate module.coolingSystem.desc=Cools down heat-producing modules quicker. module.tint.desc=Give your armor some coloured tinting to customize your armor's appearance. module.transparentArmor.desc=Make the item transparent, so you can show off your skin without losing armor. -module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor. \ No newline at end of file +module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor. + + +gui.noModulesFound.line1=No modular powersuit items +gui.noModulesFound.line2=found in inventory. Make some! + +gui.red=Red +gui.green=Green +gui.blue=Blue + +gui.install=Install +gui.salvage=Salvage + +gui.newKeybind=New +gui.trashKeybind=Trash +gui.pressKey=Press Key +gui.keybindInstructions1=Use 'new' to bind new keys. +gui.keybindInstructions2=Drag and drop modules to bind them to keys. +gui.keybindInstructions3=Drop keys on 'trash' to unbind them. +gui.keybindTaken=Taken! + +gui.tab.tinker=Tinker +gui.tab.keybinds=Keybinds +gui.tab.visual=Visual \ No newline at end of file diff --git a/src/main/resources/assets/powersuits/lang/pt_PT.lang b/src/main/resources/assets/powersuits/lang/pt_PT.lang index cc42007..fae5728 100644 --- a/src/main/resources/assets/powersuits/lang/pt_PT.lang +++ b/src/main/resources/assets/powersuits/lang/pt_PT.lang @@ -120,4 +120,27 @@ module.aquaAffinity.desc=Reduces the speed penalty for using your tool underwate module.coolingSystem.desc=Cools down heat-producing modules quicker. module.tint.desc=Give your armor some coloured tinting to customize your armor's appearance. module.transparentArmor.desc=Make the item transparent, so you can show off your skin without losing armor. -module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor. \ No newline at end of file +module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor. + + +gui.noModulesFound.line1=No modular powersuit items +gui.noModulesFound.line2=found in inventory. Make some! + +gui.red=Red +gui.green=Green +gui.blue=Blue + +gui.install=Install +gui.salvage=Salvage + +gui.newKeybind=New +gui.trashKeybind=Trash +gui.pressKey=Press Key +gui.keybindInstructions1=Use 'new' to bind new keys. +gui.keybindInstructions2=Drag and drop modules to bind them to keys. +gui.keybindInstructions3=Drop keys on 'trash' to unbind them. +gui.keybindTaken=Taken! + +gui.tab.tinker=Tinker +gui.tab.keybinds=Keybinds +gui.tab.visual=Visual \ No newline at end of file diff --git a/src/main/resources/assets/powersuits/lang/ru_RU.lang b/src/main/resources/assets/powersuits/lang/ru_RU.lang index e2d616f..17cade6 100644 --- a/src/main/resources/assets/powersuits/lang/ru_RU.lang +++ b/src/main/resources/assets/powersuits/lang/ru_RU.lang @@ -120,4 +120,27 @@ module.aquaAffinity.desc=Reduces the speed penalty for using your tool underwate module.coolingSystem.desc=Cools down heat-producing modules quicker. module.tint.desc=Give your armor some coloured tinting to customize your armor's appearance. module.transparentArmor.desc=Make the item transparent, so you can show off your skin without losing armor. -module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor. \ No newline at end of file +module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor. + + +gui.noModulesFound.line1=No modular powersuit items +gui.noModulesFound.line2=found in inventory. Make some! + +gui.red=Red +gui.green=Green +gui.blue=Blue + +gui.install=Install +gui.salvage=Salvage + +gui.newKeybind=New +gui.trashKeybind=Trash +gui.pressKey=Press Key +gui.keybindInstructions1=Use 'new' to bind new keys. +gui.keybindInstructions2=Drag and drop modules to bind them to keys. +gui.keybindInstructions3=Drop keys on 'trash' to unbind them. +gui.keybindTaken=Taken! + +gui.tab.tinker=Tinker +gui.tab.keybinds=Keybinds +gui.tab.visual=Visual \ No newline at end of file diff --git a/src/main/resources/assets/powersuits/lang/zh_CN.lang b/src/main/resources/assets/powersuits/lang/zh_CN.lang index fb2df9d..be254e9 100644 --- a/src/main/resources/assets/powersuits/lang/zh_CN.lang +++ b/src/main/resources/assets/powersuits/lang/zh_CN.lang @@ -119,4 +119,27 @@ module.aquaAffinity.desc=Reduces the speed penalty for using your tool underwate module.coolingSystem.desc=Cools down heat-producing modules quicker. module.tint.desc=Give your armor some coloured tinting to customize your armor's appearance. module.transparentArmor.desc=Make the item transparent, so you can show off your skin without losing armor. -module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor. \ No newline at end of file +module.cosmeticGlow.desc=Change the appearance of the glowy bits on your armor. + + +gui.noModulesFound.line1=No modular powersuit items +gui.noModulesFound.line2=found in inventory. Make some! + +gui.red=Red +gui.green=Green +gui.blue=Blue + +gui.install=Install +gui.salvage=Salvage + +gui.newKeybind=New +gui.trashKeybind=Trash +gui.pressKey=Press Key +gui.keybindInstructions1=Use 'new' to bind new keys. +gui.keybindInstructions2=Drag and drop modules to bind them to keys. +gui.keybindInstructions3=Drop keys on 'trash' to unbind them. +gui.keybindTaken=Taken! + +gui.tab.tinker=Tinker +gui.tab.keybinds=Keybinds +gui.tab.visual=Visual \ No newline at end of file diff --git a/src/main/scala/net/machinemuse/general/gui/GuiFieldTinker.java b/src/main/scala/net/machinemuse/general/gui/GuiFieldTinker.java index 4284e45..66ad139 100644 --- a/src/main/scala/net/machinemuse/general/gui/GuiFieldTinker.java +++ b/src/main/scala/net/machinemuse/general/gui/GuiFieldTinker.java @@ -6,6 +6,7 @@ import net.machinemuse.general.gui.frame.*; import net.machinemuse.utils.render.MuseRenderer; import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.StatCollector; /** * The gui class for the TinkerTable block. @@ -57,8 +58,8 @@ public class GuiFieldTinker extends MuseGui { if (itemSelectFrame.hasNoItems()) { double centerx = absX(0); double centery = absY(0); - MuseRenderer.drawCenteredString("No modular powersuit items", centerx, centery - 5); - MuseRenderer.drawCenteredString("found in inventory. Make some!", centerx, centery + 5); + MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.noModulesFound.line1"), centerx, centery - 5); + MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.noModulesFound.line2"), centerx, centery + 5); } } } diff --git a/src/main/scala/net/machinemuse/general/gui/GuiTinkerTable.java b/src/main/scala/net/machinemuse/general/gui/GuiTinkerTable.java index f593476..06d5085 100644 --- a/src/main/scala/net/machinemuse/general/gui/GuiTinkerTable.java +++ b/src/main/scala/net/machinemuse/general/gui/GuiTinkerTable.java @@ -1,12 +1,12 @@ package net.machinemuse.general.gui; +import net.machinemuse.general.gui.frame.*; import net.machinemuse.numina.geometry.Colour; import net.machinemuse.numina.geometry.MusePoint2D; -import net.machinemuse.general.gui.frame.*; import net.machinemuse.utils.render.MuseRenderer; import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.util.ChunkCoordinates; +import net.minecraft.util.StatCollector; /** * The gui class for the TinkerTable block. @@ -78,8 +78,8 @@ public class GuiTinkerTable extends MuseGui { if (itemSelectFrame.hasNoItems()) { double centerx = absX(0); double centery = absY(0); - MuseRenderer.drawCenteredString("No modular powersuit items", centerx, centery - 5); - MuseRenderer.drawCenteredString("found in inventory. Make some!", centerx, centery + 5); + MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.noModulesFound.line1"), centerx, centery - 5); + MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.noModulesFound.line2"), centerx, centery + 5); } } } diff --git a/src/main/scala/net/machinemuse/general/gui/frame/ColourPickerFrame.scala b/src/main/scala/net/machinemuse/general/gui/frame/ColourPickerFrame.scala index 31b8d7f..1cb37fc 100644 --- a/src/main/scala/net/machinemuse/general/gui/frame/ColourPickerFrame.scala +++ b/src/main/scala/net/machinemuse/general/gui/frame/ColourPickerFrame.scala @@ -13,6 +13,7 @@ import net.machinemuse.utils.render.GuiIcons import net.machinemuse.utils.render.GuiIcons._ import net.minecraft.client.Minecraft import net.minecraft.nbt.NBTTagIntArray +import net.minecraft.util.StatCollector import scala.collection.mutable @@ -22,9 +23,9 @@ import scala.collection.mutable */ class ColourPickerFrame(val borderRef: MuseRect, val insideColour: Colour, val borderColour: Colour, val itemSelector: ItemSelectionFrame) extends IGuiFrame { val border = new DrawableMuseRect(borderRef, insideColour, borderColour) - val rslider: ClickableSlider = new ClickableSlider(new MusePoint2D(border.centerx, border.top + 10), border.width - 10, "Red") - val gslider: ClickableSlider = new ClickableSlider(new MusePoint2D(border.centerx, border.top + 22), border.width - 10, "Green") - val bslider: ClickableSlider = new ClickableSlider(new MusePoint2D(border.centerx, border.top + 34), border.width - 10, "Blue") + val rslider: ClickableSlider = new ClickableSlider(new MusePoint2D(border.centerx, border.top + 8), border.width - 10, StatCollector.translateToLocal("gui.red")) + val gslider: ClickableSlider = new ClickableSlider(new MusePoint2D(border.centerx, border.top + 24), border.width - 10, StatCollector.translateToLocal("gui.green")) + val bslider: ClickableSlider = new ClickableSlider(new MusePoint2D(border.centerx, border.top + 40), border.width - 10, StatCollector.translateToLocal("gui.blue")) def colours: Array[Int] = getOrCreateColourTag.map(e => e.func_150302_c /*getIntArray()*/ ).getOrElse(Array.empty) diff --git a/src/main/scala/net/machinemuse/general/gui/frame/InstallSalvageFrame.java b/src/main/scala/net/machinemuse/general/gui/frame/InstallSalvageFrame.java index 9a32346..c008b88 100644 --- a/src/main/scala/net/machinemuse/general/gui/frame/InstallSalvageFrame.java +++ b/src/main/scala/net/machinemuse/general/gui/frame/InstallSalvageFrame.java @@ -19,6 +19,7 @@ import net.machinemuse.utils.MuseItemUtils; import net.machinemuse.utils.render.MuseRenderer; import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; import java.util.List; @@ -41,11 +42,11 @@ public class InstallSalvageFrame extends ScrollableFrame { double sizex = border.right() - border.left(); double sizey = border.bottom() - border.top(); - this.installButton = new ClickableButton("Install", new MusePoint2D( + this.installButton = new ClickableButton(StatCollector.translateToLocal("gui.install"), new MusePoint2D( border.right() - sizex / 2.0, border.bottom() - sizey / 4.0), true); - this.salvageButton = new ClickableButton("Salvage", new MusePoint2D( + this.salvageButton = new ClickableButton(StatCollector.translateToLocal("gui.salvage"), new MusePoint2D( border.left() + sizex / 2.0, border.top() + sizey / 4.0), true); diff --git a/src/main/scala/net/machinemuse/general/gui/frame/KeybindConfigFrame.java b/src/main/scala/net/machinemuse/general/gui/frame/KeybindConfigFrame.java index c5f02d4..e59716c 100644 --- a/src/main/scala/net/machinemuse/general/gui/frame/KeybindConfigFrame.java +++ b/src/main/scala/net/machinemuse/general/gui/frame/KeybindConfigFrame.java @@ -19,6 +19,7 @@ import net.machinemuse.utils.MuseItemUtils; import net.machinemuse.utils.render.MuseRenderer; import net.minecraft.client.settings.KeyBinding; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.util.StatCollector; import org.lwjgl.input.Keyboard; import java.util.HashSet; @@ -51,8 +52,8 @@ public class KeybindConfigFrame implements IGuiFrame { this.br = br; this.player = player; MusePoint2D center = br.plus(ul).times(0.5); - newKeybindButton = new ClickableButton("New", center.plus(new MusePoint2D(0, -8)), true); - trashKeybindButton = new ClickableButton("Trash", center.plus(new MusePoint2D(0, 8)), true); + newKeybindButton = new ClickableButton(StatCollector.translateToLocal("gui.newKeybind"), center.plus(new MusePoint2D(0, -8)), true); + trashKeybindButton = new ClickableButton(StatCollector.translateToLocal("gui.trashKeybind"), center.plus(new MusePoint2D(0, 8)), true); } @Override @@ -216,7 +217,7 @@ public class KeybindConfigFrame implements IGuiFrame { RenderState.blendingOn(); RenderState.on2D(); if (selecting) { - MuseRenderer.drawCenteredString("Press Key", center.x(), center.y()); + MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.pressKey"), center.x(), center.y()); RenderState.off2D(); RenderState.blendingOff(); return; @@ -224,12 +225,12 @@ public class KeybindConfigFrame implements IGuiFrame { newKeybindButton.draw(); trashKeybindButton.draw(); MuseTextureUtils.pushTexture(MuseTextureUtils.ITEM_TEXTURE_QUILT()); - MuseRenderer.drawCenteredString("Use 'new' to bind new keys.", center.x(), center.y() + 40); - MuseRenderer.drawCenteredString("Drag and drop modules to bind them to keys.", center.x(), center.y() + 50); - MuseRenderer.drawCenteredString("Drop keys on 'trash' to unbind them.", center.x(), center.y() + 60); + MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.keybindInstructions1"), center.x(), center.y() + 40); + MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.keybindInstructions2"), center.x(), center.y() + 50); + MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.keybindInstructions3"), center.x(), center.y() + 60); if (takenTime + 1000 > System.currentTimeMillis()) { MusePoint2D pos = newKeybindButton.getPosition().plus(new MusePoint2D(0, -20)); - MuseRenderer.drawCenteredString("Taken!", pos.x(), pos.y()); + MuseRenderer.drawCenteredString(StatCollector.translateToLocal("gui.keybindTaken"), pos.x(), pos.y()); } for (ClickableModule module : modules) { module.draw(); diff --git a/src/main/scala/net/machinemuse/general/gui/frame/TabSelectFrame.scala b/src/main/scala/net/machinemuse/general/gui/frame/TabSelectFrame.scala index f66d935..b391491 100644 --- a/src/main/scala/net/machinemuse/general/gui/frame/TabSelectFrame.scala +++ b/src/main/scala/net/machinemuse/general/gui/frame/TabSelectFrame.scala @@ -5,6 +5,7 @@ import java.util import net.machinemuse.general.gui.clickable.ClickableButton import net.minecraft.entity.player.EntityPlayer import net.machinemuse.powersuits.common.ModularPowersuits +import net.minecraft.util.StatCollector /** * @author MachineMuse @@ -13,9 +14,9 @@ class TabSelectFrame(p: EntityPlayer, topleft: MusePoint2D, bottomright: MusePoi worldx: Int, worldy: Int, worldz: Int) extends IGuiFrame { val buttons = Array( - (new ClickableButton("Tinker", topleft.midpoint(bottomright).minus(100, 0), worldy < 256 && worldy > 0), 0), - (new ClickableButton("Keybinds", topleft.midpoint(bottomright), true), 1), - (new ClickableButton("Visual", topleft.midpoint(bottomright).plus(100, 0), true), 3) + (new ClickableButton(StatCollector.translateToLocal("gui.tab.tinker"), topleft.midpoint(bottomright).minus(100, 0), worldy < 256 && worldy > 0), 0), + (new ClickableButton(StatCollector.translateToLocal("gui.tab.keybinds"), topleft.midpoint(bottomright), true), 1), + (new ClickableButton(StatCollector.translateToLocal("gui.tab.visual"), topleft.midpoint(bottomright).plus(100, 0), true), 3) ) def onMouseDown(x: Double, y: Double, button: Int): Unit = {