mirror of
https://github.com/minetest-mods/technic.git
synced 2025-11-08 19:25:29 +01:00
fix luacheck warnings
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user