Delete dead "chat" simulation command, "chat" GUIInterface notification type, "aichat" NetClient message and useless "debug-print" simulation command.
The "chat" simulation command and according GUIInterface notification became unused which translated simulation chat messages ("aichat") in7afe0afbca
. That commit also introduced the "aichat" network message parsing code that is never triggered since the NetClient never creates messages of that type. The "debug-print" command introduced by1c0536bf08
sends a GUI value to the simulation and prints it to the log, which is already covered by the JS console sincee4fe4ed602
. Differential Revision: https://code.wildfiregames.com/D2407 This was SVN commit r23137.
This commit is contained in:
parent
570891e362
commit
992d740a58
@ -80,14 +80,6 @@ var g_NetMessageTypes = {
|
||||
"text": msg.text
|
||||
});
|
||||
},
|
||||
"aichat": msg => {
|
||||
addChatMessage({
|
||||
"type": "message",
|
||||
"guid": msg.guid,
|
||||
"text": msg.text,
|
||||
"translate": true
|
||||
});
|
||||
},
|
||||
"gamesetup": msg => {}, // Needed for autostart
|
||||
"start": msg => {}
|
||||
};
|
||||
@ -104,18 +96,6 @@ var g_PlayerStateMessages = {
|
||||
*/
|
||||
var g_NotificationsTypes =
|
||||
{
|
||||
"chat": function(notification, player)
|
||||
{
|
||||
let message = {
|
||||
"type": "message",
|
||||
"guid": findGuidForPlayerID(player) || -1,
|
||||
"text": notification.message
|
||||
};
|
||||
if (message.guid == -1)
|
||||
message.player = player;
|
||||
|
||||
addChatMessage(message);
|
||||
},
|
||||
"aichat": function(notification, player)
|
||||
{
|
||||
let message = {
|
||||
|
@ -51,16 +51,6 @@ function ProcessCommand(player, cmd)
|
||||
}
|
||||
|
||||
var g_Commands = {
|
||||
"debug-print": function(player, cmd, data)
|
||||
{
|
||||
print(cmd.message);
|
||||
},
|
||||
|
||||
"chat": function(player, cmd, data)
|
||||
{
|
||||
var cmpGuiInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface);
|
||||
cmpGuiInterface.PushNotification({ "type": cmd.type, "players": [player], "message": cmd.message });
|
||||
},
|
||||
|
||||
"aichat": function(player, cmd, data)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user