mirror of
https://github.com/GTNewHorizons/Draconic-Evolution.git
synced 2026-11-21 12:42:15 +00:00
Added config options for count of upgrades for armor
This commit is contained in:
1 parent
64fcc1f2ad
commit
450c7e3d85
4 files changed
+52
-16
No files matched your search
+30
@@ -12,6 +12,8 @@ import net.minecraftforge.common.config.Property;
|
||||
|
||||
public class BalanceConfigHandler
|
||||
{
|
||||
public static final int wyvernArmorMinShieldRecovery = 5;
|
||||
public static final int draconicArmorMinShieldRecovery = 5;
|
||||
public static final int wyvernToolsMinDigAOEUpgradePoints = 1;
|
||||
public static final int wyvernToolsMaxDigAOEUpgradePoints = 2;
|
||||
public static final int wyvernToolsMinDigSpeedUpgradePoints = 4;
|
||||
@@ -101,6 +103,12 @@ public class BalanceConfigHandler
|
||||
public static int grinderExternalEnergyBufferSize = 100000;
|
||||
public static int grinderMaxReceive = 32000;
|
||||
public static int grinderEnergyPerKill = 1000;
|
||||
public static int wyvernArmorMaxCapacityUpgradePoints = 50;
|
||||
public static int wyvernArmorMaxUpgrades = 3;
|
||||
public static int wyvernArmorMaxUpgradePoints = 50;
|
||||
public static int draconicArmorMaxCapacityUpgradePoints = 50;
|
||||
public static int draconicArmorMaxUpgrades = 6;
|
||||
public static int draconicArmorMaxUpgradePoints = 50;
|
||||
public static int wyvernToolsMaxCapacityUpgradePoints = 50;
|
||||
public static int wyvernToolsMaxUpgrades = 3;
|
||||
public static int wyvernToolsMaxUpgradePoints = 50;
|
||||
@@ -136,6 +144,8 @@ public class BalanceConfigHandler
|
||||
config = new Configuration(new File(modConfigurationDirectory, "DraconicEvolution.Balance.cfg"));
|
||||
config.load();
|
||||
config.setCategoryRequiresMcRestart("tweaks", true);
|
||||
config.setCategoryComment("tweaks.armor",
|
||||
"Values in this category may be replaced automatically to prevent problems");
|
||||
config.setCategoryComment("tweaks.tools",
|
||||
"Values in this category may be replaced automatically to prevent problems");
|
||||
config.setCategoryComment("tweaks.weapons",
|
||||
@@ -277,6 +287,26 @@ public class BalanceConfigHandler
|
||||
grinderEnergyPerKill =
|
||||
getInteger("energy.machines", "Mob Grinder: Amount of energy required to kill entity (RF)",
|
||||
grinderEnergyPerKill);
|
||||
wyvernArmorMaxCapacityUpgradePoints = (int) Math.floor((double) (Integer.MAX_VALUE - wyvernArmorBaseStorage) /
|
||||
(double) Math.max(wyvernArmorStoragePerUpgrade, 1)) *
|
||||
EnumUpgrade.RF_CAPACITY.pointConversion;
|
||||
wyvernArmorMaxUpgrades =
|
||||
getInteger("tweaks.armor", "Wyvern Armor: Maximum amount of upgrades", wyvernArmorMaxUpgrades);
|
||||
wyvernArmorMaxUpgradePoints =
|
||||
getInteger("tweaks.armor", "Wyvern Armor: Maximum amount of upgrade points", wyvernArmorMaxUpgradePoints,
|
||||
wyvernArmorMaxUpgrades, Integer.MAX_VALUE);
|
||||
wyvernArmorMaxCapacityUpgradePoints =
|
||||
Math.max(Math.min(wyvernArmorMaxUpgradePoints, wyvernArmorMaxCapacityUpgradePoints), 0);
|
||||
draconicArmorMaxCapacityUpgradePoints = (int) Math.floor(
|
||||
(double) (Integer.MAX_VALUE - draconicArmorBaseStorage) / Math.max(draconicArmorStoragePerUpgrade, 1)) *
|
||||
EnumUpgrade.RF_CAPACITY.pointConversion;
|
||||
draconicArmorMaxUpgrades =
|
||||
getInteger("tweaks.armor", "Draconic Armor: Maximum amount of upgrades", draconicArmorMaxUpgrades);
|
||||
draconicArmorMaxUpgradePoints = getInteger("tweaks.armor", "Draconic Armor: Maximum amount of upgrade points",
|
||||
draconicArmorMaxUpgradePoints, draconicArmorMaxUpgrades,
|
||||
Integer.MAX_VALUE);
|
||||
draconicArmorMaxCapacityUpgradePoints =
|
||||
Math.max(Math.min(draconicArmorMaxUpgradePoints, draconicArmorMaxCapacityUpgradePoints), 0);
|
||||
wyvernToolsMaxCapacityUpgradePoints = (int) Math.floor((double) (Integer.MAX_VALUE - wyvernToolsBaseStorage) /
|
||||
(double) Math.max(wyvernToolsStoragePerUpgrade, 1)) *
|
||||
EnumUpgrade.RF_CAPACITY.pointConversion;
|
||||
|
||||
+11
-5
@@ -428,7 +428,7 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IConfigur
|
||||
|
||||
@Override
|
||||
public int getUpgradeCap(ItemStack itemstack) {
|
||||
return References.MAX_DRACONIC_UPGRADES;
|
||||
return BalanceConfigHandler.draconicArmorMaxUpgrades;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -449,14 +449,20 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IConfigur
|
||||
|
||||
@Override
|
||||
public int getMaxUpgradePoints(int upgradeIndex) {
|
||||
return 50;
|
||||
if (upgradeIndex == EnumUpgrade.RF_CAPACITY.index) {
|
||||
return BalanceConfigHandler.draconicArmorMaxCapacityUpgradePoints;
|
||||
}
|
||||
return BalanceConfigHandler.draconicArmorMaxUpgradePoints;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBaseUpgradePoints(int upgradeIndex) {
|
||||
if (upgradeIndex == EnumUpgrade.RF_CAPACITY.index) return 0;
|
||||
else if (upgradeIndex == EnumUpgrade.SHIELD_CAPACITY.index) return (int)(getProtectionShare() * 25) + (armorType == 2 ? 2 : 0);
|
||||
else if (upgradeIndex == EnumUpgrade.SHIELD_RECOVERY.index) return 5;
|
||||
if (upgradeIndex == EnumUpgrade.SHIELD_CAPACITY.index) {
|
||||
return (int)(getProtectionShare() * 25) + (armorType == 2 ? 2 : 0);
|
||||
}
|
||||
if (upgradeIndex == EnumUpgrade.SHIELD_RECOVERY.index) {
|
||||
return BalanceConfigHandler.draconicArmorMinShieldRecovery;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+11
-5
@@ -338,7 +338,7 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IConfigurab
|
||||
|
||||
@Override
|
||||
public int getUpgradeCap(ItemStack itemstack) {
|
||||
return References.MAX_WYVERN_UPGRADES;
|
||||
return BalanceConfigHandler.wyvernArmorMaxUpgrades;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -359,14 +359,20 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IConfigurab
|
||||
|
||||
@Override
|
||||
public int getMaxUpgradePoints(int upgradeIndex) {
|
||||
return 50;
|
||||
if (upgradeIndex == EnumUpgrade.RF_CAPACITY.index) {
|
||||
return BalanceConfigHandler.wyvernArmorMaxCapacityUpgradePoints;
|
||||
}
|
||||
return BalanceConfigHandler.wyvernArmorMaxUpgradePoints;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBaseUpgradePoints(int upgradeIndex) {
|
||||
if (upgradeIndex == EnumUpgrade.RF_CAPACITY.index) return 0;
|
||||
else if (upgradeIndex == EnumUpgrade.SHIELD_CAPACITY.index) return (int)(getProtectionShare() * 10) + (armorType == 2 ? 1 : 0);
|
||||
else if (upgradeIndex == EnumUpgrade.SHIELD_RECOVERY.index) return 5;
|
||||
if (upgradeIndex == EnumUpgrade.SHIELD_CAPACITY.index) {
|
||||
return (int)(getProtectionShare() * 10) + (armorType == 2 ? 1 : 0);
|
||||
}
|
||||
if (upgradeIndex == EnumUpgrade.SHIELD_RECOVERY.index) {
|
||||
return BalanceConfigHandler.wyvernArmorMinShieldRecovery;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,12 +10,6 @@ public final class References {
|
||||
public static final String GUIFACTORY = "com.brandon3055.draconicevolution.client.gui.DEGUIFactory";
|
||||
public static final String RESOURCESPREFIX = MODID.toLowerCase() + ":";
|
||||
|
||||
|
||||
//======================Tools & Weapons========================//
|
||||
|
||||
public static final int MAX_WYVERN_UPGRADES = 3;
|
||||
public static final int MAX_DRACONIC_UPGRADES = 6;
|
||||
|
||||
//======================Render IDs========================//
|
||||
public static int idTeleporterStand = -1;
|
||||
public static int idPortal = -1;
|
||||
|
||||
Reference in new issue
Block a user