Commit 1af908a5 authored by nanahira's avatar nanahira

update

parent 8ec0b269
...@@ -94,7 +94,8 @@ ...@@ -94,7 +94,8 @@
"deck_path": "./decks/", "deck_path": "./decks/",
"replay_safe": true, "replay_safe": true,
"replay_path": "./replays/", "replay_path": "./replays/",
"show_ip": false, "show_ip": false,
"show_info": true,
"duel_log": [], "duel_log": [],
"password": "123456", "password": "123456",
"port": 7933 "port": 7933
...@@ -221,7 +222,7 @@ ...@@ -221,7 +222,7 @@
"websocket_roomlist": false, "websocket_roomlist": false,
"public_roomlist": false, "public_roomlist": false,
"show_ip": false, "show_ip": false,
"show_info": false, "show_info": true,
"ssl": { "ssl": {
"enabled": false, "enabled": false,
"port": 7923, "port": 7923,
......
...@@ -448,6 +448,7 @@ ...@@ -448,6 +448,7 @@
this.random_type = ''; this.random_type = '';
this.welcome = ''; this.welcome = '';
this.scores = {}; this.scores = {};
this.duel_count = 0;
ROOM_all.push(this); ROOM_all.push(this);
this.hostinfo || (this.hostinfo = JSON.parse(JSON.stringify(settings.hostinfo))); this.hostinfo || (this.hostinfo = JSON.parse(JSON.stringify(settings.hostinfo)));
if (settings.lflist.length) { if (settings.lflist.length) {
...@@ -1537,6 +1538,7 @@ ...@@ -1537,6 +1538,7 @@
client.lp = room.hostinfo.start_lp; client.lp = room.hostinfo.start_lp;
if (client.pos === 0) { if (client.pos === 0) {
room.turn = 0; room.turn = 0;
room.duel_count = room.duel_count + 1;
} }
} }
if (ygopro.constants.MSG[msg] === 'NEW_TURN') { if (ygopro.constants.MSG[msg] === 'NEW_TURN') {
...@@ -2368,7 +2370,7 @@ ...@@ -2368,7 +2370,7 @@
replay_filename = replay_filename.replace(/[\/\\\?\*]/g, '_') + ".yrp"; replay_filename = replay_filename.replace(/[\/\\\?\*]/g, '_') + ".yrp";
duellog = { duellog = {
time: dueltime, time: dueltime,
name: room.name, name: room.name + (settings.modules.tournament_mode.show_info ? (" (Duel:" + room.duel_count + ")") : ""),
roomid: room.port.toString(), roomid: room.port.toString(),
cloud_replay_id: "R#" + room.cloud_replay_id, cloud_replay_id: "R#" + room.cloud_replay_id,
replay_filename: replay_filename, replay_filename: replay_filename,
...@@ -2380,7 +2382,10 @@ ...@@ -2380,7 +2382,10 @@
player = ref1[k]; player = ref1[k];
var cname = player.name; var cname = player.name;
if (settings.modules.tournament_mode.show_ip && player.ip !== '::ffff:127.0.0.1') { if (settings.modules.tournament_mode.show_ip && player.ip !== '::ffff:127.0.0.1') {
cname = player.name + " (IP: " + player.ip.slice(7) + ")" cname = player.name + " (IP: " + player.ip.slice(7) + ")";
}
if (settings.modules.http.show_info && room.started && !(room.hostinfo.mode === 2 && player.pos > 1)) {
cname = cname + " (Score:" + room.scores[player.name] + " LP:" + (player.lp != null ? player.lp : room.hostinfo.start_lp) + ")";
} }
results.push({ results.push({
name: cname, name: cname,
...@@ -2532,7 +2537,7 @@ ...@@ -2532,7 +2537,7 @@
} }
return results1; return results1;
})(), })(),
istart: room.started ? ((settings.modules.http.show_info) ? ("Turn: " + (room.turn != null ? room.turn : 0)) : 'start') : 'wait' istart: room.started ? ((settings.modules.http.show_info) ? ("Duel:" + room.duel_count + " Turn: " + (room.turn != null ? room.turn : 0)) : 'start') : 'wait'
}); });
} }
} }
......
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