fixed nodebox helper

master
Fernando Zapata 2012-09-25 19:07:59 -06:00
parent 46b62b79b3
commit 5cd5db1811
3 changed files with 9 additions and 9 deletions

1
helper/depends.txt Normal file
View File

@ -0,0 +1 @@
default

View File

@ -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