mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 11:59:14 +00:00
Merge branch 'master' into weaponry
Conflicts: src/main/java/tconstruct/tools/TinkerTools.java
This commit is contained in:
commit
939bd8a0ae
11 files changed
+176
-93
No files matched your search
@@ -30,6 +30,8 @@ import tconstruct.tools.logic.*;
|
||||
import tconstruct.tools.model.*;
|
||||
import tconstruct.weaponry.TinkerWeaponry;
|
||||
|
||||
import static tconstruct.tools.TinkerTools.*;
|
||||
|
||||
public class ToolProxyClient extends ToolProxyCommon
|
||||
{
|
||||
@Override
|
||||
@@ -347,16 +349,15 @@ public class ToolProxyClient extends ToolProxyCommon
|
||||
};
|
||||
|
||||
int i = 0;
|
||||
for (ItemStack stack : StencilBuilder.getStencils())
|
||||
for (int[] icon : icons)
|
||||
{
|
||||
// spacer
|
||||
while (icons[i].length == 0)
|
||||
if(icon.length == 0)
|
||||
{
|
||||
addStencilButton(0, 0, -1);
|
||||
i++;
|
||||
}
|
||||
addStencilButton(icons[i][0], icons[i][1], StencilBuilder.getIndex(stack));
|
||||
i++;
|
||||
else
|
||||
addStencilButton(icon[0], icon[1], i++);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -365,12 +366,10 @@ public class ToolProxyClient extends ToolProxyCommon
|
||||
TConstructClientRegistry.addStencilButton(xButton, yButton, index, "tinker", "textures/gui/icons.png");
|
||||
}
|
||||
|
||||
static int[][] itemIcons = { new int[] { 0, 3, 0 }, // Repair
|
||||
static int[][] itemIconsT1 = {
|
||||
new int[] { 1, 4, 0 }, // Pickaxe
|
||||
new int[] { 2, 5, 0 }, // Shovel
|
||||
new int[] { 2, 6, 0 }, // Axe
|
||||
// new int[] {2, 9, 0}, //Lumber Axe
|
||||
// new int[] {1, 7, 0}, //Ice Axe
|
||||
new int[] { 2, 6, 0 }, // Hatchet
|
||||
new int[] { 3, 8, 0 }, // Mattock
|
||||
new int[] { 1, 0, 1 }, // Broadsword
|
||||
new int[] { 1, 1, 1 }, // Longsword
|
||||
@@ -378,55 +377,65 @@ public class ToolProxyClient extends ToolProxyCommon
|
||||
new int[] { 1, 5, 1 }, // Dagger
|
||||
new int[] { 2, 3, 1 }, // Frying pan
|
||||
new int[] { 2, 4, 1 }, // Battlesign
|
||||
new int[] { 2, 6, 1 } // Chisel
|
||||
new int[] { 2, 6, 1 } // Chisel
|
||||
};
|
||||
|
||||
static int[][] iconCoords = { new int[] { 0, 1, 2, 13 }, new int[] { 13, 13, 13, 13 }, // Repair
|
||||
static int[][] iconCoordsT1 = {
|
||||
new int[] { 0, 0, 1, 13 }, new int[] { 2, 3, 3, 13 }, // Pickaxe
|
||||
new int[] { 3, 0, 13, 13 }, new int[] { 2, 3, 13, 13 }, // Shovel
|
||||
new int[] { 2, 0, 13, 13 }, new int[] { 2, 3, 13, 13 }, // Axe
|
||||
// new int[] { 6, 0, 13, 13 }, new int[] { 2, 3, 13, 13 }, //Lumber
|
||||
// Axe
|
||||
// new int[] { 0, 0, 5, 13 }, new int[] { 2, 3, 3, 13 }, //Ice Axe
|
||||
new int[] { 2, 0, 13, 13 }, new int[] { 2, 3, 13, 13 }, // Hatchet
|
||||
new int[] { 2, 0, 3, 13 }, new int[] { 2, 3, 2, 13 }, // Mattock
|
||||
new int[] { 1, 0, 2, 13 }, new int[] { 2, 3, 3, 13 }, // Broadsword
|
||||
new int[] { 1, 0, 3, 13 }, new int[] { 2, 3, 3, 13 }, // Longsword
|
||||
new int[] { 1, 0, 4, 13 }, new int[] { 2, 3, 3, 13 }, // Rapier
|
||||
new int[] { 7, 0, 4, 13 }, new int[] { 2, 3, 3, 13 }, // Dagger
|
||||
new int[] { 4, 0, 13, 13 }, new int[] { 2, 3, 13, 13 }, // Frying
|
||||
// Pan
|
||||
new int[] { 4, 0, 13, 13 }, new int[] { 2, 3, 13, 13 }, // Frying Pan
|
||||
new int[] { 5, 0, 13, 13 }, new int[] { 2, 3, 13, 13 }, // Battlesign
|
||||
new int[] { 7, 0, 13, 13 }, new int[] { 3, 3, 13, 13 } // Chisel
|
||||
};
|
||||
|
||||
static String[] toolDescriptions = { "gui.toolstation.repair.desc", "gui.toolstation.pickaxe.desc", "The Shovel is a precise digging tool. It is effective on dirt, sand, and snow.\n\nRequired parts:\n- Shovel Head\n- Handle", "The Hatchet is a basic chopping tool. It is effective on wood and leaves.\n\nRequired parts:\n- Axe Head\n- Handle",
|
||||
// "The Lumber Axe is a broad chopping tool. It harvests wood in a wide range and can fell entire trees.\n\nRequired parts:\n- Broad Axe Head\n- Handle",
|
||||
// "The Ice Axe is a tool for harvesting ice, mining, and attacking foes.\n\nSpecial Ability:\n- Wall Climb\nNatural Ability:\n- Ice Harvest\nDamage: Moderate\n\nRequired parts:\n- Pickaxe Head\n- Spike\n- Handle",
|
||||
"The Cutter Mattock is a versatile farming tool. It is effective on wood, dirt, and plants.\n\nSpecial Ability: Hoe\n\nRequired parts:\n- Axe Head\n- Shovel Head\n- Handle", "The Broadsword is a defensive weapon. Blocking cuts damage in half.\n\nSpecial Ability: Block\nDamage: Moderate\nDurability: High\n\nRequired parts:\n- Sword Blade\n- Wide Guard\n- Handle", "The Longsword is an offensive weapon. It is often used for charging into battle at full speed.\n\nNatural Ability:\n- Charge Boost\nSpecial Ability: Lunge\n\nDamage: Moderate\nDurability: Moderate", "The Rapier is a special weapon that relies on quick strikes to defeat foes.\n\nNatural Abilities:\n- Armor Pierce\n- Quick Strike\n- Charge Boost\nSpecial Ability:\n- Backpedal\n\nDamage: Low\nDurability: Low", "The Dagger is a short blade that can be thrown.\n\nSpecial Ability:\n- Throw Item\n\nDamage: Low\nDurability: Moderate\n\nRequired parts:\n- Knife Blade\n- Crossbar\n- Handle", "The Frying is a heavy weapon that uses sheer weight to stun foes.\n\nSpecial Ability: Block\nNatural Ability: Heavy\nShift+rClick: Place Frying Pan\nDamage: Low\nDurability: High\n\nRequired parts:\n- Pan\n- Handle",
|
||||
// "The Battlesign is an advance in weapon technology worthy of Zombie Pigmen everywhere.\n\nSpecial Ability: Block\nShift-rClick: Place sign\nDamage: Low\nDurability: Average\n\nRequired parts:\n- Board\n- Handle"
|
||||
"The Battlesign is an advance in weapon technology worthy of Zombie Pigmen everywhere.\n\nSpecial Ability:\nDamage Reflector\n\nNatural Ability: Writable\n\nDamage: Low\nDurability: Average", "The Chisel is a utility tool that carves shapes into blocks.\n\nCrafting Grid:\n- Shape Items\nSpecial Ability: Chisel\nDurability: Average\n\nRequired parts:\n- Chisel Head\n- Handle" };
|
||||
static int[][] itemIconsT2 = {
|
||||
new int[] { 6, 13, 0, }, // Hammer
|
||||
new int[] { 5, 11, 0, }, // Lumberaxe
|
||||
new int[] { 5, 12, 0, }, // Excavator
|
||||
new int[] { 4, 10, 0, }, // Scythe
|
||||
new int[] { 5, 7, 1, }, // Cleaver
|
||||
new int[] { 5, 8, 1, }, // Battleaxe
|
||||
};
|
||||
|
||||
static int[][] iconCoordsT2 = {
|
||||
new int[] { 11, 8, 9, 9 }, new int[] { 2, 3, 2, 2 }, // Hammer
|
||||
new int[] { 6, 8, 9, 9 }, new int[] { 2, 3, 2, 3 }, // Lumberaxe
|
||||
new int[] { 10, 8, 9, 9 }, new int[] { 2, 3, 2, 3 }, // Excavator
|
||||
new int[] { 8, 8, 9, 8 }, new int[] { 2, 3, 3, 3 }, // Scythe
|
||||
new int[] { 6, 8, 9, 8 }, new int[] { 3, 3, 2, 3 }, // Cleaver
|
||||
new int[] { 6, 8, 6, 9 }, new int[] { 2, 3, 2, 3 }, // Battleaxe
|
||||
};
|
||||
|
||||
void addToolButtons ()
|
||||
{
|
||||
// has to be in here so TinkerTools.tool is already initialized
|
||||
final String[] toolNames = {StatCollector.translateToLocal("gui.toolstation.repair.title"), TinkerTools.pickaxe.getLocalizedToolName(), "Shovel", "Hatchet",
|
||||
// "Lumber Axe",
|
||||
// "Ice Axe",
|
||||
"Mattock", "Broadsword", "Longsword", "Rapier", "Dagger", "Frying Pan", "Battlesign", "Chisel" };
|
||||
final ToolCore[] tier1Tools = {pickaxe, shovel, hatchet, mattock, broadsword, longsword, rapier, dagger, frypan, battlesign, chisel};
|
||||
final ToolCore[] tier2Tools = {hammer, lumberaxe, excavator, scythe, cleaver, battleaxe};
|
||||
|
||||
for (int i = 0; i < toolNames.length; i++)
|
||||
// repair
|
||||
addToolButton(0, 3, 0, new int[] { 0, 1, 2, 13 }, new int[] { 13, 13, 13, 13 }, "gui.toolforge1", "gui.toolforge2");
|
||||
|
||||
// tier 1 tools
|
||||
for (int i = 0; i < tier1Tools.length; i++)
|
||||
{
|
||||
addToolButton(itemIcons[i][0], itemIcons[i][1], itemIcons[i][2], iconCoords[i * 2], iconCoords[i * 2 + 1], toolNames[i], toolDescriptions[i]);
|
||||
String locString = String.format("gui.toolstation.%s.desc", tier1Tools[i].getToolName().toLowerCase());
|
||||
addToolButton(itemIconsT1[i][0], itemIconsT1[i][1], itemIconsT1[i][2], iconCoordsT1[i * 2], iconCoordsT1[i * 2 + 1], tier1Tools[i].getLocalizedToolName(), locString);
|
||||
}
|
||||
|
||||
addToolButton(3, 9, 1, new int[] { 0, 10, 0, 13 }, new int[] { 3, 3, 3, 13 }, "Shortbow", "The Shortbow is a ranged weapon. It fires arrows quickly and precisely at its foes.\n\nDraw Speed: Quick\n\nRequired parts:\n- Tool Rod\n- Bowstring\n- Tool Rod");
|
||||
addToolButton(7, 10, 1, new int[] { 11, 0, 12, 13 }, new int[] { 3, 3, 3, 13 }, "Arrow", "Arrows are projectiles usually fired from bows.\n\nRequired parts:\n- Arrowhead\n- Tool Rod\n- Fletching");
|
||||
addTierTwoButton(6, 13, 0, new int[] { 11, 8, 9, 9 }, new int[] { 2, 3, 2, 2 }, "Hammer", "The Hammer is a broad mining tool. It harvests blocks in a wide range and is effective against undead.\n\nNatural Abilities:\nArea of Effect\n- (3x3)\n- Smite\n\nDurability: High");
|
||||
addTierTwoButton(5, 11, 0, new int[] { 6, 8, 9, 9 }, new int[] { 2, 3, 2, 3 }, "Lumber Axe", "The Lumber Axe is a broad chopping tool. It can fell entire trees or gather wood in a wide range.\n\nNatural Abilities:\nArea of Effect\n- Fell Trees\n- (3x3x3)\n\nDurability: Average");
|
||||
addTierTwoButton(5, 12, 0, new int[] { 10, 8, 9, 9 }, new int[] { 2, 3, 2, 3 }, "Excavator", "The Excavator is a broad digging tool. It harvests soil and snow in a wide range.\n\nNatural Ability:\n- Area of Effect\n- (3x3)\n\nDurability: Average");
|
||||
addTierTwoButton(4, 10, 0, new int[] { 8, 8, 9, 8 }, new int[] { 2, 3, 3, 3 }, "Scythe", "The Scythe is a broad reaping tool. It is effective on plants and attacks enemies in a wide range.\n\nNatural Ability:\nArea of Effect\n- (3x3x3)\n\nDurability: Average\nDamage: Low, AoE");
|
||||
addTierTwoButton(5, 7, 1, new int[] { 6, 8, 9, 8 }, new int[] { 3, 3, 2, 3 }, "Cleaver", "The Cleaver is a heavy defensive weapon. It has powerful strikes, but is difficult to wield.\n\nSpecial Ability: Block\nNatural Ability:\n- Beheading\n\nDamage: High\nDurability: Average");
|
||||
addTierTwoButton(5, 8, 1, new int[] { 6, 8, 6, 9 }, new int[] { 2, 3, 2, 3 }, "Battleaxe", "The Battleaxe is a heavy offensive weapon. It is capable of bringing down small trees and can send foes flying.\n\nSpecial Ability: Block\nNatural Abilities:" + "\n- Knockback\n- Area of Effect\n- (1x9)\n\nDamage: Average\nDurability: Average");
|
||||
addToolButton(3, 9, 1, new int[] { 0, 10, 0, 13 }, new int[] { 3, 3, 3, 13 }, TinkerTools.shortbow.getLocalizedToolName(), "gui.toolstation.chisel.desc");
|
||||
addToolButton(7, 10, 1, new int[] { 11, 0, 12, 13 }, new int[] { 3, 3, 3, 13 }, TinkerTools.arrow.getLocalizedToolName(), "gui.toolstation.arrow.desc");
|
||||
|
||||
// tier 2 tools
|
||||
for (int i = 0; i < tier2Tools.length; i++)
|
||||
{
|
||||
String locString = String.format("gui.toolstation.%s.desc", tier2Tools[i].getToolName().toLowerCase());
|
||||
addTierTwoButton(itemIconsT2[i][0], itemIconsT2[i][1], itemIconsT2[i][2], iconCoordsT2[i * 2], iconCoordsT2[i * 2 + 1], tier2Tools[i].getLocalizedToolName(), locString);
|
||||
}
|
||||
}
|
||||
|
||||
void addToolButton (int slotType, int xButton, int yButton, int[] xIcons, int[] yIcons, String title, String body)
|
||||
|
||||
Reference in new issue
Block a user