Maybe fixed bug?

This commit is contained in:
ThePython 2023-03-27 15:06:40 -07:00
parent 33abc7165b
commit 04be3689e2
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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,
})