From e1f11b4059dfa065cb668675f1a6e7a09beee612 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Mon, 21 Jan 2019 11:14:50 -0800 Subject: [PATCH] Fixing styling on Mining --- .../commands/skills/MiningCommand.java | 31 +++++++------------ .../resources/locale/locale_en_US.properties | 11 ++++--- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java index 1bf744e76..075872ad2 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java @@ -108,37 +108,30 @@ public class MiningCommand extends SkillCommand { List messages = new ArrayList(); if (canDoubleDrop) { - messages.add(LocaleLoader.getString("Mining.Effect.DropChance", doubleDropChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", doubleDropChanceLucky) : "")); + messages.add(getStatMessage(SubSkillType.HERBALISM_DOUBLE_DROPS, doubleDropChance) + + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", doubleDropChanceLucky) : "")); + //messages.add(LocaleLoader.getString("Mining.Effect.DropChance", doubleDropChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", doubleDropChanceLucky) : "")); } if (canSuperBreaker) { - messages.add(LocaleLoader.getString("Mining.Ability.Length", superBreakerLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", superBreakerLengthEndurance) : "")); + messages.add(getStatMessage(SubSkillType.MINING_SUPER_BREAKER, superBreakerLength) + + (isLucky ? LocaleLoader.getString("Perks.ActivationTime.Bonus", superBreakerLengthEndurance) : "")); + //messages.add(LocaleLoader.getString("Mining.Ability.Length", superBreakerLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", superBreakerLengthEndurance) : "")); } if (canBlast) { - messages.add(LocaleLoader.getString("Mining.Blast.Rank", blastMiningRank, RankUtils.getHighestRank(SubSkillType.MINING_BLAST_MINING), LocaleLoader.getString("Mining.Blast.Effect", oreBonus, debrisReduction, bonusTNTDrops))); + messages.add(getStatMessage(false, true, SubSkillType.MINING_BLAST_MINING, String.valueOf(blastMiningRank), String.valueOf(RankUtils.getHighestRank(SubSkillType.MINING_BLAST_MINING)), LocaleLoader.getString("Mining.Blast.Effect", oreBonus, debrisReduction, bonusTNTDrops))); + //messages.add(LocaleLoader.getString("Mining.Blast.Rank", blastMiningRank, RankUtils.getHighestRank(SubSkillType.MINING_BLAST_MINING), LocaleLoader.getString("Mining.Blast.Effect", oreBonus, debrisReduction, bonusTNTDrops))); } if (canBiggerBombs) { - int unlockLevel = BlastMining.getBiggerBombsUnlockLevel(); - - if (skillValue < unlockLevel) { - messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.1", unlockLevel))); - } - else { - messages.add(LocaleLoader.getString("Mining.Blast.Radius.Increase", blastRadiusIncrease)); - } + messages.add(getStatMessage(true, true, SubSkillType.MINING_BLAST_MINING, String.valueOf(blastRadiusIncrease))); + //messages.add(LocaleLoader.getString("Mining.Blast.Radius.Increase", blastRadiusIncrease)); } if (canDemoExpert) { - int unlockLevel = BlastMining.getDemolitionExpertUnlockLevel(); - - if (skillValue < unlockLevel) { - messages.add(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Mining.Ability.Locked.2", unlockLevel))); - } - else { - messages.add(LocaleLoader.getString("Mining.Effect.Decrease", blastDamageDecrease)); - } + messages.add(getStatMessage(SubSkillType.MINING_DEMOLITIONS_EXPERTISE, blastDamageDecrease)); + //messages.add(LocaleLoader.getString("Mining.Effect.Decrease", blastDamageDecrease)); } return messages; diff --git a/src/main/resources/locale/locale_en_US.properties b/src/main/resources/locale/locale_en_US.properties index 44a48e753..584eb8423 100644 --- a/src/main/resources/locale/locale_en_US.properties +++ b/src/main/resources/locale/locale_en_US.properties @@ -282,7 +282,6 @@ Herbalism.Skills.GTe.Refresh=[[GREEN]]Your [[YELLOW]]Green Terra [[GREEN]]abilit Herbalism.Skills.GTe.Other.Off=Green Terra[[GREEN]] has worn off for [[YELLOW]]{0} Herbalism.Skills.GTe.Other.On=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Green Terra! #MINING -Mining.Ability.Length=Super Breaker Length: [[YELLOW]]{0}s Mining.Ability.Locked.0=LOCKED UNTIL {0}+ SKILL (BLAST MINING) Mining.Ability.Locked.1=LOCKED UNTIL {0}+ SKILL (BIGGER BOMBS) Mining.Ability.Locked.2=LOCKED UNTIL {0}+ SKILL (DEMOLITIONS EXPERTISE) @@ -290,16 +289,20 @@ Mining.Ability.Lower=[[GRAY]]You lower your Pickaxe. Mining.Ability.Ready=[[DARK_AQUA]]You [[GOLD]]ready[[DARK_AQUA]] your pickaxe. Mining.SubSkill.SuperBreaker.Name=Super Breaker Mining.SubSkill.SuperBreaker.Description=Speed+, Triple Drop Chance +Mining.SubSkill.SuperBreaker.Stat=Super Breaker Length Mining.SubSkill.DoubleDrops.Name=Double Drops Mining.SubSkill.DoubleDrops.Description=Double the normal loot +Mining.SubSkill.DoubleDrops.Stat=Double Drop Chance: [[YELLOW]]{0} Mining.SubSkill.BlastMining.Name=Blast Mining Mining.SubSkill.BlastMining.Description=Bonuses to mining with TNT +Mining.SubSkill.BlastMining.Stat=Blast Mining:[[GREEN]] Rank {0}/{1} [[GRAY]]({2}) +Mining.SubSkill.BlastMining.Stat.Extra=Blast Radius Increase: [[GREEN]]+{0} Mining.SubSkill.BiggerBombs.Name=Bigger Bombs Mining.SubSkill.BiggerBombs.Description=Increases TNT explosion radius Mining.SubSkill.DemolitionsExpertise.Name=Demolitions Expertise Mining.SubSkill.DemolitionsExpertise.Description=Decreases damage from TNT explosions -Mining.Effect.Decrease=Demolitions Expert Damage Decrease: [[YELLOW]]{0} -Mining.Effect.DropChance=Double Drop Chance: [[YELLOW]]{0} +Mining.SubSkill.DemolitionsExpertise.Stat=Demolitions Expert Damage Decrease + Mining.Listener=Mining: Mining.SkillName=MINING Mining.Skills.SuperBreaker.Off=**Super Breaker has worn off** @@ -311,8 +314,6 @@ Mining.Skills.SuperBreaker.Refresh=[[GREEN]]Your [[YELLOW]]Super Breaker [[GREEN Mining.Blast.Boom=[[GRAY]]**BOOM** Mining.Blast.Cooldown= Mining.Blast.Effect=+{0} ore yield, -{1} debris yield, {2}x drops -Mining.Blast.Radius.Increase=Blast Radius Increase: [[YELLOW]]+{0} -Mining.Blast.Rank=Blast Mining: [[YELLOW]] Rank {0}/{1} [[GRAY]]({2}) Mining.Blast.Other.On=[[GREEN]]{0}[[DARK_GREEN]] has used [[RED]]Blast Mining! Mining.Blast.Refresh=[[GREEN]]Your [[YELLOW]]Blast Mining [[GREEN]]ability is refreshed! #REPAIR