From 04be3689e28533975772014c7ae6ddd4e916f171 Mon Sep 17 00:00:00 2001 From: ThePython Date: Mon, 27 Mar 2023 15:06:40 -0700 Subject: [PATCH] Maybe fixed bug? --- deconstructor.lua | 4 ++-- orb.lua | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/deconstructor.lua b/deconstructor.lua index a8115c3..65b93fe 100644 --- a/deconstructor.lua +++ b/deconstructor.lua @@ -55,9 +55,9 @@ local function on_timer(pos, elapsed) local fuel_stack = inv:get_stack("main", 1) local energy_value = 0 if fuel_stack:get_name() == "exchangeclone:exchange_orb" then - local energy_value = (fuel_stack:get_meta():get_int("stored_charge") or 0) + 8452 --8452 = energy cost of orb + energy_value = (fuel_stack:get_meta():get_int("stored_charge") or 0) + 8452 --8452 = energy cost of orb else - local energy_value = get_item_energy(fuel_stack:get_name()) + energy_value = get_item_energy(fuel_stack:get_name()) end local wear = fuel_stack:get_wear() if wear then diff --git a/orb.lua b/orb.lua index fc17136..2c5808c 100644 --- a/orb.lua +++ b/orb.lua @@ -7,6 +7,7 @@ end minetest.register_tool("exchangeclone:exchange_orb", { description = "Exchange Orb\nCurrent Charge: 0", inventory_image = "ee_exchange_orb.png", + energy_value = 8452, on_use = read_orb_charge, })