added real-time map render!
This commit is contained in:
44
lua_scripts/map.lua
Normal file
44
lua_scripts/map.lua
Normal file
@ -0,0 +1,44 @@
|
||||
|
||||
|
||||
local map = {
|
||||
map_tiles = {
|
||||
{"-", "-", "w", "w", "-", "-", "-", "-", "-", "-"},
|
||||
{"-", "-", "w", "w", "-", "-", "-", "-", "-", "-"},
|
||||
{"-", "-", "w", "w", "-", "w", "-", "-", "-", "-"},
|
||||
{"w", "-", "-", "-", "w", "w", "-", "-", "-", "-"},
|
||||
{"w", "-", "w", "-", "-", "w", "w", "w", "-", "-"},
|
||||
{"w", "-", "w", "-", "-", "w", "-", "-", "-", "-"},
|
||||
{"-", "-", "w", "-", "-", "w", "-", "w", "-", "-"},
|
||||
{"-", "-", "-", "-", "-", "-", "-", "w", "-", "-"},
|
||||
{"-", "-", "w", "-", "-", "-", "-", "w", "w", "-"},
|
||||
{"-", "-", "w", "-", "-", "-", "-", "-", "w", "-"}
|
||||
},
|
||||
populate = function(self, map)
|
||||
for h=1,10 do
|
||||
for i=1,10 do
|
||||
local tile = map:create({
|
||||
x = h,
|
||||
y = i,
|
||||
occupied_by_type = self.map_tiles[h][i],
|
||||
occupied_by_id = ""
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
}
|
||||
local tiles = {}
|
||||
|
||||
return map
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user