[Chat Broadcast] Add VT2 1.2 compatibility
This commit is contained in:
parent
fda3b5ac8b
commit
0fd1bcc392
1 changed files with 10 additions and 1 deletions
|
@ -26,6 +26,15 @@ local function send_system_message(peer_id, message)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function add_system_message_to_chat(chat_manager, message)
|
||||||
|
if OLD_RPC_CHAT_MESSAGE then
|
||||||
|
chat_manager:_add_message_to_list(CHANNEL_ID, MESSAGE_SENDER, message, IS_SYSTEM_MESSAGE, POP_CHAT, IS_DEV)
|
||||||
|
else
|
||||||
|
chat_manager:_add_message_to_list(CHANNEL_ID, MESSAGE_SENDER, LOCAL_PLAYER_ID, message, IS_SYSTEM_MESSAGE, POP_CHAT,
|
||||||
|
IS_DEV)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- #####################################################################################################################
|
-- #####################################################################################################################
|
||||||
-- ##### VMFMod ########################################################################################################
|
-- ##### VMFMod ########################################################################################################
|
||||||
-- #####################################################################################################################
|
-- #####################################################################################################################
|
||||||
|
@ -51,7 +60,7 @@ function VMFMod:chat_broadcast(message)
|
||||||
send_system_message(host_peer_id, message)
|
send_system_message(host_peer_id, message)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
chat:_add_message_to_list(CHANNEL_ID, MESSAGE_SENDER, message, IS_SYSTEM_MESSAGE, POP_CHAT, IS_DEV)
|
add_system_message_to_chat(chat, message)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue