Fix 'controller will not start' bug
This commit is contained in:
parent
c60b242c5d
commit
7281ec7af7
@ -244,6 +244,17 @@ function techage.add_to_set(set, x)
|
||||
end
|
||||
end
|
||||
|
||||
-- techage.tbl_filter({"a", "b", "c", "d"}, function(v, k, t) return v >= "c" end) --> {"c","d"}
|
||||
techage.tbl_filter = function(t, filterIter)
|
||||
local out = {}
|
||||
|
||||
for k, v in pairs(t) do
|
||||
if filterIter(v, k, t) then out[k] = v end
|
||||
end
|
||||
|
||||
return out
|
||||
end
|
||||
|
||||
function techage.get_node_lvm(pos)
|
||||
local node = minetest.get_node_or_nil(pos)
|
||||
if node then
|
||||
|
@ -46,6 +46,7 @@ local function count_trues(t)
|
||||
end
|
||||
|
||||
local function nucleus(t)
|
||||
t = techage.tbl_filter(t, function(v, k, t) return type(v) == "table" end)
|
||||
if #t == 4 then
|
||||
if vector.equals(t[1], t[2]) and vector.equals(t[3], t[4]) then
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user