Fixing styling on Repair

This commit is contained in:
nossr50 2019-01-21 11:31:02 -08:00
parent e1f11b4059
commit ea0ad38fec
3 changed files with 18 additions and 15 deletions

View File

@ -134,24 +134,23 @@ public class RepairCommand extends SkillCommand {
List<String> messages = new ArrayList<String>(); List<String> messages = new ArrayList<String>();
if (canMasterRepair) { if (canMasterRepair) {
messages.add(LocaleLoader.getString("Repair.Skills.Mastery", repairMasteryBonus)); messages.add(getStatMessage(false, true, SubSkillType.REPAIR_REPAIR_MASTERY, repairMasteryBonus));
} }
if (canSuperRepair) { if (canSuperRepair) {
messages.add(LocaleLoader.getString("Repair.Skills.Super.Chance", superRepairChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", superRepairChanceLucky) : "")); messages.add(getStatMessage(SubSkillType.REPAIR_SUPER_REPAIR, superRepairChance)
+ (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", superRepairChanceLucky) : ""));
} }
if (canArcaneForge) { if (canArcaneForge) {
RepairManager repairManager = UserManager.getPlayer(player).getRepairManager(); RepairManager repairManager = UserManager.getPlayer(player).getRepairManager();
messages.add(LocaleLoader.getString("Repair.Arcane.Rank", repairManager.getArcaneForgingRank(), RankUtils.getHighestRank(SubSkillType.REPAIR_ARCANE_FORGING))); messages.add(getStatMessage(false, true, SubSkillType.REPAIR_ARCANE_FORGING, RankUtils.getHighestRankStr(SubSkillType.REPAIR_ARCANE_FORGING)));
if (ArcaneForging.arcaneForgingEnchantLoss) { if (ArcaneForging.arcaneForgingEnchantLoss || ArcaneForging.arcaneForgingDowngrades) {
messages.add(LocaleLoader.getString("Repair.Arcane.Chance.Success", (arcaneBypass ? 100 : repairManager.getKeepEnchantChance()))); messages.add(getStatMessage(true, true, SubSkillType.REPAIR_ARCANE_FORGING,
} String.valueOf(arcaneBypass ? 100 : repairManager.getKeepEnchantChance()),
String.valueOf(arcaneBypass ? 0 : repairManager.getDowngradeEnchantChance()))); //Jesus those parentheses
if (ArcaneForging.arcaneForgingDowngrades) {
messages.add(LocaleLoader.getString("Repair.Arcane.Chance.Downgrade", (arcaneBypass ? 0 : repairManager.getDowngradeEnchantChance())));
} }
} }

View File

@ -329,6 +329,11 @@ public class RankUtils {
return subSkillType.getNumRanks(); return subSkillType.getNumRanks();
} }
public static String getHighestRankStr(SubSkillType subSkillType)
{
return String.valueOf(subSkillType.getNumRanks());
}
/** /**
* Get the highest rank of a subskill * Get the highest rank of a subskill
* @param abstractSubSkill target subskill * @param abstractSubSkill target subskill

View File

@ -327,12 +327,16 @@ Repair.SubSkill.StoneRepair.Name=Stone Repair ({0}+ SKILL)
Repair.SubSkill.StoneRepair.Description=Repair Stone Tools Repair.SubSkill.StoneRepair.Description=Repair Stone Tools
Repair.SubSkill.RepairMastery.Name=Repair Mastery Repair.SubSkill.RepairMastery.Name=Repair Mastery
Repair.SubSkill.RepairMastery.Description=Increased repair amount Repair.SubSkill.RepairMastery.Description=Increased repair amount
Repair.SubSkill.RepairMastery.Stat=Repair Mastery: [[GREEN]]Extra {0} durability restored
Repair.SubSkill.SuperRepair.Name=Super Repair Repair.SubSkill.SuperRepair.Name=Super Repair
Repair.SubSkill.SuperRepair.Description=Double effectiveness Repair.SubSkill.SuperRepair.Description=Double effectiveness
Repair.SubSkill.SuperRepair.Stat=Super Repair Chance
Repair.SubSkill.DiamondRepair.Name=Diamond Repair ({0}+ SKILL) Repair.SubSkill.DiamondRepair.Name=Diamond Repair ({0}+ SKILL)
Repair.SubSkill.DiamondRepair.Description=Repair Diamond Tools & Armor Repair.SubSkill.DiamondRepair.Description=Repair Diamond Tools & Armor
Repair.SubSkill.ArcaneForging.Name=Arcane Forging Repair.SubSkill.ArcaneForging.Name=Arcane Forging
Repair.SubSkill.ArcaneForging.Description=Repair magic items Repair.SubSkill.ArcaneForging.Description=Repair magic items
Repair.SubSkill.ArcaneForging.Stat=Arcane Forging: [[YELLOW]]Rank {0}/{1}
Repair.SubSkill.ArcaneForging.Stat.Extra=[[DARK_AQUA]]Arcane Forging Odds:[[GRAY]] Success [[GREEN]]{0}[[GRAY]]%, Failure [[RED]]{1}[[GRAY]]%
Repair.Error=[[DARK_RED]]mcMMO encountered an error attempting to repair this item! Repair.Error=[[DARK_RED]]mcMMO encountered an error attempting to repair this item!
Repair.Listener.Anvil=[[DARK_RED]]You have placed an anvil, anvils can repair tools and armor. Repair.Listener.Anvil=[[DARK_RED]]You have placed an anvil, anvils can repair tools and armor.
Repair.Listener=Repair: Repair.Listener=Repair:
@ -341,21 +345,16 @@ Repair.Skills.AdeptDiamond=[[DARK_RED]]You're not skilled enough to repair Diamo
Repair.Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold. Repair.Skills.AdeptGold=[[DARK_RED]]You're not skilled enough to repair Gold.
Repair.Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron. Repair.Skills.AdeptIron=[[DARK_RED]]You're not skilled enough to repair Iron.
Repair.Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone. Repair.Skills.AdeptStone=[[DARK_RED]]You're not skilled enough to repair Stone.
Repair.Skills.Adept=You must be level [[YELLOW]]{0}[[RED]] to repair [[YELLOW]]{1} Repair.Skills.Adept=[[RED]]You must be level [[YELLOW]]{0}[[RED]] to repair [[YELLOW]]{1}
Repair.Skills.FeltEasy=[[GRAY]]That felt easy. Repair.Skills.FeltEasy=[[GRAY]]That felt easy.
Repair.Skills.FullDurability=[[GRAY]]That is at full durability. Repair.Skills.FullDurability=[[GRAY]]That is at full durability.
Repair.Skills.Mastery=Repair Mastery: [[YELLOW]]Extra {0} durability restored
Repair.Skills.StackedItems=[[DARK_RED]]You can't repair stacked items. Repair.Skills.StackedItems=[[DARK_RED]]You can't repair stacked items.
Repair.Skills.Super.Chance=Super Repair Chance: [[YELLOW]]{0}
Repair.Pretty.Name=Repair Repair.Pretty.Name=Repair
#Arcane Forging #Arcane Forging
Repair.Arcane.Chance.Downgrade=[[GRAY]]AF Downgrade Chance: [[YELLOW]]{0}%
Repair.Arcane.Chance.Success=[[GRAY]]AF Success Rate: [[YELLOW]]{0}%
Repair.Arcane.Downgrade=Arcane power has decreased for this item. Repair.Arcane.Downgrade=Arcane power has decreased for this item.
Repair.Arcane.Fail=Arcane power has permanently left the item. Repair.Arcane.Fail=Arcane power has permanently left the item.
Repair.Arcane.Lost=You were not skilled enough to keep any enchantments. Repair.Arcane.Lost=You were not skilled enough to keep any enchantments.
Repair.Arcane.Perfect=[[GREEN]]You have sustained the arcane energies in this item. Repair.Arcane.Perfect=[[GREEN]]You have sustained the arcane energies in this item.
Repair.Arcane.Rank=Arcane Forging: [[YELLOW]]Rank {0}/{1}
#SALVAGE #SALVAGE
Salvage.Pretty.Name=Salvage Salvage.Pretty.Name=Salvage
Salvage.SubSkill.UnderstandingTheArt.Name=Understanding The Art Salvage.SubSkill.UnderstandingTheArt.Name=Understanding The Art