Implemented a basic API for the server's rooms

This commit is contained in:
Kayne Ruse
2014-06-10 01:46:42 +10:00
parent 1ef5eb7a0f
commit a07e7418a6
7 changed files with 119 additions and 39 deletions
+9 -25
View File
@@ -4,33 +4,17 @@ print("Lua script check (./rsc)")
--Map API overrides
-------------------------
function map.create(region)
for i = 1, map.getregionwidth() do
for j = 1, map.getregionheight() do
if math.abs(map.getx(region) + i -1) == math.abs(map.gety(region) + j -1) then
map.settile(region, i, j, 1, 50)
function region.create(r)
for i = 1, region.getwidth() do
for j = 1, region.getheight() do
if math.abs(region.getx(r) + i -1) == math.abs(region.gety(r) + j -1) then
region.settile(r, i, j, 1, 50)
else
map.settile(region, i, j, 1, 14)
region.settile(r, i, j, 1, 14)
end
end
end
--signal
region.settile(r, 4, 5, 2, 86)
end
function map.unload(region)
--
end
function map.load(region, dir)
--return true if file loaded, otherwise return false
return false
end
function map.save(region, dir)
--
end
-------------------------
--Enemy API
-------------------------
--TODO