From 992d740a58b2d281be882690de9d8e4f902f2f36 Mon Sep 17 00:00:00 2001 From: elexis Date: Tue, 5 Nov 2019 22:35:37 +0000 Subject: [PATCH] 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") in 7afe0afbca. 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 by 1c0536bf08 sends a GUI value to the simulation and prints it to the log, which is already covered by the JS console since e4fe4ed602. Differential Revision: https://code.wildfiregames.com/D2407 This was SVN commit r23137. --- .../data/mods/public/gui/session/messages.js | 20 ------------------- .../public/simulation/helpers/Commands.js | 10 ---------- 2 files changed, 30 deletions(-) diff --git a/binaries/data/mods/public/gui/session/messages.js b/binaries/data/mods/public/gui/session/messages.js index a2cd939a33..256cd5f52e 100644 --- a/binaries/data/mods/public/gui/session/messages.js +++ b/binaries/data/mods/public/gui/session/messages.js @@ -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 = { diff --git a/binaries/data/mods/public/simulation/helpers/Commands.js b/binaries/data/mods/public/simulation/helpers/Commands.js index ed55c10586..ae4ba7878c 100644 --- a/binaries/data/mods/public/simulation/helpers/Commands.js +++ b/binaries/data/mods/public/simulation/helpers/Commands.js @@ -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) {