fixed nodebox helper
parent
46b62b79b3
commit
5cd5db1811
|
@ -0,0 +1 @@
|
||||||
|
default
|
|
@ -8,10 +8,6 @@
|
||||||
-- http://creativecommons.org/licenses/by-sa/3.0/
|
-- http://creativecommons.org/licenses/by-sa/3.0/
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
--------------------------------------------------------------- Globals --------
|
|
||||||
|
|
||||||
--helper = {}
|
|
||||||
|
|
||||||
------------------------------------------------------------- Functions --------
|
------------------------------------------------------------- Functions --------
|
||||||
|
|
||||||
function xyz( i,j,k ) return {x=i,y=j,z=k} end
|
function xyz( i,j,k ) return {x=i,y=j,z=k} end
|
||||||
|
@ -27,10 +23,10 @@ function inTable( v, t )
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
function switch( c )
|
function case( c )
|
||||||
local swtbl = {
|
return {
|
||||||
casevar = c,
|
casevar = c,
|
||||||
caseof = function (self, code)
|
of = function (self, code)
|
||||||
local f
|
local f
|
||||||
if (self.casevar) then
|
if (self.casevar) then
|
||||||
f = code[self.casevar] or code.default
|
f = code[self.casevar] or code.default
|
||||||
|
@ -48,10 +44,9 @@ function switch( c )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
return swtbl
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function isDir( d )
|
function isDir(d)
|
||||||
local f = io.open(d..'/.')
|
local f = io.open(d..'/.')
|
||||||
if f then
|
if f then
|
||||||
io.close(f)
|
io.close(f)
|
||||||
|
@ -61,4 +56,8 @@ function isDir( d )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function nodeBox(x, y, z, i, j, k)
|
||||||
|
return {type = 'fixed', fixed = {x, y, z, i, j, k}}
|
||||||
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 359 B |
Loading…
Reference in New Issue