Commit 47abb576 authored by mercury233's avatar mercury233 Committed by GitHub

add higher version hint (#44)

parent 3665559a
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
}, },
"modules": { "modules": {
"welcome": "MyCard YGOPro Server", "welcome": "MyCard YGOPro Server",
"update": "请更新游戏版本", "update": "请更新你的客户端版本",
"wait_update": "你的客户端版本高于服务器版本,请等待服务器更新",
"stop": false, "stop": false,
"side_timeout": false, "side_timeout": false,
"replay_delay": true, "replay_delay": true,
......
...@@ -2054,7 +2054,7 @@ ygopro.ctos_follow 'JOIN_GAME', true, (buffer, info, client, server, datas)-> ...@@ -2054,7 +2054,7 @@ ygopro.ctos_follow 'JOIN_GAME', true, (buffer, info, client, server, datas)->
await client.open_cloud_replay(replay) await client.open_cloud_replay(replay)
else if info.version != settings.version and !settings.alternative_versions.includes(info.version) else if info.version != settings.version and !settings.alternative_versions.includes(info.version)
ygopro.stoc_send_chat(client, settings.modules.update, ygopro.constants.COLORS.RED) ygopro.stoc_send_chat(client, (if info.version < settings.version then settings.modules.update else settings.modules.wait_update), ygopro.constants.COLORS.RED)
ygopro.stoc_send client, 'ERROR_MSG', { ygopro.stoc_send client, 'ERROR_MSG', {
msg: 4 msg: 4
code: settings.version code: settings.version
......
...@@ -2741,7 +2741,7 @@ ...@@ -2741,7 +2741,7 @@
replay = (await dataManager.getRandomCloudReplay()); replay = (await dataManager.getRandomCloudReplay());
await client.open_cloud_replay(replay); await client.open_cloud_replay(replay);
} else if (info.version !== settings.version && !settings.alternative_versions.includes(info.version)) { } else if (info.version !== settings.version && !settings.alternative_versions.includes(info.version)) {
ygopro.stoc_send_chat(client, settings.modules.update, ygopro.constants.COLORS.RED); ygopro.stoc_send_chat(client, (info.version < settings.version ? settings.modules.update : settings.modules.wait_update), ygopro.constants.COLORS.RED);
ygopro.stoc_send(client, 'ERROR_MSG', { ygopro.stoc_send(client, 'ERROR_MSG', {
msg: 4, msg: 4,
code: settings.version code: settings.version
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment