Commit 7d44961e authored by nanahira's avatar nanahira

Revert "restrict siding for some tournaments"

This reverts commit 6a67ab4c.
parent d72e7a82
...@@ -169,10 +169,6 @@ ...@@ -169,10 +169,6 @@
"log_save_path": "./config/", "log_save_path": "./config/",
"port": 7933 "port": 7933
}, },
"side_restrict": {
"enabled": false,
"restrict_cards": []
},
"test_mode": { "test_mode": {
"watch_public_hand": false, "watch_public_hand": false,
"no_connect_count_limit": false, "no_connect_count_limit": false,
......
...@@ -155,6 +155,7 @@ ...@@ -155,6 +155,7 @@
"challonge_player_already_in": "Please do not enter the room you are already in.", "challonge_player_already_in": "Please do not enter the room you are already in.",
"replay_hint_part1": "Sending the replay of the duel number ", "replay_hint_part1": "Sending the replay of the duel number ",
"replay_hint_part2": ".", "replay_hint_part2": ".",
<<<<<<< HEAD
"invalid_side_rule": "Illegal cards are contained in your side deck.", "invalid_side_rule": "Illegal cards are contained in your side deck.",
"arena_wait_hint": "If you opponent does not appear within 25 seconds, you may quit without any penalty.", "arena_wait_hint": "If you opponent does not appear within 25 seconds, you may quit without any penalty.",
"arena_wait_timeout": "Your opponent did not appear, you may quit without any penalty.", "arena_wait_timeout": "Your opponent did not appear, you may quit without any penalty.",
...@@ -162,6 +163,9 @@ ...@@ -162,6 +163,9 @@
"auto_death_part2": " minutes.", "auto_death_part2": " minutes.",
"athletic_arena_tip": "During an athletic match, a game quit behavior is regarded as a surrender.", "athletic_arena_tip": "During an athletic match, a game quit behavior is regarded as a surrender.",
"windbot_disable_random_room": "By adding the AI, this random game won't get any new player unless they enter the room name:" "windbot_disable_random_room": "By adding the AI, this random game won't get any new player unless they enter the room name:"
=======
"athletic_arena_tip": "During an athletic match, a game quit behavior is regarded as a surrender."
>>>>>>> parent of 6a67ab4... restrict siding for some tournaments
}, },
"es-es": { "es-es": {
"random_duel_enter_room_waiting": "Tu oponente esta listo, Iniciar!", "random_duel_enter_room_waiting": "Tu oponente esta listo, Iniciar!",
...@@ -463,6 +467,7 @@ ...@@ -463,6 +467,7 @@
"challonge_player_already_in": "请不要重复加入比赛房间。", "challonge_player_already_in": "请不要重复加入比赛房间。",
"replay_hint_part1": "正在发送第", "replay_hint_part1": "正在发送第",
"replay_hint_part2": "局决斗的录像。", "replay_hint_part2": "局决斗的录像。",
<<<<<<< HEAD
"invalid_side_rule": "副卡组中包含不允许换入副卡组的卡。", "invalid_side_rule": "副卡组中包含不允许换入副卡组的卡。",
"arena_wait_hint": "若对手在25秒内不进入游戏,您退房时不会进行扣分。", "arena_wait_hint": "若对手在25秒内不进入游戏,您退房时不会进行扣分。",
"arena_wait_timeout": "由于对手未能在30秒内进入游戏,此时您退出游戏不会扣分。", "arena_wait_timeout": "由于对手未能在30秒内进入游戏,此时您退出游戏不会扣分。",
...@@ -470,6 +475,9 @@ ...@@ -470,6 +475,9 @@
"auto_death_part2": "分钟后,将自动进入加时赛。", "auto_death_part2": "分钟后,将自动进入加时赛。",
"athletic_arena_tip": "在竞技匹配中,比赛开始前退出游戏也会视为投降。", "athletic_arena_tip": "在竞技匹配中,比赛开始前退出游戏也会视为投降。",
"windbot_disable_random_room": "因为添加了AI,本随机对战房间将只能通过房间名加入:" "windbot_disable_random_room": "因为添加了AI,本随机对战房间将只能通过房间名加入:"
=======
"athletic_arena_tip": "在竞技匹配中,比赛开始前退出游戏也会视为投降。"
>>>>>>> parent of 6a67ab4... restrict siding for some tournaments
}, },
"ko-kr": { "ko-kr": {
"random_duel_enter_room_waiting": "땅콩: 게임을 진행하게 준비 또는 시작을 하십시오.", "random_duel_enter_room_waiting": "땅콩: 게임을 진행하게 준비 또는 시작을 하십시오.",
......
...@@ -3080,15 +3080,6 @@ ygopro.ctos_follow 'UPDATE_DECK', true, (buffer, info, client, server, datas)-> ...@@ -3080,15 +3080,6 @@ ygopro.ctos_follow 'UPDATE_DECK', true, (buffer, info, client, server, datas)->
CLIENT_kick(room.dueling_players[oppo_pos - win_pos]) CLIENT_kick(room.dueling_players[oppo_pos - win_pos])
CLIENT_kick(room.dueling_players[oppo_pos - win_pos + 1]) if room.hostinfo.mode == 2 CLIENT_kick(room.dueling_players[oppo_pos - win_pos + 1]) if room.hostinfo.mode == 2
return true return true
if settings.modules.side_restrict.enabled and room.duel_stage != ygopro.constants.DUEL_STAGE.BEGIN
for code in settings.modules.side_restrict.restrict_cards
if _.indexOf(buff_side, code) > -1
ygopro.stoc_send_chat_to_room(room, "${invalid_side_rule}", ygopro.constants.COLORS.RED)
ygopro.stoc_send client, 'ERROR_MSG', {
msg: 3
code: 0
}
return true
if room.random_type or room.arena if room.random_type or room.arena
if client.pos == 0 if client.pos == 0
room.waiting_for_player = room.waiting_for_player2 room.waiting_for_player = room.waiting_for_player2
......
...@@ -3860,7 +3860,7 @@ ...@@ -3860,7 +3860,7 @@
}); });
ygopro.ctos_follow('UPDATE_DECK', true, function(buffer, info, client, server, datas) { ygopro.ctos_follow('UPDATE_DECK', true, function(buffer, info, client, server, datas) {
var buff_main, buff_side, card, code, current_deck, deck, deck_array, deck_main, deck_side, deck_text, deckbuf, decks, found_deck, i, len2, len3, len4, line, m, n, o, oppo_pos, ref2, room, struct, win_pos; var buff_main, buff_side, card, current_deck, deck, deck_array, deck_main, deck_side, deck_text, deckbuf, decks, found_deck, i, len2, len3, line, m, n, oppo_pos, room, struct, win_pos;
if (settings.modules.reconnect.enabled && client.pre_reconnecting) { if (settings.modules.reconnect.enabled && client.pre_reconnecting) {
if (!CLIENT_is_able_to_reconnect(client) && !CLIENT_is_able_to_kick_reconnect(client)) { if (!CLIENT_is_able_to_reconnect(client) && !CLIENT_is_able_to_kick_reconnect(client)) {
ygopro.stoc_send_chat(client, "${reconnect_failed}", ygopro.constants.COLORS.RED); ygopro.stoc_send_chat(client, "${reconnect_failed}", ygopro.constants.COLORS.RED);
...@@ -3936,6 +3936,7 @@ ...@@ -3936,6 +3936,7 @@
} }
return true; return true;
} }
<<<<<<< HEAD
if (settings.modules.side_restrict.enabled && room.duel_stage !== ygopro.constants.DUEL_STAGE.BEGIN) { if (settings.modules.side_restrict.enabled && room.duel_stage !== ygopro.constants.DUEL_STAGE.BEGIN) {
ref2 = settings.modules.side_restrict.restrict_cards; ref2 = settings.modules.side_restrict.restrict_cards;
for (m = 0, len2 = ref2.length; m < len2; m++) { for (m = 0, len2 = ref2.length; m < len2; m++) {
...@@ -3950,6 +3951,8 @@ ...@@ -3950,6 +3951,8 @@
} }
} }
} }
=======
>>>>>>> parent of 6a67ab4... restrict siding for some tournaments
if (room.random_type || room.arena) { if (room.random_type || room.arena) {
if (client.pos === 0) { if (client.pos === 0) {
room.waiting_for_player = room.waiting_for_player2; room.waiting_for_player = room.waiting_for_player2;
...@@ -3964,8 +3967,8 @@ ...@@ -3964,8 +3967,8 @@
buffer = struct.buffer; buffer = struct.buffer;
found_deck = false; found_deck = false;
decks = fs.readdirSync(settings.modules.tournament_mode.deck_path); decks = fs.readdirSync(settings.modules.tournament_mode.deck_path);
for (n = 0, len3 = decks.length; n < len3; n++) { for (m = 0, len2 = decks.length; m < len2; m++) {
deck = decks[n]; deck = decks[m];
if (_.endsWith(deck, client.name + ".ydk")) { if (_.endsWith(deck, client.name + ".ydk")) {
found_deck = deck; found_deck = deck;
} }
...@@ -3981,8 +3984,8 @@ ...@@ -3981,8 +3984,8 @@
deck_main = []; deck_main = [];
deck_side = []; deck_side = [];
current_deck = deck_main; current_deck = deck_main;
for (o = 0, len4 = deck_array.length; o < len4; o++) { for (n = 0, len3 = deck_array.length; n < len3; n++) {
line = deck_array[o]; line = deck_array[n];
if (line.indexOf("!side") >= 0) { if (line.indexOf("!side") >= 0) {
current_deck = deck_side; current_deck = deck_side;
} }
......
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