2013-07-26 21:18:53 -07:00
|
|
|
package tconstruct.library.tools;
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Dynamic substitute for an enum. It carries a lot of information
|
|
|
|
|
*/
|
2014-01-08 22:39:27 -05:00
|
|
|
public class TToolMaterial
|
2013-07-26 21:18:53 -07:00
|
|
|
{
|
2014-02-16 14:23:50 -05:00
|
|
|
// mining level, durability, mining speed, baseDamage, handle modifier,
|
|
|
|
|
// Reinforced level, shoddy/spiny level, color/style on name
|
2013-07-26 21:18:53 -07:00
|
|
|
|
|
|
|
|
public final String materialName;
|
|
|
|
|
public final String displayName;
|
|
|
|
|
public final int harvestLevel;
|
|
|
|
|
public final int durability;
|
|
|
|
|
public final int miningspeed; // <-- divided by 100
|
|
|
|
|
public final int attack;
|
|
|
|
|
public final float handleModifier;
|
|
|
|
|
public final int reinforced;
|
|
|
|
|
public final float stonebound;
|
|
|
|
|
public final String tipStyle;
|
|
|
|
|
public final String ability;
|
|
|
|
|
|
2014-01-08 22:39:27 -05:00
|
|
|
public TToolMaterial(String name, int level, int durability, int speed, int damage, float handle, int reinforced, float stonebound, String style, String ability)
|
2013-07-26 21:18:53 -07:00
|
|
|
{
|
|
|
|
|
this(name, name + " ", level, durability, speed, damage, handle, reinforced, stonebound, style, ability);
|
|
|
|
|
}
|
|
|
|
|
|
2014-01-08 22:39:27 -05:00
|
|
|
public TToolMaterial(String name, String displayName, int level, int durability, int speed, int damage, float handle, int reinforced, float stonebound, String style, String ability)
|
2013-07-26 21:18:53 -07:00
|
|
|
{
|
|
|
|
|
this.materialName = name;
|
|
|
|
|
this.displayName = displayName;
|
|
|
|
|
this.harvestLevel = level;
|
|
|
|
|
this.durability = durability;
|
|
|
|
|
this.miningspeed = speed;
|
|
|
|
|
this.attack = damage;
|
|
|
|
|
this.handleModifier = handle;
|
|
|
|
|
this.reinforced = reinforced;
|
|
|
|
|
this.stonebound = stonebound;
|
|
|
|
|
this.tipStyle = style;
|
|
|
|
|
this.ability = ability;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String name ()
|
|
|
|
|
{
|
|
|
|
|
return materialName;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int durability ()
|
|
|
|
|
{
|
|
|
|
|
return this.durability;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int toolSpeed ()
|
|
|
|
|
{
|
|
|
|
|
return this.miningspeed;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int attack ()
|
|
|
|
|
{
|
|
|
|
|
return this.attack;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int harvestLevel ()
|
|
|
|
|
{
|
|
|
|
|
return this.harvestLevel;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float handleDurability ()
|
|
|
|
|
{
|
|
|
|
|
return this.handleModifier;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int reinforced ()
|
|
|
|
|
{
|
|
|
|
|
return this.reinforced;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public float shoddy ()
|
|
|
|
|
{
|
|
|
|
|
return this.stonebound;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String style ()
|
|
|
|
|
{
|
|
|
|
|
return this.tipStyle;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String ability ()
|
|
|
|
|
{
|
|
|
|
|
return this.ability;
|
|
|
|
|
}
|
|
|
|
|
}
|