Added the scripts directory to lua's path
This will allow modules.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
local mapMaker = {}
|
||||
|
||||
function mapMaker.foo()
|
||||
print("--> Hello map maker! <--")
|
||||
end
|
||||
|
||||
return mapMaker
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user