From a34f29e5527621e013edbc98bb937026dd56dce7 Mon Sep 17 00:00:00 2001 From: wsor4035 <24964441+wsor4035@users.noreply.github.com> Date: Sun, 18 Feb 2024 15:53:20 -0500 Subject: [PATCH] fix more luacheck issues --- furnace.lua | 24 ++++++++---------------- init.lua | 2 +- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/furnace.lua b/furnace.lua index bde74ae..84cd2de 100644 --- a/furnace.lua +++ b/furnace.lua @@ -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", @@ -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, diff --git a/init.lua b/init.lua index 60940a3..66dd116 100644 --- a/init.lua +++ b/init.lua @@ -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