More arrow tags and display fixes

This commit is contained in:
Bernhard Bonigl committed 2014-10-19 16:23:01 +02:00
1 parent 1194d60678
commit 11fcf21eb6
8 files changed
+52 -19

No files matched your search

@@ -328,24 +328,24 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IMo
int binding = tags.getCompoundTag("InfiTool").getInteger("Accessory");
int extra = tags.getCompoundTag("InfiTool").getInteger("Extra");
String headName = getAbilityNameForType(head);
String headName = getAbilityNameForType(head, 0);
if (!headName.equals(""))
list.add(getStyleForType(head) + headName);
String handleName = getAbilityNameForType(handle);
String handleName = getAbilityNameForType(handle, 1);
if (!handleName.equals("") && handle != head)
list.add(getStyleForType(handle) + handleName);
if (getPartAmount() >= 3)
{
String bindingName = getAbilityNameForType(binding);
String bindingName = getAbilityNameForType(binding, 2);
if (!bindingName.equals("") && binding != head && binding != handle)
list.add(getStyleForType(binding) + bindingName);
}
if (getPartAmount() >= 4)
{
String extraName = getAbilityNameForType(extra);
String extraName = getAbilityNameForType(extra, 3);
if (!extraName.equals("") && extra != head && extra != handle && extra != binding)
list.add(getStyleForType(extra) + extraName);
}
@@ -386,7 +386,7 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IMo
/**
* Returns the localized name of the materials ability. Only use this for display purposes, not for logic.
*/
public String getAbilityNameForType (int type)
public String getAbilityNameForType (int type, int part)
{
return TConstructRegistry.getMaterial(type).ability();
}