mirror of
https://github.com/minetest-mods/technic.git
synced 2024-11-15 23:10:41 +01:00
fix luacheck warnings
This commit is contained in:
parent
022c6ad9a0
commit
f3fbd1f75d
|
@ -28,6 +28,7 @@ read_globals = {
|
|||
|
||||
"protector", "isprotect",
|
||||
"homedecor_expect_infinite_stacks",
|
||||
"monitoring"
|
||||
}
|
||||
|
||||
files["concrete/init.lua"].ignore = { "steel_ingot" }
|
||||
|
|
|
@ -7,12 +7,10 @@ local S = technic.getter
|
|||
|
||||
|
||||
local illuminate = function(pos, mode)
|
||||
local loc = {}
|
||||
-- loc.x, loc.y, loc.z = pos.x, pos.y, pos.z
|
||||
for y=1,3,1 do
|
||||
for x=-3,3,1 do
|
||||
for z = -3,3,1 do
|
||||
loc = {x = pos.x - x, y = pos.y - y, z = pos.z - z}
|
||||
local loc = {x = pos.x - x, y = pos.y - y, z = pos.z - z}
|
||||
if mode then
|
||||
if minetest.get_node(loc).name == "air" then
|
||||
minetest.swap_node(loc, {name = "technic:dummy_light_source"})
|
||||
|
@ -47,13 +45,12 @@ end
|
|||
|
||||
local led_off = function(pos, node)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local eu_input = meta:get_int("LV_EU_input")
|
||||
local machine_name = S("%s LED"):format("LV")
|
||||
local machine_node = "technic:lv_led"
|
||||
|
||||
technic.swap_node(pos, machine_node)
|
||||
meta:set_string("infotext", S("%s Unpowered"):format(machine_name))
|
||||
|
||||
|
||||
meta:set_int("LV_EU_demand", 0)
|
||||
end
|
||||
|
||||
|
@ -80,7 +77,6 @@ end
|
|||
|
||||
local lamp_off = function(pos, node)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local eu_input = meta:get_int("LV_EU_input")
|
||||
local machine_name = S("%s Lamp"):format("LV")
|
||||
local machine_node = "technic:lv_lamp"
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ if minetest.get_modpath("dye") then
|
|||
if minetest.get_modpath("hunger") and minetest.get_modpath("ethereal") then
|
||||
table.insert(dye_recipes, {"ethereal:willow_twig 12", "technic:aspirin_pill"})
|
||||
end
|
||||
|
||||
|
||||
if minetest.get_modpath("farming") then
|
||||
-- Dyes ---
|
||||
-- better recipes for farming's crafting methods (twice the output)
|
||||
|
@ -50,7 +50,7 @@ if minetest.get_modpath("dye") then
|
|||
table.insert(dye_recipes, {"farming:blueberries", "dye:blue 4"})
|
||||
table.insert(dye_recipes, {"farming:raspberries", "dye:red 4"})
|
||||
end
|
||||
|
||||
|
||||
if minetest.get_modpath("ethereal") then
|
||||
table.insert(dye_recipes, {"ethereal:seaweed", "dye:dark_green 6"})
|
||||
table.insert(dye_recipes, {"ethereal:coral2", "dye:cyan 6"})
|
||||
|
@ -61,7 +61,7 @@ if minetest.get_modpath("dye") then
|
|||
table.insert(dye_recipes, {"ethereal:snowygrass", "dye:grey 4"})
|
||||
table.insert(dye_recipes, {"ethereal:crystalgrass", "dye:blue 4"})
|
||||
end
|
||||
|
||||
|
||||
if minetest.get_modpath("bakedclay") then
|
||||
table.insert(dye_recipes, {"bakedclay:delphinium", "dye:cyan 8"})
|
||||
table.insert(dye_recipes, {"bakedclay:thistle", "dye:magenta 8"})
|
||||
|
@ -69,12 +69,12 @@ if minetest.get_modpath("dye") then
|
|||
table.insert(dye_recipes, {"bakedclay:mannagrass", "dye:dark_green 8"})
|
||||
end
|
||||
|
||||
|
||||
|
||||
if minetest.get_modpath("bonemeal") then
|
||||
table.insert(dye_recipes, {"bonemeal:bone", "dye:white 8"})
|
||||
table.insert(dye_recipes, {"bonemeal:bonemeal", "dye:white 4"})
|
||||
end
|
||||
|
||||
|
||||
for _, data in ipairs(dye_recipes) do
|
||||
technic.register_extractor_recipe({input = {data[1]}, output = data[2]})
|
||||
end
|
||||
|
|
|
@ -258,12 +258,8 @@ technic.switching_station_run = function(pos)
|
|||
|
||||
local t0 = minetest.get_us_time()
|
||||
local meta = minetest.get_meta(pos)
|
||||
local meta1 = nil
|
||||
local meta1
|
||||
local pos1 = {}
|
||||
local PR_EU = 0 -- EUs from PR nodes
|
||||
local BA_PR_EU = 0 -- EUs from BA nodes (discharching)
|
||||
local BA_RE_EU = 0 -- EUs to BA nodes (charging)
|
||||
local RE_EU = 0 -- EUs to RE nodes
|
||||
|
||||
local tier = ""
|
||||
local PR_nodes
|
||||
|
|
|
@ -313,39 +313,39 @@ if minetest.get_modpath("ethereal") then
|
|||
{snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
|
||||
{"crystal_block.png"},
|
||||
S("Crystal"))
|
||||
|
||||
|
||||
-- Misc. Wood types
|
||||
-------------------
|
||||
technic_cnc.register_all("ethereal:banana_wood",
|
||||
{snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
|
||||
{"banana_wood.png"},
|
||||
S("Banana Wood"))
|
||||
|
||||
|
||||
technic_cnc.register_all("ethereal:birch_wood",
|
||||
{snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
|
||||
{"moretrees_birch_wood.png"},
|
||||
S("Birch Wood"))
|
||||
|
||||
|
||||
technic_cnc.register_all("ethereal:frost_wood",
|
||||
{snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
|
||||
{"frost_wood.png"},
|
||||
S("Frost Wood"))
|
||||
|
||||
|
||||
technic_cnc.register_all("ethereal:palm_wood",
|
||||
{snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
|
||||
{"moretrees_palm_wood.png"},
|
||||
S("Palm Wood"))
|
||||
|
||||
|
||||
technic_cnc.register_all("ethereal:willow_wood",
|
||||
{snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
|
||||
{"willow_wood.png"},
|
||||
S("Willow Wood"))
|
||||
|
||||
|
||||
technic_cnc.register_all("ethereal:yellow_wood",
|
||||
{snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
|
||||
{"yellow_wood.png"},
|
||||
S("Healing Tree Wood"))
|
||||
|
||||
|
||||
technic_cnc.register_all("ethereal:redwood_wood",
|
||||
{snappy=2, choppy=2, oddly_breakable_by_hand=2, not_in_creative_inventory=1},
|
||||
{"redwood_wood.png"},
|
||||
|
@ -360,56 +360,56 @@ if minetest.get_modpath("moreblocks") then
|
|||
{stone=1, cracky=3, not_in_creative_inventory=1},
|
||||
{"moreblocks_stone_tile.png"},
|
||||
S("Stone Tile"))
|
||||
|
||||
|
||||
technic_cnc.register_all("moreblocks:split_stone_tile",
|
||||
{stone=1, cracky=3, not_in_creative_inventory=1},
|
||||
{"moreblocks_split_stone_tile.png"},
|
||||
S("Split Stone Tile"))
|
||||
|
||||
|
||||
technic_cnc.register_all("moreblocks:checker_stone_tile",
|
||||
{stone=1, cracky=3, not_in_creative_inventory=1},
|
||||
{"moreblocks_checker_stone_tile.png"},
|
||||
S("Checker Stone Tile"))
|
||||
|
||||
|
||||
technic_cnc.register_all("moreblocks:cactus_checker",
|
||||
{stone=1, cracky=3, not_in_creative_inventory=1},
|
||||
{"moreblocks_cactus_checker.png"},
|
||||
S("Cactus Checker"))
|
||||
|
||||
|
||||
-- Bricks
|
||||
------------
|
||||
technic_cnc.register_all("moreblocks:cactus_brick",
|
||||
{cracky=3, not_in_creative_inventory=1},
|
||||
{"moreblocks_cactus_brick.png"},
|
||||
S("Cactus Brick"))
|
||||
|
||||
|
||||
technic_cnc.register_all("moreblocks:grey_bricks",
|
||||
{cracky=3, not_in_creative_inventory=1},
|
||||
{"moreblocks_grey_bricks.png"},
|
||||
S("Grey Bricks"))
|
||||
|
||||
|
||||
-- Metals
|
||||
------------
|
||||
technic_cnc.register_all("moreblocks:copperpatina",
|
||||
{cracky=1, level=2, not_in_creative_inventory=1},
|
||||
{"moreblocks_copperpatina.png"},
|
||||
S("Copper Patina"))
|
||||
|
||||
|
||||
-- Clay
|
||||
------------
|
||||
technic_cnc.register_all("bakedclay:red",
|
||||
{cracky=3, not_in_creative_inventory=1},
|
||||
{"baked_clay_red.png"},
|
||||
S("Red Clay"))
|
||||
|
||||
|
||||
technic_cnc.register_all("bakedclay:orange",
|
||||
{cracky=3, not_in_creative_inventory=1},
|
||||
{"baked_clay_orange.png"},
|
||||
S("Orange Clay"))
|
||||
|
||||
|
||||
technic_cnc.register_all("bakedclay:grey",
|
||||
{cracky=3, not_in_creative_inventory=1},
|
||||
{"baked_clay_grey.png"},
|
||||
S("Grey Clay"))
|
||||
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user