Commit 78838e77 authored by nanahira's avatar nanahira

rearrange replay mode in ygopro server mode

parent 4939926b
......@@ -1072,7 +1072,12 @@ class Room
else
@hostinfo.auto_death = 40
@hostinfo.replay_mode = if settings.modules.tournament_mode.enabled and settings.modules.tournament_mode.replay_safe or @hostinfo.mode == 1 and settings.modules.replay_delay then 1 else 0
@hostinfo.replay_mode = 0 # 0x1: Save the replays in file. 0x2: Block the replays to observers.
if settings.modules.tournament_mode.enabled
@hostinfo.replay_mode |= 0x1
if (settings.modules.tournament_mode.enabled and settings.modules.tournament_mode.replay_safe) or (@hostinfo.mode == 1 and settings.modules.replay_delay)
@hostinfo.replay_mode |= 0x2
param = [0, @hostinfo.lflist, @hostinfo.rule, @hostinfo.mode, (if @hostinfo.enable_priority then 'T' else 'F'),
(if @hostinfo.no_check_deck then 'T' else 'F'), (if @hostinfo.no_shuffle_deck then 'T' else 'F'),
......
......@@ -1367,7 +1367,13 @@
}
}
}
this.hostinfo.replay_mode = settings.modules.tournament_mode.enabled && settings.modules.tournament_mode.replay_safe || this.hostinfo.mode === 1 && settings.modules.replay_delay ? 1 : 0;
this.hostinfo.replay_mode = 0;
if (settings.modules.tournament_mode.enabled) {
this.hostinfo.replay_mode |= 0x1;
}
if ((settings.modules.tournament_mode.enabled && settings.modules.tournament_mode.replay_safe) || (this.hostinfo.mode === 1 && settings.modules.replay_delay)) {
this.hostinfo.replay_mode |= 0x2;
}
param = [0, this.hostinfo.lflist, this.hostinfo.rule, this.hostinfo.mode, (this.hostinfo.enable_priority ? 'T' : 'F'), (this.hostinfo.no_check_deck ? 'T' : 'F'), (this.hostinfo.no_shuffle_deck ? 'T' : 'F'), this.hostinfo.start_lp, this.hostinfo.start_hand, this.hostinfo.draw_count, this.hostinfo.time_limit, this.hostinfo.replay_mode];
try {
this.process = spawn('./ygopro', param, {
......@@ -2829,9 +2835,6 @@
ygopro.stoc_send_chat_to_room(room, "${death_start_extra}", ygopro.constants.COLORS.BABYBLUE);
}
}
if (room.duel_count === 1 && room.hostinfo.auto_death) {
ygopro.stoc_send_chat_to_room(room, "${auto_death_part1}" + room.hostinfo.auto_death + "${auto_death_part2}", ygopro.constants.COLORS.BABYBLUE);
}
}
if (settings.modules.retry_handle.enabled) {
client.retry_count = 0;
......@@ -3426,6 +3429,9 @@
ROOM_players_oppentlist[player.ip] = null;
}
}
if (room.hostinfo.auto_death) {
ygopro.stoc_send_chat_to_room(room, "${auto_death_part1}" + room.hostinfo.auto_death + "${auto_death_part2}", ygopro.constants.COLORS.BABYBLUE);
}
}
if (settings.modules.hide_name && room.duel_count === 0) {
ref3 = room.get_playing_player();
......
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