treat technic variable as read-only

fix luacheck warning:
 nether-compressor-recipe.lua:5:10: setting read-only field 'register_compressor_recipe' of global 'technic'

since a local function is all we need
This commit is contained in:
Treer 2023-05-28 23:34:12 +10:00
parent 5b692cfeb0
commit d84cc4ba7e

View File

@ -2,7 +2,7 @@ local S = minetest.get_translator("nether")
technic.register_recipe_type("compressing", { description = S("Compressing") })
function technic.register_compressor_recipe(data)
function register_compressor_recipe(data)
data.time = data.time or 4
technic.register_recipe("compressing", data)
end
@ -46,7 +46,7 @@ minetest.clear_craft({
})
for _, data in pairs(recipes) do
technic.register_compressor_recipe({input = {data[1]}, output = data[2], time = data[3]})
register_compressor_recipe({input = {data[1]}, output = data[2], time = data[3]})
end