From 7205b4eb13d7d3c7590bbaf7e78f76f781edd5d1 Mon Sep 17 00:00:00 2001 From: bi Date: Wed, 6 Jun 2018 17:33:33 +0300 Subject: [PATCH] Chat: small changes in comments --- vmf/scripts/mods/vmf/modules/core/chat.lua | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/vmf/scripts/mods/vmf/modules/core/chat.lua b/vmf/scripts/mods/vmf/modules/core/chat.lua index f7c0b35..055751e 100644 --- a/vmf/scripts/mods/vmf/modules/core/chat.lua +++ b/vmf/scripts/mods/vmf/modules/core/chat.lua @@ -1,6 +1,6 @@ local vmf = get_mod("VMF") --- Constants, used as parameters in some 'chat_manager's functions +-- Constants used as parameters in some 'chat_manager's functions local CHANNEL_ID = 1 local MESSAGE_SENDER = "" local LOCALIZATION_PARAM = "" @@ -8,21 +8,21 @@ local IS_SYSTEM_MESSAGE = false local POP_CHAT = true local IS_DEV = true --- #################################################################################################################### --- ##### Local functions ############################################################################################## --- #################################################################################################################### +-- ##################################################################################################################### +-- ##### Local functions ############################################################################################### +-- ##################################################################################################################### local function send_system_message(peer_id, message) RPC.rpc_chat_message(peer_id, CHANNEL_ID, MESSAGE_SENDER, message, LOCALIZATION_PARAM, IS_SYSTEM_MESSAGE, POP_CHAT, IS_DEV) end --- #################################################################################################################### --- ##### VMFMod ####################################################################################################### --- #################################################################################################################### +-- ##################################################################################################################### +-- ##### VMFMod ######################################################################################################## +-- ##################################################################################################################### --[[ - Broadcasts the message to all players in the lobby. + Broadcasts the message to all players in a lobby. * message [string]: message to broadcast --]] function VMFMod:chat_broadcast(message) @@ -47,8 +47,7 @@ function VMFMod:chat_broadcast(message) end --[[ - Sends message only to 1 player. Only host can use this method. Because if message will be sent to host, it will be - broadcasted to all other players. That's how Fathshark's system works and there's no workaround for that. + Sends the message to a selected player. Only the host can use this method. * peer_id [peer_id]: peer_id of the player who will recieve the message (can't be host's peer_id) * message [string] : message to send --]]