diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-10-06 22:05:27 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-10-07 22:08:28 +0200 |
commit | d20bbfd29be7c35406d6852c83a00ab5f2d18ede (patch) | |
tree | f7b6974eb7430ad27e13f76e8633bff55acd7c12 | |
parent | 036babec3e9f93822b808a7a62dcf9485ddf3307 (diff) | |
download | server-d20bbfd29be7c35406d6852c83a00ab5f2d18ede.tar.gz |
Zap "setups" table.
-rw-r--r-- | schema.sql | 10 | ||||
-rw-r--r-- | server.js | 14 |
2 files changed, 0 insertions, 24 deletions
@@ -196,16 +196,6 @@ create view player_rating_view as left join ratings using(title_id, user_id) ; -create table if not exists setups ( - setup_id integer primary key, - setup_name text, - title_id text, - player_count integer, - scenario text, - options text, - unique (title_id, player_count, scenario) -); - -- Friend and Block Lists -- create table if not exists contacts ( @@ -1139,8 +1139,6 @@ app.get("/forum/search", must_be_logged_in, function (req, res) { * GAME LOBBY */ -const SQL_SELECT_SETUPS = SQL("select * from setups where title_id=? order by setup_id") - let RULES = {} let TITLE_TABLE = app.locals.TITLE_TABLE = {} let TITLE_LIST = app.locals.TITLE_LIST = [] @@ -1219,18 +1217,6 @@ function unload_module(filename) { function load_rules(rules_dir, rules_file, title) { RULES[title.title_id] = require(rules_file) - - title.setups = SQL_SELECT_SETUPS.all(title.title_id) - for (let setup of title.setups) { - if (!setup.setup_name) { - if (title.setups.length > 1 && setup.scenario !== "Standard") - setup.setup_name = title.title_name + " - " + setup.scenario - else - setup.setup_name = title.title_name - } - setup.roles = get_game_roles(setup.title_id, setup.scenario, setup.options) - } - title.about_html = fs.readFileSync(rules_dir + "/about.html") title.create_html = fs.readFileSync(rules_dir + "/create.html") } |