Added the scripts directory to lua's path

This will allow modules.
This commit is contained in:
Kayne Ruse
2014-09-29 23:42:40 +10:00
parent 926871d5fe
commit 8e97de6979
3 changed files with 30 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
local mapMaker = {}
function mapMaker.foo()
print("--> Hello map maker! <--")
end
return mapMaker
+3
View File
@@ -1,5 +1,8 @@
print("Lua script check")
mapMaker = require "map_maker"
mapMaker.foo()
--uber lazy declarations
function math.sqr(x) return x*x end
function math.dist(x, y, i, j) return math.sqrt(math.sqr(x - i) + math.sqr(y - j)) end