Use rank names instead of numbers

This commit is contained in:
yrsegal@gmail.com 2022-05-31 23:02:04 -04:00
parent dbe83eb140
commit 3ee9d8cd94
4 changed files with 23 additions and 7 deletions

View file

@ -81,8 +81,13 @@ public class BrainsweepProcessor implements IComponentProcessor {
return IVariable.wrap(out);
}
case "minLevel" -> {
return IVariable.wrap(
I18n.get("hexcasting.tooltip.brainsweep.min_level", this.recipe.villagerIn().minLevel()));
var minLevel = this.recipe.villagerIn().minLevel();
if (minLevel == 5)
return IVariable.wrap(I18n.get("hexcasting.tooltip.brainsweep.level",
I18n.get("merchant.level." + minLevel)));
else
return IVariable.wrap(I18n.get("hexcasting.tooltip.brainsweep.min_level",
I18n.get("merchant.level." + minLevel)));
}
default -> {
return null;

View file

@ -126,7 +126,8 @@
"hexcasting.tooltip.brainsweep.profession.any": "Any Profession",
"hexcasting.tooltip.brainsweep.biome": "Biome: %s",
"hexcasting.tooltip.brainsweep.biome.any": "Any Biome",
"hexcasting.tooltip.brainsweep.min_level": "Level %d or higher",
"hexcasting.tooltip.brainsweep.min_level": "%s rank or higher",
"hexcasting.tooltip.brainsweep.level": "%s rank",
"hexcasting.spelldata.onitem": "Contains: %s",
"hexcasting.spelldata.anything": "Anything",
"hexcasting.spelldata.entity.whoknows": "An Entity (this should only show up if this was stored before the 0.5.0 update, use Scribe's Reflection, Scribe's Gambit to fix)",

View file

@ -96,8 +96,13 @@ public class VillagerWidget extends Widget {
new TranslatableComponent(biomeKey)));
}
tooltip.add(new TranslatableComponent("hexcasting.tooltip.brainsweep.min_level",
villager.minLevel()));
var minLevel = villager.minLevel();
if (minLevel == 5)
tooltip.add(new TranslatableComponent("hexcasting.tooltip.brainsweep.level",
new TranslatableComponent("merchant.level." + minLevel)));
else
tooltip.add(new TranslatableComponent("hexcasting.tooltip.brainsweep.min_level",
new TranslatableComponent("merchant.level." + minLevel)));
return Tooltip.create(mouse, tooltip);
}

View file

@ -94,8 +94,13 @@ public class BrainsweepRecipeCategory implements IRecipeCategory<BrainsweepRecip
new TranslatableComponent(biomeKey)));
}
tooltip.add(new TranslatableComponent("hexcasting.tooltip.brainsweep.min_level",
recipe.villagerIn().minLevel()));
var minLevel = recipe.villagerIn().minLevel();
if (minLevel == 5)
tooltip.add(new TranslatableComponent("hexcasting.tooltip.brainsweep.level",
new TranslatableComponent("merchant.level." + minLevel)));
else
tooltip.add(new TranslatableComponent("hexcasting.tooltip.brainsweep.min_level",
new TranslatableComponent("merchant.level." + minLevel)));
return tooltip;
}