only mapPopulate empty db

This commit is contained in:
Jonathan 2024-03-18 19:06:37 -05:00
parent 989d33ff5e
commit 6b371066d4
247 changed files with 304770 additions and 62 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
logs/ logs/
database.sqlite3

52
app.lua
View File

@ -13,13 +13,13 @@ app:enable("etlua")
app.layout = require "views.layout" app.layout = require "views.layout"
app:post("/clickme", function(self) app:post("/clickme", function(self)
self.plane = "P-38L" self.text = "Map is already initialized. Beginning game."
<<<<<<< HEAD self.isPopulated = mapFunc:mapExists(map)
mapFunc:populate(map) if not self.isPopulated then
======= mapFunc:populate(map)
mapFunc.populate(self, map) self.text = "Populated map."
>>>>>>> refs/remotes/origin/master end
return {self.plane, layout = false} return {self.text, layout = false}
end) end)
app:get("/", function(self) app:get("/", function(self)
@ -42,41 +42,3 @@ end)
return app return app

View File

@ -4,7 +4,6 @@ config("development", {
server = "nginx", server = "nginx",
code_cache = "off", code_cache = "off",
num_workers = "1", num_workers = "1",
port = "1010"
sqlite = { sqlite = {
database = "database.sqlite3", database = "database.sqlite3",
-- open_flags = ... -- open_flags = ...

BIN
database.sqlite3 Normal file

Binary file not shown.

View File

@ -1,6 +1,3 @@
<<<<<<< HEAD
local map = { local map = {
map_tiles = { map_tiles = {
{"-", "-", "w", "w", "-", "-", "-", "-", "-", "-"}, {"-", "-", "w", "w", "-", "-", "-", "-", "-", "-"},
@ -21,20 +18,18 @@ local map = {
x = h, x = h,
y = i, y = i,
occupied_by_type = self.map_tiles[h][i], occupied_by_type = self.map_tiles[h][i],
=======
local map = {
populate = function(self, map)
for h=1,100 do
for i=1,100 do
local tile = map:create({
x = h,
y = i,
occupied_by_type = "",
>>>>>>> refs/remotes/origin/master
occupied_by_id = "" occupied_by_id = ""
}) })
end end
end end
end,
mapExists = function(self, map)
local f = map:select("limit 1")
if not f[1] then
return false
else
return true
end
end end
} }
local tiles = {} local tiles = {}

File diff suppressed because it is too large Load Diff

4
static/css/pico/pico.amber.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

4
static/css/pico/pico.blue.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

4
static/css/pico/pico.colors.min.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More