From f17f0cc9d7475b9bd81c2647395bf4c2def2d839 Mon Sep 17 00:00:00 2001 From: asiekierka Date: Sun, 2 Nov 2014 08:06:36 +0100 Subject: [PATCH] touchups: requester/zone planner recipes, tooltip/GUI improvements, adding missing langnames --- .../assets/buildcraft/lang/en_US.lang | 4 ++++ common/buildcraft/BuildCraftSilicon.java | 21 +++++++++++++++++++ .../buildcraft/builders/gui/GuiArchitect.java | 7 ++++--- common/buildcraft/commander/GuiRequester.java | 4 ++-- common/buildcraft/commander/GuiZonePlan.java | 14 ++++++++++--- .../buildcraft/core/gui/tooltips/ToolTip.java | 10 +++++++-- 6 files changed, 50 insertions(+), 10 deletions(-) diff --git a/buildcraft_resources/assets/buildcraft/lang/en_US.lang b/buildcraft_resources/assets/buildcraft/lang/en_US.lang index 3d77a6e2..acf5dfba 100644 --- a/buildcraft_resources/assets/buildcraft/lang/en_US.lang +++ b/buildcraft_resources/assets/buildcraft/lang/en_US.lang @@ -276,6 +276,7 @@ tile.pathMarkerBlock.name=Path Mark tile.plainPipeBlock.name=Mining Pipe tile.pumpBlock.name=Pump tile.refineryBlock.name=Refinery +tile.requester.name=Requester tile.spring.oil.name=Oil Spring tile.spring.water.name=Water Spring tile.tankBlock.name=Tank @@ -326,6 +327,9 @@ tip.PipePowerEmerald=Power Input Pipe tip.PipePowerIron=Selectable Limiter Pipe tip.PipeStructureCobblestone=Support pipe +tip.tool.add=Add +til.tool.remove=Remove + achievement.woodenGearAchievement=A bit rough around the edges achievement.woodenGearAchievement.desc=Craft a wooden gear achievement.stoneGearAchievement=Hard as a rock diff --git a/common/buildcraft/BuildCraftSilicon.java b/common/buildcraft/BuildCraftSilicon.java index 80938c74..e53bcc53 100644 --- a/common/buildcraft/BuildCraftSilicon.java +++ b/common/buildcraft/BuildCraftSilicon.java @@ -246,6 +246,27 @@ public class BuildCraftSilicon extends BuildCraftMod { 'C', new ItemStack(redstoneChipset, 1, 0), 'G', BuildCraftCore.diamondGearItem); + // COMMANDER BLOCKS + CoreProxy.proxy.addCraftingRecipe(new ItemStack(zonePlanBlock, 1, 0), + "IRI", + "GMG", + "IDI", + 'M', Items.map, + 'R', Items.redstone, + 'G', BuildCraftCore.goldGearItem, + 'D', BuildCraftCore.diamondGearItem, + 'I', Items.iron_ingot); + + CoreProxy.proxy.addCraftingRecipe(new ItemStack(requesterBlock, 1, 0), + "IPI", + "GCG", + "IRI", + 'C', Blocks.chest, + 'R', Items.redstone, + 'P', Blocks.piston, + 'G', BuildCraftCore.ironGearItem, + 'I', Items.iron_ingot); + // CHIPSETS BuildcraftRecipeRegistry.assemblyTable.addRecipe("buildcraft:redstoneChipset", 100000, Chipset.RED.getStack(), Items.redstone); diff --git a/common/buildcraft/builders/gui/GuiArchitect.java b/common/buildcraft/builders/gui/GuiArchitect.java index 9cd7ddea..14865460 100644 --- a/common/buildcraft/builders/gui/GuiArchitect.java +++ b/common/buildcraft/builders/gui/GuiArchitect.java @@ -65,9 +65,10 @@ public class GuiArchitect extends GuiBuildCraft { buttonList.add(optionExcavate); optionAllowCreative = new GuiBetterButton(2, guiLeft + 5, guiTop + 80, 79, ""); - optionAllowCreative.setToolTip(new ToolTip(500)); - optionAllowCreative.getToolTip().add(new ToolTipLine(StringUtils.localize("tile.architect.tooltip.allowCreative.1"))); - optionAllowCreative.getToolTip().add(new ToolTipLine(StringUtils.localize("tile.architect.tooltip.allowCreative.2"))); + optionAllowCreative.setToolTip(new ToolTip(500, + new ToolTipLine(StringUtils.localize("tile.architect.tooltip.allowCreative.1")), + new ToolTipLine(StringUtils.localize("tile.architect.tooltip.allowCreative.2")) + )); buttonList.add(optionAllowCreative); textField = new GuiTextField(this.fontRendererObj, TEXT_X, TEXT_Y, TEXT_WIDTH, TEXT_HEIGHT); diff --git a/common/buildcraft/commander/GuiRequester.java b/common/buildcraft/commander/GuiRequester.java index deba3127..c44cbcfb 100755 --- a/common/buildcraft/commander/GuiRequester.java +++ b/common/buildcraft/commander/GuiRequester.java @@ -63,8 +63,8 @@ public class GuiRequester extends GuiAdvancedInterface { getContainer().gui = this; getContainer().getRequestList(); - xSize = 256; - ySize = 220; + xSize = 196; + ySize = 181; requester = iRequester; playerInventory = iPlayerInventory; diff --git a/common/buildcraft/commander/GuiZonePlan.java b/common/buildcraft/commander/GuiZonePlan.java index cddb7bbe..d4b308fa 100755 --- a/common/buildcraft/commander/GuiZonePlan.java +++ b/common/buildcraft/commander/GuiZonePlan.java @@ -17,14 +17,17 @@ import net.minecraft.client.gui.GuiButton; import net.minecraft.inventory.IInventory; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; - import buildcraft.api.core.EnumColor; import buildcraft.core.BCDynamicTexture; import buildcraft.core.DefaultProps; import buildcraft.core.ZonePlan; import buildcraft.core.gui.AdvancedSlot; import buildcraft.core.gui.GuiAdvancedInterface; +import buildcraft.core.gui.buttons.GuiBetterButton; +import buildcraft.core.gui.tooltips.ToolTip; +import buildcraft.core.gui.tooltips.ToolTipLine; import buildcraft.core.network.RPCHandler; +import buildcraft.core.utils.StringUtils; public class GuiZonePlan extends GuiAdvancedInterface { @@ -57,7 +60,7 @@ public class GuiZonePlan extends GuiAdvancedInterface { private float alpha = 0.8F; - private GuiButton tool; + private GuiBetterButton tool; private List inventorySlots; private List savedButtonList; @@ -130,7 +133,8 @@ public class GuiZonePlan extends GuiAdvancedInterface { public void initGui() { super.initGui(); - tool = new GuiButton(0, guiLeft + 5, guiTop + 20, 20, 20, "+"); + tool = new GuiBetterButton(0, guiLeft + 5, guiTop + 20, 20, "+"); + tool.setToolTip(new ToolTip(500, new ToolTipLine(StringUtils.localize("tip.tool.add")))); buttonList.add(tool); savedButtonList = buttonList; @@ -372,8 +376,12 @@ public class GuiZonePlan extends GuiAdvancedInterface { if (button == tool) { if (tool.displayString.equals("+")) { tool.displayString = "-"; + tool.getToolTip().remove(0); + tool.getToolTip().add(new ToolTipLine(StringUtils.localize("tip.tool.remove"))); } else { tool.displayString = "+"; + tool.getToolTip().remove(0); + tool.getToolTip().add(new ToolTipLine(StringUtils.localize("tip.tool.add"))); } } } diff --git a/common/buildcraft/core/gui/tooltips/ToolTip.java b/common/buildcraft/core/gui/tooltips/ToolTip.java index 92132493..8a974002 100644 --- a/common/buildcraft/core/gui/tooltips/ToolTip.java +++ b/common/buildcraft/core/gui/tooltips/ToolTip.java @@ -19,12 +19,18 @@ public class ToolTip extends ForwardingList { private final long delay; private long mouseOverStart; - public ToolTip() { + public ToolTip(ToolTipLine... lines) { this.delay = 0; + for (ToolTipLine line: lines) { + delegate.add(line); + } } - public ToolTip(int delay) { + public ToolTip(int delay, ToolTipLine... lines) { this.delay = delay; + for (ToolTipLine line: lines) { + delegate.add(line); + } } @Override