Skip to content

Commit

Permalink
fix more luacheck issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wsor4035 committed Feb 18, 2024
1 parent 02b2c98 commit a34f29e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
24 changes: 8 additions & 16 deletions furnace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,14 @@ minetest.register_node("ufos:furnace", {

minetest.register_node("ufos:furnace_active", {
description = "UFO charging device",
tiles = {"default_steel_block.png", "default_steel_block.png", "default_steel_block.png",
"default_steel_block.png", "default_steel_block.png", "default_steel_block.png^ufos_furnace_front.png^ufos_furnace_front_active.png"},
tiles = {
"default_steel_block.png",
"default_steel_block.png",
"default_steel_block.png",
"default_steel_block.png",
"default_steel_block.png",
"default_steel_block.png^ufos_furnace_front.png^ufos_furnace_front_active.png"
},
paramtype2 = "facedir",
light_source = 8,
drop = "ufos:furnace",
Expand All @@ -63,20 +69,6 @@ minetest.register_node("ufos:furnace_active", {
end,
})

function hacky_swap_node(pos,name)
local node = minetest.get_node(pos)
local meta = minetest.get_meta(pos)
local meta0 = meta:to_table()
if node.name == name then
return
end
node.name = name
local meta0 = meta:to_table()
minetest.set_node(pos,node)
meta = minetest.get_meta(pos)
meta:from_table(meta0)
end

minetest.register_abm({
nodenames = {"ufos:furnace","ufos:furnace_active"},
interval = .25,
Expand Down
2 changes: 1 addition & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ minetest.register_node("ufos:box", {
-- restore the fuel inside the node
ufos.set_fuel(ufos.ufo,meta:get_int("fuel"))
-- add the entity
e = minetest.add_entity(pos, "ufos:ufo")
minetest.add_entity(pos, "ufos:ufo")
-- remove the node
minetest.remove_node(pos)
-- reset owner for next ufo
Expand Down

0 comments on commit a34f29e

Please sign in to comment.