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/
--------------------------------------------------------------------------------
--------------------------------------------------------------- Globals --------
--helper = {}
------------------------------------------------------------- Functions --------
function xyz( i,j,k ) return {x=i,y=j,z=k} end
@ -27,10 +23,10 @@ function inTable( v, t )
return false
end
function switch( c )
local swtbl = {
function case( c )
return {
casevar = c,
caseof = function (self, code)
of = function (self, code)
local f
if (self.casevar) then
f = code[self.casevar] or code.default
@ -48,10 +44,9 @@ function switch( c )
end
end
}
return swtbl
end
function isDir( d )
function isDir(d)
local f = io.open(d..'/.')
if f then
io.close(f)
@ -61,4 +56,8 @@ function isDir( d )
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