items stats: add option to show weight
This commit is contained in:
@@ -92,6 +92,16 @@ public interface ItemStatConfig extends Config
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showWeight",
|
||||
name = "Show Weight",
|
||||
description = "Show weight in tooltip"
|
||||
)
|
||||
default boolean showWeight()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "colorBetterUncapped",
|
||||
name = "Better (Uncapped)",
|
||||
|
||||
@@ -189,7 +189,10 @@ public class ItemStatOverlay extends Overlay
|
||||
private String buildStatBonusString(ItemStats s)
|
||||
{
|
||||
final StringBuilder b = new StringBuilder();
|
||||
b.append(getChangeString("Weight", s.getWeight(), true, false));
|
||||
if (config.showWeight())
|
||||
{
|
||||
b.append(getChangeString("Weight", s.getWeight(), true, false));
|
||||
}
|
||||
|
||||
ItemStats other = null;
|
||||
final ItemEquipmentStats currentEquipment = s.getEquipment();
|
||||
|
||||
Reference in New Issue
Block a user