Game
-Map
+diff --git a/app.lua b/app.lua index eed884b..09ccd4a 100644 --- a/app.lua +++ b/app.lua @@ -79,12 +79,13 @@ app:match("/map/render", function(self) for i = 1, 10 do -- The map database has floor_stone and wall_floor instead of simple ASCII characters -- So we run mapFunc:mapDecrypt to convert it back to the desired characters for visual display - local tile = map:find({ x = h, y = i }) + local tile = map:find({ x = h, y = i, game_ref = self.session.gameref }) self.tiles[h][i] = mapFunc:mapDecrypt(tile.occupied_by_type) end end return { render = "map", layout = false } end + return { layout = false } end) return app @@ -146,6 +147,11 @@ return app + + + + + diff --git a/database.sqlite3 b/database.sqlite3 index 4413c81..f65b7b0 100644 Binary files a/database.sqlite3 and b/database.sqlite3 differ diff --git a/setup_db b/setup_db index 982216f..68799c2 100755 --- a/setup_db +++ b/setup_db @@ -29,6 +29,10 @@ sqlite3 database.sqlite3 " ); CREATE TABLE IF NOT EXISTS players ( id INTEGER PRIMARY KEY AUTOINCREMENT, - player_name TEXT + player_name TEXT, + x INTEGER, + y INTEGER, + health INTEGER, + game_ref INTEGER ) " diff --git a/views/game.etlua b/views/game.etlua index d12a8b5..ca83e3a 100644 --- a/views/game.etlua +++ b/views/game.etlua @@ -2,14 +2,21 @@ <% if not isPopulated then %>
Game
-Map
+