Add VT2 1.2.1 Beta compatibility
This commit is contained in:
parent
1271b26dcf
commit
964e6f6e6f
2 changed files with 13 additions and 4 deletions
|
@ -4,7 +4,10 @@ local vmf = get_mod("VMF")
|
||||||
local CHANNEL_ID = 1
|
local CHANNEL_ID = 1
|
||||||
local MESSAGE_SENDER = ""
|
local MESSAGE_SENDER = ""
|
||||||
local LOCAL_PLAYER_ID = 0 -- VT2 only
|
local LOCAL_PLAYER_ID = 0 -- VT2 only
|
||||||
local LOCALIZATION_PARAM = ""
|
local LOCALIZATION_PARAMETERS = {} -- VT2 only
|
||||||
|
local LOCALIZE = false -- VT2 only
|
||||||
|
local LOCALIZE_PARAMETERS = false -- VT2 only
|
||||||
|
local LOCALIZATION_PARAM = "" -- VT1 only
|
||||||
local IS_SYSTEM_MESSAGE = false
|
local IS_SYSTEM_MESSAGE = false
|
||||||
local POP_CHAT = true
|
local POP_CHAT = true
|
||||||
local IS_DEV = true
|
local IS_DEV = true
|
||||||
|
@ -17,9 +20,12 @@ local function send_system_message(peer_id, message)
|
||||||
if VT1 then
|
if VT1 then
|
||||||
RPC.rpc_chat_message(peer_id, CHANNEL_ID, MESSAGE_SENDER, message, LOCALIZATION_PARAM, IS_SYSTEM_MESSAGE, POP_CHAT,
|
RPC.rpc_chat_message(peer_id, CHANNEL_ID, MESSAGE_SENDER, message, LOCALIZATION_PARAM, IS_SYSTEM_MESSAGE, POP_CHAT,
|
||||||
IS_DEV)
|
IS_DEV)
|
||||||
else
|
elseif tonumber(script_data.settings.content_revision) <= 122701 then
|
||||||
RPC.rpc_chat_message(peer_id, CHANNEL_ID, MESSAGE_SENDER, LOCAL_PLAYER_ID, message, LOCALIZATION_PARAM,
|
RPC.rpc_chat_message(peer_id, CHANNEL_ID, MESSAGE_SENDER, LOCAL_PLAYER_ID, message, LOCALIZATION_PARAM,
|
||||||
IS_SYSTEM_MESSAGE, POP_CHAT, IS_DEV)
|
IS_SYSTEM_MESSAGE, POP_CHAT, IS_DEV)
|
||||||
|
else
|
||||||
|
RPC.rpc_chat_message(peer_id, CHANNEL_ID, MESSAGE_SENDER, LOCAL_PLAYER_ID, message, LOCALIZATION_PARAMETERS,
|
||||||
|
LOCALIZE, LOCALIZE_PARAMETERS, IS_SYSTEM_MESSAGE, POP_CHAT, IS_DEV)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -136,9 +136,12 @@ local function rpc_chat_message(member, channel_id, message_sender, message, loc
|
||||||
if VT1 then
|
if VT1 then
|
||||||
RPC.rpc_chat_message(member, channel_id, message_sender, message, localization_param,
|
RPC.rpc_chat_message(member, channel_id, message_sender, message, localization_param,
|
||||||
is_system_message, pop_chat, is_dev)
|
is_system_message, pop_chat, is_dev)
|
||||||
else
|
elseif tonumber(script_data.settings.content_revision) <= 122701 then
|
||||||
RPC.rpc_chat_message(member, channel_id, message_sender, 0, message, localization_param,
|
RPC.rpc_chat_message(member, channel_id, message_sender, 0, message, localization_param,
|
||||||
is_system_message, pop_chat, is_dev)
|
is_system_message, pop_chat, is_dev)
|
||||||
|
else
|
||||||
|
RPC.rpc_chat_message(member, channel_id, message_sender, 0, message, {}, false, false,
|
||||||
|
is_system_message, pop_chat, is_dev)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue