Ticket #2898: userNotify.4.2.patch
File userNotify.4.2.patch, 8.4 KB (added by , 8 years ago) |
---|
-
binaries/data/config/default.cfg
toggle = "Ctrl+F11" ; Enable/di 235 235 [hotkey.selection] 236 236 add = Shift ; Add units to selection 237 237 milonly = Alt ; Add only military units to selection 238 238 idleonly = "I" ; Select only idle units 239 239 remove = Ctrl ; Remove units from selection 240 cancel = Esc ; Un-select all units and cancel building placement 240 cancel = Esc ; Un-select all units and cancel building placement 241 241 idleworker = Period ; Select next idle worker 242 242 idlewarrior = ForwardSlash ; Select next idle warrior 243 243 offscreen = Alt ; Include offscreen units in selection 244 244 [hotkey.selection.group.add] 245 245 0 = "Shift+0" … … mastergain = 0.9 379 379 musicgain = 0.2 380 380 ambientgain = 0.6 381 381 actiongain = 0.7 382 382 uigain = 0.7 383 383 384 [sound.notify] 385 nick = true 386 384 387 [tinygettext] 385 388 debug = false ; Print error messages each time a translation for an English string is not found. 386 389 387 390 [userreport] ; Opt-in online user reporting system 388 391 url = "http://feedback.wildfiregames.com/report/upload/v1/" -
binaries/data/mods/public/audio/interface/ui/chat_alert.ogg
Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
-
binaries/data/mods/public/gui/common/functions_utility.js
Property changes on: binaries/data/mods/public/audio/interface/ui/chat_alert.ogg ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property
1 /** 2 * Used by notifyUser() to limit the number of pings 3 */ 4 var g_LastNickNotification = -1; 5 6 /** 7 * Plays a sound if user's nick is mentioned in chat 8 */ 9 function notifyUser(userName, msgText) 10 { 11 if (Engine.ConfigDB_GetValue("user", "sound.notify.nick") != "true" || 12 msgText.toLowerCase().indexOf(userName.toLowerCase()) == -1) 13 return; 14 15 let timeNow = new Date().getTime(); 16 17 if (!g_LastNickNotification || timeNow > g_LastNickNotification + 3000) 18 Engine.PlayUISound("audio/interface/ui/chat_alert.ogg", false); 19 20 g_LastNickNotification = timeNow; 21 } 22 1 23 function getRandom(randomMin, randomMax) 2 24 { 3 25 // Returns a random whole number in a min..max range. 4 26 // NOTE: There should probably be an engine function for this, 5 27 // since we'd need to keep track of random seeds for replays. … … function formatPlayerInfo(playerDataArra 392 414 "playerDescriptions": playerDescriptions.observer.join("\n") 393 415 })); 394 416 395 417 return teamDescription.join("\n\n"); 396 418 } 419 420 -
binaries/data/mods/public/gui/credits/texts/programming.json
22 22 {"name": "Adrian Fatol"}, 23 23 {"nick": "AI-Amsterdam"}, 24 24 {"nick": "Alan", "name": "Alan Kemp"}, 25 25 {"nick": "aBothe", "name": "Alexander Bothe"}, 26 26 {"nick": "alpha123", "name": "Peter P. Cannici"}, 27 {"nick": "andy5995", "name": "Andy Alt"}, 27 28 {"nick": "Aurium", "name": "Aurélio Heckert"}, 28 29 {"nick": "badmadblacksad", "name": "Martin F"}, 29 30 {"name": "Mikołaj \"Bajter\" Korcz"}, 30 31 {"nick": "bb", "name": "Bouke Jansen"}, 31 32 {"nick": "Ben", "name": "Ben Vinegar"}, -
binaries/data/mods/public/gui/gamesetup/gamesetup.js
function colorizePlayernameByGUID(guid, 1803 1803 return '[color="'+ color +'"]' + username + '[/color]'; 1804 1804 } 1805 1805 1806 1806 function addChatMessage(msg) 1807 1807 { 1808 if (msg.text) 1809 { 1810 let userName = g_PlayerAssignments[Engine.GetPlayerGUID() || "local"].name; 1811 1812 if (userName != g_PlayerAssignments[msg.guid].name) 1813 notifyUser(userName, msg.text); 1814 } 1815 1808 1816 if (!g_FormatChatMessage[msg.type]) 1809 1817 return; 1810 1818 1811 1819 let user = colorizePlayernameByGUID(msg.guid || -1, msg.username || ""); 1812 1820 -
binaries/data/mods/public/gui/lobby/lobby.js
function addChatMessage(msg) 819 819 if (Engine.LobbyGetPlayerRole(msg.from) == "moderator") 820 820 msg.from = g_ModeratorPrefix + msg.from; 821 821 822 822 // Highlight local user's nick 823 823 if (g_Username != msg.from) 824 { 824 825 msg.text = msg.text.replace(g_Username, colorPlayerName(g_Username)); 826 notifyUser(g_Username, msg.text); 827 } 825 828 826 829 // Run spam test if it's not a historical message 827 830 if (!msg.datetime) 828 831 { 829 832 updateSpamMonitor(msg.from); -
binaries/data/mods/public/gui/options/options.json
163 163 "parameters": { "config": "waterreflection", "renderer": "WaterReflection" } 164 164 }, 165 165 { 166 166 "type": "boolean", 167 167 "label": "Water Refraction", 168 "tooltip": "Use a real water refraction map and not transparency", 168 "tooltip": "Use a real water refraction map and not transparency", 169 169 "parameters": { "config": "waterrefraction", "renderer": "WaterRefraction" } 170 170 }, 171 171 { 172 172 "type": "boolean", 173 173 "label": "Shadows on Water", … … 228 228 { 229 229 "type": "number", 230 230 "label": "UI Gain", 231 231 "tooltip": "UI sound gain", 232 232 "parameters": { "config": "sound.uigain", "function": "SetUIGain", "min": "0" } 233 }, 234 { 235 "type": "boolean", 236 "label": "Nick Notification", 237 "tooltip": "Receive audio notification when someone types your nick", 238 "parameters": { "config": "sound.notify.nick" } 233 239 } 234 240 ], 235 241 "lobbySetting": 236 242 [ 237 243 { 238 244 "type": "number", 239 "label": "Chat Backlog", 240 "tooltip": "Number of backlogged messages to load when joining the lobby", 245 "label": "Chat Backlog", 246 "tooltip": "Number of backlogged messages to load when joining the lobby", 241 247 "parameters": { "config": "lobby.history", "min": "0" } 242 248 }, 243 249 { 244 250 "type": "boolean", 245 251 "label": "Chat Timestamp", 246 "tooltip": "Show time that messages are posted in the lobby chat", 252 "tooltip": "Show time that messages are posted in the lobby chat", 247 253 "parameters": { "config": "lobby.chattimestamp" } 248 254 } 249 255 ] 250 256 } -
binaries/data/mods/public/gui/session/messages.js
function formatChatCommand(msg) 820 820 msg.text = msg.text.substr("/me ".length); 821 821 822 822 // Translate or escape text 823 823 if (!msg.text) 824 824 return ""; 825 825 826 if (msg.translate) 826 827 { 827 828 msg.text = translate(msg.text); 828 829 if (msg.translateParameters) 829 830 { … … function formatChatCommand(msg) 831 832 translateObjectKeys(parameters, msg.translateParameters); 832 833 msg.text = sprintf(msg.text, parameters); 833 834 } 834 835 } 835 836 else 837 { 836 838 msg.text = escapeText(msg.text); 837 839 840 let userName = g_PlayerAssignments[Engine.GetPlayerGUID() || "local"].name; 841 842 if (userName != g_PlayerAssignments[msg.guid].name) 843 notifyUser(userName, msg.text); 844 } 845 838 846 // GUID for players, playerID for AIs 839 847 let coloredUsername = msg.guid != -1 ? colorizePlayernameByGUID(msg.guid) : colorizePlayernameByID(msg.player); 840 848 841 849 return sprintf(g_ChatCommands[isMe ? "me" : "regular"][msg.context ? "context" : "no-context"], { 842 850 "message": msg.text,