mirror of
https://cheapiesystems.com/git/icemachine
synced 2024-11-21 14:53:52 +01:00
Add luacheck configuration and minor cleanups
This commit is contained in:
parent
0c619f62c9
commit
21ddad6268
8
.luacheckrc
Normal file
8
.luacheckrc
Normal file
@ -0,0 +1,8 @@
|
||||
max_line_length = 160
|
||||
|
||||
read_globals = {
|
||||
"minetest",
|
||||
"vector",
|
||||
"pipeworks",
|
||||
"technic",
|
||||
}
|
8
init.lua
8
init.lua
@ -1,12 +1,12 @@
|
||||
local pipeworks_installed = minetest.get_modpath("pipeworks")
|
||||
local pipeworks_installed = minetest.global_exists("pipeworks")
|
||||
|
||||
local function find_water_supply(pos)
|
||||
if not pipeworks_installed then return true end
|
||||
local minp = vector.add(pos,vector.new(-1,-1,-1))
|
||||
local maxp = vector.add(pos,vector.new(1,1,1))
|
||||
local nodes = minetest.find_nodes_in_area(minp,maxp,"group:pipe")
|
||||
for _,pos in pairs(nodes) do
|
||||
local node = minetest.get_node(pos)
|
||||
for _,pipepos in pairs(nodes) do
|
||||
local node = minetest.get_node(pipepos)
|
||||
if string.match(node.name,"^pipeworks:.*_loaded$") then
|
||||
return true
|
||||
end
|
||||
@ -174,6 +174,6 @@ minetest.register_craft({
|
||||
recipe = {"default:ice"},
|
||||
})
|
||||
|
||||
if minetest.get_modpath("technic") then
|
||||
if minetest.global_exists("technic") then
|
||||
technic.register_grinder_recipe({input={"default:ice 1"},output="default:snowblock 1"})
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user