فهرست منبع

Changed config validation for UnlockLevels, they can now also be 0

Closes #1790
TfT_02 11 سال پیش
والد
کامیت
e6e90954a9
2فایلهای تغییر یافته به همراه23 افزوده شده و 22 حذف شده
  1. 1 0
      Changelog.txt
  2. 22 22
      src/main/java/com/gmail/nossr50/config/AdvancedConfig.java

+ 1 - 0
Changelog.txt

@@ -36,6 +36,7 @@ Version 1.4.08-dev
  ! Changed AxesCritical to CriticalHit in config file
  ! Changed AxesCritical to CriticalHit in config file
  ! Changed several secondary ability permissions(deprecated versions still exist)
  ! Changed several secondary ability permissions(deprecated versions still exist)
  ! Changed /ptp config setting, Commands.ptp.Confirm_Required is now Commands.ptp.Accept.Required
  ! Changed /ptp config setting, Commands.ptp.Confirm_Required is now Commands.ptp.Accept.Required
+ ! Changed config validation for UnlockLevels, they can now also be 0
  - Removed /stats alias for /mcstats
  - Removed /stats alias for /mcstats
 
 
 Version 1.4.07
 Version 1.4.07

+ 22 - 22
src/main/java/com/gmail/nossr50/config/AdvancedConfig.java

@@ -239,12 +239,12 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
             reason.add("Skills.Fishing.FishermansDiet.RankChange should be at least 1!");
             reason.add("Skills.Fishing.FishermansDiet.RankChange should be at least 1!");
         }
         }
 
 
-        if (getIceFishingUnlockLevel() < 1) {
-            reason.add("Skills.Fishing.IceFishing.UnlockLevel should be at least 1!");
+        if (getIceFishingUnlockLevel() < 0) {
+            reason.add("Skills.Fishing.IceFishing.UnlockLevel should be at least 0!");
         }
         }
 
 
-        if (getMasterAnglerUnlockLevel() < 1) {
-            reason.add("Skills.Fishing.MasterAngler.UnlockLevel should be at least 1!");
+        if (getMasterAnglerUnlockLevel() < 0) {
+            reason.add("Skills.Fishing.MasterAngler.UnlockLevel should be at least 0!");
         }
         }
 
 
         if (getMasterAnglerBoatModifier() < 1) {
         if (getMasterAnglerBoatModifier() < 1) {
@@ -378,8 +378,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
             reason.add("Skills.Repair.SuperRepair.MaxBonusLevel should be at least 1!");
             reason.add("Skills.Repair.SuperRepair.MaxBonusLevel should be at least 1!");
         }
         }
 
 
-        if (getSalvageUnlockLevel() < 1) {
-            reason.add("Skills.Repair.Salvage.UnlockLevel should be at least 1!");
+        if (getSalvageUnlockLevel() < 0) {
+            reason.add("Skills.Repair.Salvage.UnlockLevel should be at least 0!");
         }
         }
 
 
         List<ArcaneForging.Tier> arcaneForgingTierList = Arrays.asList(ArcaneForging.Tier.values());
         List<ArcaneForging.Tier> arcaneForgingTierList = Arrays.asList(ArcaneForging.Tier.values());
@@ -431,8 +431,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
             reason.add("Skills.Smelting.SecondSmelt.ChanceMax should be at least 1!");
             reason.add("Skills.Smelting.SecondSmelt.ChanceMax should be at least 1!");
         }
         }
 
 
-        if (getFluxMiningUnlockLevel() < 1) {
-            reason.add("Skills.Smelting.FluxMining.UnlockLevel should be at least 1!");
+        if (getFluxMiningUnlockLevel() < 0) {
+            reason.add("Skills.Smelting.FluxMining.UnlockLevel should be at least 0!");
         }
         }
 
 
         if (getFluxMiningChance() < 1) {
         if (getFluxMiningChance() < 1) {
@@ -522,40 +522,40 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
             reason.add("Skills.Taming.Gore.Modifier should be at least 1!");
             reason.add("Skills.Taming.Gore.Modifier should be at least 1!");
         }
         }
 
 
-        if (getFastFoodUnlock() < 1) {
-            reason.add("Skills.Taming.FastFood.UnlockLevel should be at least 1!");
+        if (getFastFoodUnlock() < 0) {
+            reason.add("Skills.Taming.FastFood.UnlockLevel should be at least 0!");
         }
         }
 
 
         if (getFastFoodChance() < 1) {
         if (getFastFoodChance() < 1) {
             reason.add("Skills.Taming.FastFood.Chance should be at least 1!");
             reason.add("Skills.Taming.FastFood.Chance should be at least 1!");
         }
         }
 
 
-        if (getEnviromentallyAwareUnlock() < 1) {
-            reason.add("Skills.Taming.EnvironmentallyAware.UnlockLevel should be at least 1!");
+        if (getEnviromentallyAwareUnlock() < 0) {
+            reason.add("Skills.Taming.EnvironmentallyAware.UnlockLevel should be at least 0!");
         }
         }
 
 
-        if (getThickFurUnlock() < 1) {
-            reason.add("Skills.Taming.ThickFur.UnlockLevel should be at least 1!");
+        if (getThickFurUnlock() < 0) {
+            reason.add("Skills.Taming.ThickFur.UnlockLevel should be at least 0!");
         }
         }
 
 
         if (getThickFurModifier() < 1) {
         if (getThickFurModifier() < 1) {
             reason.add("Skills.Taming.ThickFur.Modifier should be at least 1!");
             reason.add("Skills.Taming.ThickFur.Modifier should be at least 1!");
         }
         }
 
 
-        if (getHolyHoundUnlock() < 1) {
-            reason.add("Skills.Taming.HolyHound.UnlockLevel should be at least 1!");
+        if (getHolyHoundUnlock() < 0) {
+            reason.add("Skills.Taming.HolyHound.UnlockLevel should be at least 0!");
         }
         }
 
 
-        if (getShockProofUnlock() < 1) {
-            reason.add("Skills.Taming.ShockProof.UnlockLevel should be at least 1!");
+        if (getShockProofUnlock() < 0) {
+            reason.add("Skills.Taming.ShockProof.UnlockLevel should be at least 0!");
         }
         }
 
 
         if (getShockProofModifier() < 1) {
         if (getShockProofModifier() < 1) {
             reason.add("Skills.Taming.ShockProof.Modifier should be at least 1!");
             reason.add("Skills.Taming.ShockProof.Modifier should be at least 1!");
         }
         }
 
 
-        if (getSharpenedClawsUnlock() < 1) {
-            reason.add("Skills.Taming.SharpenedClaws.UnlockLevel should be at least 1!");
+        if (getSharpenedClawsUnlock() < 0) {
+            reason.add("Skills.Taming.SharpenedClaws.UnlockLevel should be at least 0!");
         }
         }
 
 
         if (getSharpenedClawsBonus() < 1) {
         if (getSharpenedClawsBonus() < 1) {
@@ -608,8 +608,8 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
         }
         }
 
 
         /* WOODCUTTING */
         /* WOODCUTTING */
-        if (getLeafBlowUnlockLevel() < 1) {
-            reason.add("Skills.Woodcutting.LeafBlower.UnlockLevel should be at least 1!");
+        if (getLeafBlowUnlockLevel() < 0) {
+            reason.add("Skills.Woodcutting.LeafBlower.UnlockLevel should be at least 0!");
         }
         }
 
 
         if (getMaxChance(SecondaryAbility.WOODCUTTING_DOUBLE_DROPS) < 1) {
         if (getMaxChance(SecondaryAbility.WOODCUTTING_DOUBLE_DROPS) < 1) {