summaryrefslogtreecommitdiff
path: root/db.lua
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2023-03-24 21:11:10 +0000
committerubq323 <ubq323@ubq323.website>2023-03-24 21:11:10 +0000
commite77609c5bc8b44aa22ef88063246fd05add5e705 (patch)
tree1829e2098e40f7fad82af8707bd8a359edd2be1d /db.lua
parent0927f9297c06525a453b4aad44fa4c2916c75906 (diff)
use lmdb for world storage; plus other small things
support numpad 8456 for movement in addition to wasd refactor server and add player module update outdated documentation slightly
Diffstat (limited to 'db.lua')
-rw-r--r--db.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/db.lua b/db.lua
new file mode 100644
index 0000000..e87b1b6
--- /dev/null
+++ b/db.lua
@@ -0,0 +1,6 @@
+local lmdb=require'lmdb'
+local env=lmdb.open('data',{maxdbs=16})
+return {
+ env=env,
+ txn=function(...) return env.txn_begin(...) end,
+}