From 05a46dfa99353d81e10448218593ffb4f3e37552 Mon Sep 17 00:00:00 2001 From: OneEyeMaker Date: Thu, 21 Sep 2017 18:33:37 +0300 Subject: [PATCH] Added configuration for batteries and its energy parameters --- .../mod/config/values/ConfigIntValues.java | 15 +++++++++++++-- .../actuallyadditions/mod/items/InitItems.java | 11 ++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java index e9f7f9bb3..e93b542de 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/values/ConfigIntValues.java @@ -31,11 +31,22 @@ public enum ConfigIntValues{ FONT_SIZE_MEDIUM("Booklet Medium Font Size", ConfigCategories.OTHER, 0, 0, 500, "The size of the booklet's medium font in percent. Set to 0 to use defaults from the lang file."), FONT_SIZE_LARGE("Booklet Large Font Size", ConfigCategories.OTHER, 0, 0, 500, "The size of the booklet's large font in percent. Set to 0 to use defaults from the lang file."), - ELEVEN("What is 11", ConfigCategories.OTHER, 11, 0, 12, "11?"), + ELEVEN("What is 11", ConfigCategories.OTHER, 11, 0, 12, "11?"), DRILL_ENERGY_CAPACITY("Drill: Energy Capacity", ConfigCategories.TOOL_ENERGY_VALUES, 250000, 1000, 1000000000, "Amount of energy Drills can store"), DRILL_ENERGY_TRANSFER("Drill: Energy Transfer Rate", ConfigCategories.TOOL_ENERGY_VALUES, 1000, 1, 1000000000, "Amount of energy Drill can receive per tick"), - DRILL_ENERGY_USE("Drill: Energy Use", ConfigCategories.TOOL_ENERGY_VALUES, 100, 1, 1000000000, "Base amount energy used by Drill per mined block"); + DRILL_ENERGY_USE("Drill: Energy Use", ConfigCategories.TOOL_ENERGY_VALUES, 100, 1, 1000000000, "Base amount energy used by Drill per mined block"), + + SINGLE_BATTERY_ENERGY_CAPACITY("Single Battery: Energy Capacity", ConfigCategories.TOOL_ENERGY_VALUES, 200000, 1000, 1000000000, "Amount of energy Single Battery can store"), + SINGLE_BATTERY_ENERGY_TRANSFER("Single Battery: Energy Transfer Rate", ConfigCategories.TOOL_ENERGY_VALUES, 1000, 1, 1000000000, "Amount of energy Single Battery can send or receive per tick"), + DOUBLE_BATTERY_ENERGY_CAPACITY("Double Battery: Energy Capacity", ConfigCategories.TOOL_ENERGY_VALUES, 350000, 1000, 1000000000, "Amount of energy Double Battery can store"), + DOUBLE_BATTERY_ENERGY_TRANSFER("Double Battery: Energy Transfer Rate", ConfigCategories.TOOL_ENERGY_VALUES, 5000, 1, 1000000000, "Amount of energy Double Battery can send or receive per tick"), + TRIPLE_BATTERY_ENERGY_CAPACITY("Triple Battery: Energy Capacity", ConfigCategories.TOOL_ENERGY_VALUES, 600000, 1000, 1000000000, "Amount of energy Triple Battery can store"), + TRIPLE_BATTERY_ENERGY_TRANSFER("Triple Battery: Energy Transfer Rate", ConfigCategories.TOOL_ENERGY_VALUES, 10000, 1, 1000000000, "Amount of energy Triple Battery can send or receive per tick"), + QUADRUPLE_BATTERY_ENERGY_CAPACITY("Quadruple Battery: Energy Capacity", ConfigCategories.TOOL_ENERGY_VALUES, 1000000, 1000, 1000000000, "Amount of energy Quadruple Battery can store"), + QUADRUPLE_BATTERY_ENERGY_TRANSFER("Quadruple Battery: Energy Transfer Rate", ConfigCategories.TOOL_ENERGY_VALUES, 30000, 1, 1000000000, "Amount of energy Quadruple Battery can send or receive per tick"), + QUINTUPLE_BATTERY_ENERGY_CAPACITY("Quintuple Battery: Energy Capacity", ConfigCategories.TOOL_ENERGY_VALUES, 2000000, 1000, 1000000000, "Amount of energy Quintuple Battery can store"), + QUINTUPLE_BATTERY_ENERGY_TRANSFER("Quintuple Battery: Energy Transfer Rate", ConfigCategories.TOOL_ENERGY_VALUES, 100000, 1, 1000000000, "Amount of energy Quintuple Battery can send or receive per tick"); 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..67f762c5d 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.ConfigIntValues; 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,11 @@ 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); + itemBattery = new ItemBattery("item_battery", ConfigIntValues.SINGLE_BATTERY_ENERGY_CAPACITY.getValue(), ConfigIntValues.SINGLE_BATTERY_ENERGY_TRANSFER.getValue()); + itemBatteryDouble = new ItemBattery("item_battery_double", ConfigIntValues.DOUBLE_BATTERY_ENERGY_CAPACITY.getValue(), ConfigIntValues.DOUBLE_BATTERY_ENERGY_TRANSFER.getValue()); + itemBatteryTriple = new ItemBattery("item_battery_triple", ConfigIntValues.TRIPLE_BATTERY_ENERGY_CAPACITY.getValue(), ConfigIntValues.TRIPLE_BATTERY_ENERGY_TRANSFER.getValue()); + itemBatteryQuadruple = new ItemBattery("item_battery_quadruple", ConfigIntValues.QUADRUPLE_BATTERY_ENERGY_CAPACITY.getValue(), ConfigIntValues.QUADRUPLE_BATTERY_ENERGY_TRANSFER.getValue()); + itemBatteryQuintuple = new ItemBattery("item_battery_quintuple", ConfigIntValues.QUINTUPLE_BATTERY_ENERGY_CAPACITY.getValue(), ConfigIntValues.QUINTUPLE_BATTERY_ENERGY_TRANSFER.getValue()); 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");