Commit fe8b969c authored by mercury233's avatar mercury233

add replay_mode

parent 2ccd57ee
......@@ -247,6 +247,7 @@ class Room
start_hand: 5
draw_count: 1
time_limit: 180
replay_mode: if settings.modules.tournament_mode.enabled then 1 else 0
if name[0...2] == 'M#'
@hostinfo.mode = 1
......@@ -387,7 +388,7 @@ class Room
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'),
@hostinfo.start_lp, @hostinfo.start_hand, @hostinfo.draw_count, @hostinfo.time_limit]
@hostinfo.start_lp, @hostinfo.start_hand, @hostinfo.draw_count, @hostinfo.time_limit, @hostinfo.replay_mode]
try
@process = spawn './ygopro', param, {cwd: settings.ygopro_path}
......
......@@ -353,7 +353,8 @@
start_lp: 8000,
start_hand: 5,
draw_count: 1,
time_limit: 180
time_limit: 180,
replay_mode: settings.modules.tournament_mode.enabled ? 1 : 0
});
if (name.slice(0, 2) === 'M#') {
this.hostinfo.mode = 1;
......@@ -525,7 +526,7 @@
this.hostinfo.enable_priority = true;
}
}
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];
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, {
cwd: settings.ygopro_path
......
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