Toggle drops.

Through txt command in-game, or through the config file.

White space fix.

Forgot this part.
This commit is contained in:
Reason
2023-06-08 17:33:43 -04:00
committed by Martin Michelsen
parent a963c3316c
commit 95346118f0
5 changed files with 34 additions and 4 deletions
+8
View File
@@ -23,6 +23,7 @@ ServerState::ServerState(const char* config_filename, bool is_replay)
allow_unregistered_users(false),
allow_saving(true),
item_tracking_enabled(true),
drops_enabled(true),
episode_3_send_function_call_enabled(false),
enable_dol_compression(false),
catch_handler_exceptions(true),
@@ -649,6 +650,13 @@ void ServerState::parse_config(shared_ptr<const JSONObject> config_json) {
this->item_tracking_enabled = true;
}
try {
this->drops_enabled = d.at("EnableDrops")->as_bool();
}
catch (const out_of_range&) {
this->drops_enabled = true;
}
try {
this->episode_3_send_function_call_enabled = d.at("EnableEpisode3SendFunctionCall")->as_bool();
} catch (const out_of_range&) {