Commit e592353c authored by nanahira's avatar nanahira

record additional duel logs

parent 0bd6d0cd
......@@ -654,6 +654,11 @@
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
"integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI="
},
"lzma": {
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/lzma/-/lzma-2.3.2.tgz",
"integrity": "sha1-N4OySFi5wOdHoN88vx+1/KqSxEE="
},
"mime-db": {
"version": "1.43.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz",
......
......@@ -3467,6 +3467,7 @@ ygopro.stoc_follow 'REPLAY', true, (buffer, info, client, server, datas)->
replay_filename=replay_filename + (if i > 0 then (if i == 2 then " VS " else " & ") else " ") + player.name
replay_filename=replay_filename.replace(/[\/\\\?\*]/g, '_')+".yrp"
duellog = {
id: duel_log.duel_log.length + 1,
time: dueltime,
name: room.name + (if settings.modules.tournament_mode.show_info then (" (Duel:" + room.duel_count + ")") else ""),
roomid: room.process_pid.toString(),
......@@ -3474,6 +3475,9 @@ ygopro.stoc_follow 'REPLAY', true, (buffer, info, client, server, datas)->
replay_filename: replay_filename,
roommode: room.hostinfo.mode,
players: (for player in room.dueling_players
real_name: player.name,
deckbuf: player.deckbuf.toString("base64"),
pos: player.pos
name: player.name + (if settings.modules.tournament_mode.show_ip and !player.is_local then (" (IP: " + player.ip.slice(7) + ")") else "") + (if settings.modules.tournament_mode.show_info and not (room.hostinfo.mode == 2 and player.pos % 2 > 0) then (" (Score:" + room.scores[player.name_vpass] + " LP:" + (if player.lp? then player.lp else room.hostinfo.start_lp) + (if room.hostinfo.mode != 2 then (" Cards:" + (if player.card_count? then player.card_count else room.hostinfo.start_hand)) else "") + ")") else ""),
winner: player.pos == room.winner
)
......
......@@ -4639,6 +4639,7 @@
}
replay_filename = replay_filename.replace(/[\/\\\?\*]/g, '_') + ".yrp";
duellog = {
id: duel_log.duel_log.length + 1,
time: dueltime,
name: room.name + (settings.modules.tournament_mode.show_info ? " (Duel:" + room.duel_count + ")" : ""),
roomid: room.process_pid.toString(),
......@@ -4652,6 +4653,9 @@
for (o = 0, len4 = ref4.length; o < len4; o++) {
player = ref4[o];
results.push({
real_name: player.name,
deckbuf: player.deckbuf.toString("base64"),
pos: player.pos,
name: player.name + (settings.modules.tournament_mode.show_ip && !player.is_local ? " (IP: " + player.ip.slice(7) + ")" : "") + (settings.modules.tournament_mode.show_info && !(room.hostinfo.mode === 2 && player.pos % 2 > 0) ? " (Score:" + room.scores[player.name_vpass] + " LP:" + (player.lp != null ? player.lp : room.hostinfo.start_lp) + (room.hostinfo.mode !== 2 ? " Cards:" + (player.card_count != null ? player.card_count : room.hostinfo.start_hand) : "") + ")" : ""),
winner: player.pos === room.winner
});
......
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