* Remove unused notify_mode.NOTIFY_COUNT. * Remove obsolete comment against mp_ui_alerts::items. * Remove unused is_lobby parameter in mp_ui_alerts::game_created(). * Synchronise game_created sound in game_config.cfg with game_config.cpp.
This commit is contained in:
parent
5902e1116c
commit
c803517ce3
5 changed files with 5 additions and 7 deletions
|
@ -106,6 +106,7 @@
|
|||
game_user_leave = "leave.wav"
|
||||
ready_for_start = "bell.wav"
|
||||
game_has_begun = "gamestart.ogg"
|
||||
game_created = "chat-highlight.ogg"
|
||||
|
||||
[status]
|
||||
slowed="slowed.wav"
|
||||
|
|
|
@ -74,7 +74,7 @@ void do_notify(notify_mode mode, const std::string& sender, const std::string& m
|
|||
mp_ui_alerts::public_message(true, sender, message);
|
||||
break;
|
||||
case NOTIFY_GAME_CREATED:
|
||||
mp_ui_alerts::game_created(true, sender, message);
|
||||
mp_ui_alerts::game_created(sender, message);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -183,7 +183,6 @@ enum notify_mode {
|
|||
NOTIFY_WHISPER_OTHER_WINDOW,
|
||||
NOTIFY_LOBBY_JOIN,
|
||||
NOTIFY_LOBBY_QUIT,
|
||||
NOTIFY_COUNT,
|
||||
NOTIFY_GAME_CREATED
|
||||
};
|
||||
|
||||
|
|
|
@ -50,14 +50,12 @@ bool notif_pref(const std::string& id)
|
|||
|
||||
} // end anonymous namespace
|
||||
|
||||
// Note: This list must agree with data/gui/.../lobby_sound_options.cfg
|
||||
// @lilinitsy: As of 1.14, it seems the above comment is not true, but someone could check.
|
||||
const std::vector<std::string> items {"player_joins", "player_leaves", "private_message", "friend_message", "public_message", "server_message", "ready_for_start", "game_has_begun", "turn_changed", "game_created"};
|
||||
|
||||
void game_created(bool is_lobby, const std::string & scenario, const std::string & name)
|
||||
void game_created(const std::string & scenario, const std::string & name)
|
||||
{
|
||||
std::string id = "game_created";
|
||||
if (is_lobby && !lobby_pref(id)) {
|
||||
if (!lobby_pref(id)) {
|
||||
return ;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace mp_ui_alerts {
|
|||
// Functions called when such an event occurs
|
||||
void player_joins(bool is_lobby);
|
||||
void player_leaves(bool is_lobby);
|
||||
void game_created(bool is_lobby, const std::string & scenario, const std::string & name);
|
||||
void game_created(const std::string & scenario, const std::string & name);
|
||||
void public_message(bool is_lobby, const std::string & sender, const std::string & message);
|
||||
void friend_message(bool is_lobby, const std::string & sender, const std::string & message);
|
||||
void private_message(bool is_lobby, const std::string & sender, const std::string & message);
|
||||
|
|
Loading…
Add table
Reference in a new issue