Skip to content

Commit a696f66

Browse files
committed
ofText() RobertSkalko#2
1 parent 6a854b6 commit a696f66

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/main/java/com/robertx22/age_of_exile/saveclasses/item_classes/GearTooltipUtils.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,9 @@ public static void BuildTooltip(GearItemData gear, ItemStack stack, List<Compone
146146
if (gear.GetBaseGearType().getGearSlot().weapon_data.damage_multiplier > 0) {
147147
int cost = (int) Energy.getInstance().scale(ModType.FLAT, gear.GetBaseGearType().getGearSlot().weapon_data.energy_cost_per_swing, data.getLevel());
148148
int permob = (int) Energy.getInstance().scale(ModType.FLAT, gear.GetBaseGearType().getGearSlot().weapon_data.energy_cost_per_mob_attacked, data.getLevel());
149-
150-
tip.add(ExileText.ofText("Energy Cost: " + cost + " + " + permob + " Per mob, " + "x" + (gear.GetBaseGearType().getGearSlot().getBasicDamageMulti() * 100) / 100F + " Dmg").format(ChatFormatting.GREEN).get());
149+
float damageFactor = (gear.GetBaseGearType().getGearSlot().getBasicDamageMulti() * 100) / 100F;
150+
151+
tip.add(ExileText.ofText(Words.Energy_Cost_Per_Mob.locName(cost, permob, damageFactor)).format(ChatFormatting.GREEN).get());
151152
}
152153
}
153154

src/main/java/com/robertx22/age_of_exile/uncommon/localization/Words.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ public enum Words implements IAutoLocName {
217217
Use_Tip("[Drag onto gear to use]"),
218218
Stat_Req("%1$s Min: "),
219219
Potential("Potential: "),
220-
Quality("Quality: ");
220+
Quality("Quality: "),
221+
Energy_Cost_Per_Mob("Energy Cost: %1$s + %2$s Per mob, x %3$s Dmg");
221222

222223

223224
private String localization = "";

0 commit comments

Comments
 (0)