From cd8d883134c5304e7cc6e1f3463268a6cd91ca31 Mon Sep 17 00:00:00 2001 From: Dylan Sheehy Date: Mon, 1 Jan 2018 13:39:57 -0600 Subject: [PATCH] Charging energy from biomass now looks up value in config.properties --- .../src/main/java/net/simon987/cubotplugin/CubotInventory.java | 3 ++- Server/src/main/resources/config.properties | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Plugin Cubot/src/main/java/net/simon987/cubotplugin/CubotInventory.java b/Plugin Cubot/src/main/java/net/simon987/cubotplugin/CubotInventory.java index cfd6ce8..0f7d4b5 100644 --- a/Plugin Cubot/src/main/java/net/simon987/cubotplugin/CubotInventory.java +++ b/Plugin Cubot/src/main/java/net/simon987/cubotplugin/CubotInventory.java @@ -39,7 +39,8 @@ public class CubotInventory extends CpuHardware { } else if (a == INV_CLEAR) { if (cubot.getHeldItem() == 0x0001) { - cubot.storeEnergy(4000); + int energy = GameServer.INSTANCE.getConfig().getInt("biomassEnergyValue"); + cubot.storeEnergy(energy); cubot.setHeldItem(0); } else if (cubot.spendEnergy(100)) { diff --git a/Server/src/main/resources/config.properties b/Server/src/main/resources/config.properties index bc55fcb..271e73d 100644 --- a/Server/src/main/resources/config.properties +++ b/Server/src/main/resources/config.properties @@ -44,6 +44,8 @@ minBiomassRespawnCount=2 # Maximum biomass blob count for the WorldGenerator maxBiomassCount=10 maxBiomassRespawnCount=6 +# Energy generated by consuming biomass +biomassEnergyValue=1000 # Maximum energy of the battery hardware in kJ battery_max_energy=60000 # Time for biomass respawn in ticks