restored mapCrypt looping
This commit is contained in:
@ -4,21 +4,30 @@ local map = {
|
||||
{ "-", "_", "w", "w", "-", "-", "-", "-", "-", "-" },
|
||||
{ "-", "-", "w", "w", "-", "w", "-", "-", "-", "-" },
|
||||
{ "w", "-", "-", "-", "w", "w", "-", "-", "-", "-" },
|
||||
{ "w", "-", "w", "-", "-", "w", "w", "w", "-", "-" },
|
||||
{ "w", "-", "w", "-", "-", "w", "-", "-", "-", "-" },
|
||||
{ "-", "-", "w", "-", "-", "w", "-", "w", "-", "-" },
|
||||
{ "w", "-", "ww", "-", "-", "w", "w", "w", "-", "-" },
|
||||
{ "w", "-", "ww", "-", "-", "w", "-", "-", "-", "-" },
|
||||
{ "-", "-", "ww", "-", "-", "w", "-", "w", "-", "-" },
|
||||
{ "-", "-", "-", "-", "-", "-", "-", "w", "-", "-" },
|
||||
{ "-", "-", "w", "-", "-", "-", "-", "w", "w", "-" },
|
||||
{ "-", "-", "w", "-", "-", "-", "-", "-", "w", "-" }
|
||||
{ "-", "-", "ww", "-", "-", "-", "-", "w", "w", "-" },
|
||||
{ "-", "-", "ww", "-", "-", "-", "-", "-", "w", "-" }
|
||||
},
|
||||
tileset = {
|
||||
display = { "-", "_", "w", "ww" },
|
||||
db = { "floor_stone,", "floor_wood", "wall_stone", "wall_wood" }
|
||||
},
|
||||
mapCrypt = function(self, tile)
|
||||
if tile == "-" then
|
||||
return "floor_stone"
|
||||
elseif tile == "_" then
|
||||
return "floor_wood"
|
||||
elseif tile == "w" then
|
||||
return "wall_stone"
|
||||
for i=1, #self.tileset.display do
|
||||
if self.tileset.display[i] == tile then
|
||||
return self.tileset.db[i]
|
||||
end
|
||||
end
|
||||
--if tile == "-" then
|
||||
-- return "floor_stone"
|
||||
--elseif tile == "_" then
|
||||
-- return "floor_wood"
|
||||
--elseif tile == "w" then
|
||||
-- return "wall_stone"
|
||||
--end
|
||||
end,
|
||||
mapDecrypt = function(self, tile)
|
||||
-- TODO: Rework function so it returns both char and mat type
|
||||
|
Reference in New Issue
Block a user