only mapPopulate empty db
This commit is contained in:
parent
989d33ff5e
commit
6b371066d4
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
logs/
|
logs/
|
||||||
|
database.sqlite3
|
||||||
|
50
app.lua
50
app.lua
@ -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)
|
||||||
|
if not self.isPopulated then
|
||||||
mapFunc:populate(map)
|
mapFunc:populate(map)
|
||||||
=======
|
self.text = "Populated map."
|
||||||
mapFunc.populate(self, map)
|
end
|
||||||
>>>>>>> refs/remotes/origin/master
|
return {self.text, layout = false}
|
||||||
return {self.plane, layout = false}
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
app:get("/", function(self)
|
app:get("/", function(self)
|
||||||
@ -42,41 +42,3 @@ end)
|
|||||||
|
|
||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -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
BIN
database.sqlite3
Normal file
Binary file not shown.
@ -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 = {}
|
||||||
|
2802
static/css/pico/pico.amber.css
Normal file
2802
static/css/pico/pico.amber.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.amber.min.css
vendored
Normal file
4
static/css/pico/pico.amber.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2802
static/css/pico/pico.blue.css
Normal file
2802
static/css/pico/pico.blue.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.blue.min.css
vendored
Normal file
4
static/css/pico/pico.blue.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.amber.css
Normal file
2431
static/css/pico/pico.classless.amber.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.amber.min.css
vendored
Normal file
4
static/css/pico/pico.classless.amber.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.blue.css
Normal file
2431
static/css/pico/pico.classless.blue.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.blue.min.css
vendored
Normal file
4
static/css/pico/pico.classless.blue.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.amber.css
Normal file
2431
static/css/pico/pico.classless.conditional.amber.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.amber.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.amber.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.blue.css
Normal file
2431
static/css/pico/pico.classless.conditional.blue.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.blue.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.blue.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.cyan.css
Normal file
2431
static/css/pico/pico.classless.conditional.cyan.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.cyan.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.cyan.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.fuchsia.css
Normal file
2431
static/css/pico/pico.classless.conditional.fuchsia.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.fuchsia.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.fuchsia.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.green.css
Normal file
2431
static/css/pico/pico.classless.conditional.green.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.green.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.green.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.grey.css
Normal file
2431
static/css/pico/pico.classless.conditional.grey.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.grey.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.grey.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.indigo.css
Normal file
2431
static/css/pico/pico.classless.conditional.indigo.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.indigo.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.indigo.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.jade.css
Normal file
2431
static/css/pico/pico.classless.conditional.jade.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.jade.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.jade.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.lime.css
Normal file
2431
static/css/pico/pico.classless.conditional.lime.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.lime.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.lime.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.orange.css
Normal file
2431
static/css/pico/pico.classless.conditional.orange.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.orange.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.orange.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.pink.css
Normal file
2431
static/css/pico/pico.classless.conditional.pink.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.pink.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.pink.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.pumpkin.css
Normal file
2431
static/css/pico/pico.classless.conditional.pumpkin.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.pumpkin.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.pumpkin.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.purple.css
Normal file
2431
static/css/pico/pico.classless.conditional.purple.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.purple.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.purple.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.red.css
Normal file
2431
static/css/pico/pico.classless.conditional.red.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.red.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.red.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.sand.css
Normal file
2431
static/css/pico/pico.classless.conditional.sand.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.sand.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.sand.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.slate.css
Normal file
2431
static/css/pico/pico.classless.conditional.slate.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.slate.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.slate.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.violet.css
Normal file
2431
static/css/pico/pico.classless.conditional.violet.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.violet.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.violet.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.yellow.css
Normal file
2431
static/css/pico/pico.classless.conditional.yellow.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.yellow.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.yellow.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.conditional.zinc.css
Normal file
2431
static/css/pico/pico.classless.conditional.zinc.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.conditional.zinc.min.css
vendored
Normal file
4
static/css/pico/pico.classless.conditional.zinc.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.css
Normal file
2431
static/css/pico/pico.classless.css
Normal file
File diff suppressed because it is too large
Load Diff
2431
static/css/pico/pico.classless.cyan.css
Normal file
2431
static/css/pico/pico.classless.cyan.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.cyan.min.css
vendored
Normal file
4
static/css/pico/pico.classless.cyan.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.fuchsia.css
Normal file
2431
static/css/pico/pico.classless.fuchsia.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.fuchsia.min.css
vendored
Normal file
4
static/css/pico/pico.classless.fuchsia.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.green.css
Normal file
2431
static/css/pico/pico.classless.green.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.green.min.css
vendored
Normal file
4
static/css/pico/pico.classless.green.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.grey.css
Normal file
2431
static/css/pico/pico.classless.grey.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.grey.min.css
vendored
Normal file
4
static/css/pico/pico.classless.grey.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.indigo.css
Normal file
2431
static/css/pico/pico.classless.indigo.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.indigo.min.css
vendored
Normal file
4
static/css/pico/pico.classless.indigo.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.jade.css
Normal file
2431
static/css/pico/pico.classless.jade.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.jade.min.css
vendored
Normal file
4
static/css/pico/pico.classless.jade.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.lime.css
Normal file
2431
static/css/pico/pico.classless.lime.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.lime.min.css
vendored
Normal file
4
static/css/pico/pico.classless.lime.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
4
static/css/pico/pico.classless.min.css
vendored
Normal file
4
static/css/pico/pico.classless.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.orange.css
Normal file
2431
static/css/pico/pico.classless.orange.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.orange.min.css
vendored
Normal file
4
static/css/pico/pico.classless.orange.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.pink.css
Normal file
2431
static/css/pico/pico.classless.pink.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.pink.min.css
vendored
Normal file
4
static/css/pico/pico.classless.pink.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.pumpkin.css
Normal file
2431
static/css/pico/pico.classless.pumpkin.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.pumpkin.min.css
vendored
Normal file
4
static/css/pico/pico.classless.pumpkin.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.purple.css
Normal file
2431
static/css/pico/pico.classless.purple.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.purple.min.css
vendored
Normal file
4
static/css/pico/pico.classless.purple.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.red.css
Normal file
2431
static/css/pico/pico.classless.red.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.red.min.css
vendored
Normal file
4
static/css/pico/pico.classless.red.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.sand.css
Normal file
2431
static/css/pico/pico.classless.sand.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.sand.min.css
vendored
Normal file
4
static/css/pico/pico.classless.sand.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.slate.css
Normal file
2431
static/css/pico/pico.classless.slate.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.slate.min.css
vendored
Normal file
4
static/css/pico/pico.classless.slate.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.violet.css
Normal file
2431
static/css/pico/pico.classless.violet.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.violet.min.css
vendored
Normal file
4
static/css/pico/pico.classless.violet.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.yellow.css
Normal file
2431
static/css/pico/pico.classless.yellow.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.yellow.min.css
vendored
Normal file
4
static/css/pico/pico.classless.yellow.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2431
static/css/pico/pico.classless.zinc.css
Normal file
2431
static/css/pico/pico.classless.zinc.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.classless.zinc.min.css
vendored
Normal file
4
static/css/pico/pico.classless.zinc.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
4009
static/css/pico/pico.colors.css
Normal file
4009
static/css/pico/pico.colors.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.colors.min.css
vendored
Normal file
4
static/css/pico/pico.colors.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2802
static/css/pico/pico.conditional.amber.css
Normal file
2802
static/css/pico/pico.conditional.amber.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.conditional.amber.min.css
vendored
Normal file
4
static/css/pico/pico.conditional.amber.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2802
static/css/pico/pico.conditional.blue.css
Normal file
2802
static/css/pico/pico.conditional.blue.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.conditional.blue.min.css
vendored
Normal file
4
static/css/pico/pico.conditional.blue.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2802
static/css/pico/pico.conditional.css
Normal file
2802
static/css/pico/pico.conditional.css
Normal file
File diff suppressed because it is too large
Load Diff
2802
static/css/pico/pico.conditional.cyan.css
Normal file
2802
static/css/pico/pico.conditional.cyan.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.conditional.cyan.min.css
vendored
Normal file
4
static/css/pico/pico.conditional.cyan.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2802
static/css/pico/pico.conditional.fuchsia.css
Normal file
2802
static/css/pico/pico.conditional.fuchsia.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.conditional.fuchsia.min.css
vendored
Normal file
4
static/css/pico/pico.conditional.fuchsia.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2802
static/css/pico/pico.conditional.green.css
Normal file
2802
static/css/pico/pico.conditional.green.css
Normal file
File diff suppressed because it is too large
Load Diff
4
static/css/pico/pico.conditional.green.min.css
vendored
Normal file
4
static/css/pico/pico.conditional.green.min.css
vendored
Normal file
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
Loading…
Reference in New Issue
Block a user