Worked on Homepage game creation UI

This commit is contained in:
2024-03-21 15:16:19 -05:00
parent b72b8942c6
commit 523e33363c
10 changed files with 65 additions and 27 deletions

View File

@ -16,22 +16,15 @@ local map = {
db = { "floor_stone,", "floor_wood", "wall_stone", "wall_wood" }
},
mapCrypt = function(self, tile)
-- stores tiles as detailed names within the DB
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
-- This introduces breaking changes
-- Decodes tiles into their type (represented by char) and their material
local tileset = {}
if string.find(tile, "wall") then
tileset.char = "w"
@ -44,12 +37,6 @@ local map = {
tileset.material = "wood"
end
return tileset
-- if tile == "floor_stone" then
-- return "-"
-- elseif tile == "wall_stone" then
-- return "w"
-- end
end,
-- Map Populate / check if map exists
populate = function(self, map, game)