add config option to enable rare notifs by default

This commit is contained in:
Martin Michelsen
2024-01-01 11:30:30 -08:00
parent 962ee6874e
commit c6ce39623e
5 changed files with 10 additions and 0 deletions
+3
View File
@@ -195,6 +195,9 @@ Client::Client(
external_bank_character_index(-1),
last_play_time_update(0) {
this->config.set_flags_for_version(version, -1);
if (server->get_state()->default_rare_notifs_enabled) {
this->config.set_flag(Flag::RARE_DROP_NOTIFICATIONS_ENABLED);
}
this->config.specific_version = default_specific_version_for_version(version, -1);
this->last_switch_enabled_command.header.subcommand = 0;
+1
View File
@@ -656,6 +656,7 @@ void ServerState::load_config() {
this->persistent_game_idle_timeout_usecs = json.get_int("PersistentGameIdleTimeout", this->persistent_game_idle_timeout_usecs);
this->cheat_mode_behavior = parse_behavior_switch("CheatModeBehavior", this->cheat_mode_behavior);
this->default_rare_notifs_enabled = json.get_bool("RareNotificationsEnabledByDefault", this->default_rare_notifs_enabled);
this->ep3_send_function_call_enabled = json.get_bool("EnableEpisode3SendFunctionCall", this->ep3_send_function_call_enabled);
this->catch_handler_exceptions = json.get_bool("CatchHandlerExceptions", this->catch_handler_exceptions);
+1
View File
@@ -116,6 +116,7 @@ struct ServerState : public std::enable_shared_from_this<ServerState> {
bool hide_download_commands = true;
RunShellBehavior run_shell_behavior = RunShellBehavior::DEFAULT;
BehaviorSwitch cheat_mode_behavior = BehaviorSwitch::OFF_BY_DEFAULT;
bool default_rare_notifs_enabled = false;
std::vector<std::shared_ptr<const PSOBBEncryption::KeyFile>> bb_private_keys;
std::shared_ptr<const FunctionCodeIndex> function_code_index;
std::shared_ptr<const PatchFileIndex> pc_patch_file_index;