mirror of
https://github.com/minetest-mods/technic.git
synced 2024-10-01 16:50:38 +02:00
Fix .luacheckrc, fix unused index variable, remove spaces, use tabs.
This commit is contained in:
parent
1f0f335ecc
commit
1084ca00da
|
@ -28,6 +28,8 @@ read_globals = {
|
||||||
|
|
||||||
"protector", "isprotect",
|
"protector", "isprotect",
|
||||||
"homedecor_expect_infinite_stacks",
|
"homedecor_expect_infinite_stacks",
|
||||||
|
|
||||||
|
"craftguide",
|
||||||
}
|
}
|
||||||
|
|
||||||
files["concrete/init.lua"].ignore = { "steel_ingot" }
|
files["concrete/init.lua"].ignore = { "steel_ingot" }
|
||||||
|
|
|
@ -17,10 +17,8 @@ function technic.register_recipe_type(typename, origdata)
|
||||||
if have_cg and craftguide.register_craft_type and data.output_size == 1 then
|
if have_cg and craftguide.register_craft_type and data.output_size == 1 then
|
||||||
craftguide.register_craft_type(typename, {
|
craftguide.register_craft_type(typename, {
|
||||||
description = data.description,
|
description = data.description,
|
||||||
--width = data.input_size,
|
|
||||||
--height = 1,
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
data.recipes = {}
|
data.recipes = {}
|
||||||
technic.recipes[typename] = data
|
technic.recipes[typename] = data
|
||||||
end
|
end
|
||||||
|
@ -68,26 +66,26 @@ local function register_recipe(typename, data)
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
if have_cg and technic.recipes[typename].output_size == 1 then
|
if have_cg and technic.recipes[typename].output_size == 1 then
|
||||||
if craftguide.register_craft then
|
if craftguide.register_craft then
|
||||||
local result = data.output;
|
local result = data.output;
|
||||||
if (type(result)=="table") then
|
if (type(result)=="table") then
|
||||||
result = result[1];
|
result = result[1];
|
||||||
end
|
end
|
||||||
local items = "";
|
local items = "";
|
||||||
for index, input in pairs(data.input) do
|
for _, input in pairs(data.input) do
|
||||||
if (items=="") then
|
if (items=="") then
|
||||||
items = items..input;
|
items = items..input;
|
||||||
else
|
else
|
||||||
items = items..", "..input;
|
items = items..", "..input;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
craftguide.register_craft({
|
craftguide.register_craft({
|
||||||
type = typename,
|
type = typename,
|
||||||
result = result,
|
result = result,
|
||||||
items = {items},
|
items = {items},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function technic.register_recipe(typename, data)
|
function technic.register_recipe(typename, data)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user