Index: binaries/data/config/default.cfg =================================================================== --- binaries/data/config/default.cfg +++ binaries/data/config/default.cfg @@ -333,6 +333,8 @@ camerajump.threshold = 40 ; How close do we have to be to the actual location in order to jump back to the previous one? timeelapsedcounter = false ; Show the game duration in the top right corner batchtrainingsize = 5 ; Number of units to be trained per batch (when pressing the hotkey) +tributenotificationmessage = true ; Show a chat notification when a tribute is sent between allied players +barternotificationmessage = true ; Show a chat notification when an active player barters in observer mode [gui.session.minimap] blinkduration = 1.7 ; The blink duration while pinging Index: binaries/data/mods/public/gui/options/options.json =================================================================== --- binaries/data/mods/public/gui/options/options.json +++ binaries/data/mods/public/gui/options/options.json @@ -102,6 +102,18 @@ "label": "Chat Timestamp", "tooltip": "Show time that messages are posted in the lobby, gamesetup and ingame chat.", "parameters": { "config": "chat.timestamp" } + }, + { + "type": "boolean", + "label": "Show Allied Tribute Messages", + "tooltip": "Show a chat notification when a tribute is sent between allied players", + "parameters": { "config": "gui.session.tributenotificationmessage" } + }, + { + "type": "boolean", + "label": "Show Barter Messages", + "tooltip": "Show a chat notification when an active player barters in observer mode", + "parameters": { "config": "gui.session.barternotificationmessage" } } ], "graphicsSetting": Index: binaries/data/mods/public/gui/session/messages.js =================================================================== --- binaries/data/mods/public/gui/session/messages.js +++ binaries/data/mods/public/gui/session/messages.js @@ -875,14 +875,21 @@ }); } +/** + * If the "tributenotificationmessage" config option is enabled, show all tributes sent in observer mode, + * and tributes sent between allied players. + * Otherwise, only show tributes sent directly to us. + */ function formatTributeMessage(msg) { - // Check observer first, since we also want to see if the selected player in the developer-overlay has sent tributes let message = ""; - if (g_IsObserver) - message = translate("%(player)s has sent %(player2)s %(amounts)s."); - else if (msg.targetPlayer == Engine.GetPlayerID()) + if (msg.targetPlayer == Engine.GetPlayerID()) message = translate("%(player)s has sent you %(amounts)s."); + else if (Engine.ConfigDB_GetValue("user", "gui.session.tributenotificationmessage") == "true" && + (g_IsObserver || g_GameAttributes.settings.LockTeams && + g_Players[msg.sourcePlayer].isMutualAlly[Engine.GetPlayerID()] && + g_Players[msg.targetPlayer].isMutualAlly[Engine.GetPlayerID()])) + message = translate("%(player)s has sent %(player2)s %(amounts)s."); return sprintf(message, { "player": colorizePlayernameByID(msg.sourcePlayer), @@ -893,7 +900,7 @@ function formatBarterMessage(msg) { - if (!g_IsObserver) + if (Engine.ConfigDB_GetValue("user", "gui.session.barternotificationmessage") != "true" || !g_IsObserver) return ""; let amountsSold = {};