Skip to content

Commit

Permalink
Add QuickChat message for "Map Downloaded" notice
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Oct 27, 2023
1 parent 4e8617d commit 1e1c13f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/hci/quickchat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2618,6 +2618,8 @@ const char* to_display_string(WzQuickChatMessage msg)
// WZ-generated internal messages - not for users to deliberately send
case WzQuickChatMessage::INTERNAL_MSG_DELIVERY_FAILURE_TRY_AGAIN:
return _("Message delivery failure - try again");
case WzQuickChatMessage::INTERNAL_LOBBY_NOTICE_MAP_DOWNLOADED:
return _("Map Downloaded");

// not a valid message
case WzQuickChatMessage::MESSAGE_COUNT:
Expand Down
3 changes: 2 additions & 1 deletion src/hci/quickchat.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@
\
/* FROM THIS POINT ON - ONLY INTERNAL MESSAGES! */ \
/* WZ-generated internal messages - not for users to deliberately send */ \
MSG(INTERNAL_MSG_DELIVERY_FAILURE_TRY_AGAIN) // This should always be the first internal message!
MSG(INTERNAL_MSG_DELIVERY_FAILURE_TRY_AGAIN) /* This should always be the first internal message! */ \
MSG(INTERNAL_LOBBY_NOTICE_MAP_DOWNLOADED)

#define GENERATE_ENUM(ENUM) ENUM,

Expand Down
6 changes: 5 additions & 1 deletion src/multiplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2078,7 +2078,11 @@ bool recvMapFileData(NETQUEUE queue)
{
netPlayersUpdated = true; // Remove download icon from ourselves.
addConsoleMessage(_("MAP DOWNLOADED!"), DEFAULT_JUSTIFY, SYSTEM_MESSAGE);
sendInGameSystemMessage("MAP DOWNLOADED");

WzQuickChatTargeting targeting;
targeting.all = true;
sendQuickChat(WzQuickChatMessage::INTERNAL_LOBBY_NOTICE_MAP_DOWNLOADED, selectedPlayer, targeting);

debug(LOG_INFO, "=== File has been received. ===");

// clear out the old level list.
Expand Down

0 comments on commit 1e1c13f

Please sign in to comment.