feat: complete in-game commands, GUIs, admin panel fixes, and launcher enhancements

This commit is contained in:
scoped committed 2026-09-29 12:14:16 -04:00
1 parent a9ff92e1d1
commit 752f0cc43d
34 files changed
+4170 -181

No files matched your search

+38
View File
@@ -438,6 +438,44 @@ const MIGRATIONS: &[&str] = &[
);
CREATE INDEX user_posts_user ON user_posts(user_uuid, id DESC);
"#,
r#"
CREATE TABLE IF NOT EXISTS server_economy (
server_id INTEGER NOT NULL REFERENCES game_servers(id) ON DELETE CASCADE,
uuid TEXT NOT NULL,
username TEXT NOT NULL,
balance REAL NOT NULL DEFAULT 1000.0,
updated_at TEXT NOT NULL,
PRIMARY KEY (server_id, uuid)
);
CREATE INDEX IF NOT EXISTS economy_user ON server_economy(uuid);
CREATE INDEX IF NOT EXISTS economy_bal ON server_economy(server_id, balance DESC);
CREATE TABLE IF NOT EXISTS economy_transactions (
id INTEGER PRIMARY KEY AUTOINCREMENT,
server_id INTEGER NOT NULL REFERENCES game_servers(id) ON DELETE CASCADE,
from_uuid TEXT NOT NULL,
from_name TEXT NOT NULL,
to_uuid TEXT NOT NULL,
to_name TEXT NOT NULL,
amount REAL NOT NULL,
description TEXT NOT NULL,
created_at TEXT NOT NULL
);
CREATE INDEX IF NOT EXISTS econ_tx_user ON economy_transactions(server_id, from_uuid, to_uuid);
CREATE TABLE IF NOT EXISTS server_market (
id INTEGER PRIMARY KEY AUTOINCREMENT,
server_id INTEGER NOT NULL REFERENCES game_servers(id) ON DELETE CASCADE,
seller_uuid TEXT NOT NULL,
seller_name TEXT NOT NULL,
item_id TEXT NOT NULL,
item_name TEXT NOT NULL,
amount INTEGER NOT NULL DEFAULT 1,
price REAL NOT NULL,
created_at TEXT NOT NULL
);
CREATE INDEX IF NOT EXISTS market_srv ON server_market(server_id, id DESC);
"#,
];
pub async fn connect(data_dir: &Path) -> Result<SqlitePool> {