From 7b1f08048cac95ebc1ac880a3103f51bcc8364bb Mon Sep 17 00:00:00 2001 From: OneEyeMaker Date: Mon, 25 Sep 2017 09:50:48 +0300 Subject: [PATCH] Added configuration for Batteries --- .../mod/config/values/ConfigIntListValues.java | 4 +++- .../actuallyadditions/mod/items/InitItems.java | 13 ++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntListValues.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntListValues.java index 2aef0c35e..5c7a17c28 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntListValues.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntListValues.java @@ -19,7 +19,9 @@ public enum ConfigIntListValues{ OIL_POWER("Oil Gen: Power Values", ConfigCategories.MACHINE_VALUES, new int[]{40, 80, 100, 120}, "The amount of power that the 4 tiers of oils generate (in order)"), OIL_TIME("Oil Gen: Time Values", ConfigCategories.MACHINE_VALUES, new int[]{100, 120, 280, 400}, "The amount of time that the 4 tiers of oils work for (in order)"), - DRILL_AUGMENTS_ENERGY_USE("Drill: Energy Use Per Augment", ConfigCategories.TOOL_ENERGY_VALUES, new int[]{50, 75, 175, 100, 40, 80, 10, 30, 0}, "Additional amount of energy Drill Augments use per mined block. Order of augments: Speed I, Speed II, Speed III, Silk Touch, Fortune I, Fortune II, Mining I, Mining II, Block Placing"); + DRILL_AUGMENTS_ENERGY_USE("Drill: Energy Use Per Augment", ConfigCategories.TOOL_ENERGY_VALUES, new int[]{50, 75, 175, 100, 40, 80, 10, 30, 0}, "Additional amount of energy Drill Augments use per mined block. Order of augments: Speed I, Speed II, Speed III, Silk Touch, Fortune I, Fortune II, Mining I, Mining II, Block Placing"), + BATTERIES_ENERGY_CAPACITY("Batteries: Energy Capacity Per Tier", ConfigCategories.TOOL_ENERGY_VALUES, new int[]{200000, 350000, 600000, 1000000, 2000000}, "Amount of energy each tier of Batteries can store."), + BATTERIES_ENERGY_TRANSFER("Batteries: Energy Transfer Rate Per Tier", ConfigCategories.TOOL_ENERGY_VALUES, new int[]{1000, 5000, 10000, 30000, 100000}, "Amount of energy each tier of Batteries can send or receive."); public final String name; public final String category; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitItems.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitItems.java index 54c0b9615..c0f8313eb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitItems.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/InitItems.java @@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks; +import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntListValues; import de.ellpeck.actuallyadditions.mod.items.base.*; import de.ellpeck.actuallyadditions.mod.items.lens.ItemLens; import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals; @@ -248,11 +249,13 @@ public final class InitItems{ itemTeleStaff = new ItemTeleStaff("item_tele_staff"); itemWingsOfTheBats = new ItemWingsOfTheBats("item_wings_of_the_bats"); itemDrill = new ItemDrill("item_drill"); - itemBattery = new ItemBattery("item_battery", 200000, 1000); - itemBatteryDouble = new ItemBattery("item_battery_double", 350000, 5000); - itemBatteryTriple = new ItemBattery("item_battery_triple", 600000, 10000); - itemBatteryQuadruple = new ItemBattery("item_battery_quadruple", 1000000, 30000); - itemBatteryQuintuple = new ItemBattery("item_battery_quintuple", 2000000, 100000); + int[] batteriesEnergyCapacity = ConfigIntListValues.BATTERIES_ENERGY_CAPACITY.getValue(); + int[] batteriesEnergyTransfer = ConfigIntListValues.BATTERIES_ENERGY_TRANSFER.getValue(); + itemBattery = new ItemBattery("item_battery", batteriesEnergyCapacity[0], batteriesEnergyTransfer[0]); + itemBatteryDouble = new ItemBattery("item_battery_double", batteriesEnergyCapacity[1], batteriesEnergyTransfer[1]); + itemBatteryTriple = new ItemBattery("item_battery_triple", batteriesEnergyCapacity[2], batteriesEnergyTransfer[2]); + itemBatteryQuadruple = new ItemBattery("item_battery_quadruple", batteriesEnergyCapacity[3], batteriesEnergyTransfer[3]); + itemBatteryQuintuple = new ItemBattery("item_battery_quintuple", batteriesEnergyCapacity[4], batteriesEnergyTransfer[4]); itemDrillUpgradeSpeed = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.SPEED, "item_drill_upgrade_speed"); itemDrillUpgradeSpeedII = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.SPEED_II, "item_drill_upgrade_speed_ii"); itemDrillUpgradeSpeedIII = new ItemDrillUpgrade(ItemDrillUpgrade.UpgradeType.SPEED_III, "item_drill_upgrade_speed_iii");