expanded tile descript in DB
This commit is contained in:
@ -11,13 +11,27 @@ local map = {
|
||||
{"-", "-", "w", "-", "-", "-", "-", "w", "w", "-"},
|
||||
{"-", "-", "w", "-", "-", "-", "-", "-", "w", "-"}
|
||||
},
|
||||
mapCrypt = function(self, tile)
|
||||
if tile == "-" then
|
||||
return "floor_stone"
|
||||
elseif tile == "w" then
|
||||
return "wall_stone"
|
||||
end
|
||||
end,
|
||||
mapDecrypt = function(self, tile)
|
||||
if tile == "floor_stone" then
|
||||
return "-"
|
||||
elseif tile == "wall_stone" then
|
||||
return "w"
|
||||
end
|
||||
end,
|
||||
populate = function(self, map)
|
||||
for h=1,10 do
|
||||
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_type = self:mapCrypt(self.map_tiles[h][i]),
|
||||
occupied_by_id = ""
|
||||
})
|
||||
end
|
||||
@ -48,3 +62,4 @@ return map
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user