Fix failure sound for technic teletool
parent
a5ab1498e5
commit
596c9a88c9
5
init.lua
5
init.lua
|
@ -79,8 +79,9 @@ if(minetest.get_modpath("technic")) then
|
|||
local failure = false
|
||||
if(pointed_thing.type == "node") then
|
||||
local meta = minetest.deserialize(itemstack:get_metadata())
|
||||
if not meta or not meta.charge then return end
|
||||
if meta.charge >= 1000 then
|
||||
if not meta or not meta.charge then
|
||||
failure = true
|
||||
elseif meta.charge >= 1000 then
|
||||
meta.charge = meta.charge - 1000
|
||||
teletool.teleport(user, pointed_thing)
|
||||
technic.set_RE_wear(itemstack, meta.charge, 50000)
|
||||
|
|
Loading…
Reference in New Issue