feat: enhance log analyzer to include vehicle destruction details

This commit is contained in:
xkeyC 2025-04-06 02:37:23 +08:00
parent 320ce177b9
commit a75a580b2d
13 changed files with 50 additions and 30 deletions

View File

@ -129,8 +129,8 @@ class MessageLookup extends MessageLookupByLibrary {
static String m46(v0) => "Detailed information: ${v0}";
static String m47(v0, v1, v2) =>
"Kills: ${v0} Deaths: ${v1} Suicides: ${v2}";
static String m47(v0, v1, v2, v3, v4) =>
"Kills: ${v0} Deaths: ${v1} Suicides: ${v2} \nVehicle Destruction (Soft Death): ${v3} Vehicle Destruction (Disintegration): ${v4}";
static String m48(v0, v1) => "Mode: ${v0} Time taken: ${v1} seconds";

View File

@ -124,7 +124,8 @@ class MessageLookup extends MessageLookupByLibrary {
static String m46(v0) => "詳細情報:${v0}";
static String m47(v0, v1, v2) => "キル数:${v0} 死亡数:${v1} 自殺数:${v2}";
static String m47(v0, v1, v2, v3, v4) =>
"キル数:${v0} デス数:${v1} 自殺回数:${v2} \n機体破壊(ソフトデス):${v3} 機体破壊(解体):${v4}";
static String m48(v0, v1) => "モード:${v0} 所要時間:${v1}";

View File

@ -129,8 +129,8 @@ class MessageLookup extends MessageLookupByLibrary {
static String m46(v0) => "Подробная информация: ${v0}";
static String m47(v0, v1, v2) =>
"Убийств: ${v0} Смертей: ${v1} Самоубийств: ${v2}";
static String m47(v0, v1, v2, v3, v4) =>
"Убийства: ${v0} Смерти: ${v1} Самоубийства: ${v2} \nУничтожение техники (Мягкая смерть): ${v3} Уничтожение техники (Распад): ${v4}";
static String m48(v0, v1) => "Режим: ${v0} Время: ${v1} секунд";

View File

@ -120,7 +120,8 @@ class MessageLookup extends MessageLookupByLibrary {
static String m46(v0) => "详细信息:${v0}";
static String m47(v0, v1, v2) => "击杀次数:${v0} 死亡次数:${v1} 自杀次数:${v2}";
static String m47(v0, v1, v2, v3, v4) =>
"击杀次数:${v0} 死亡次数:${v1} 自杀次数:${v2} \n载具损毁(软死亡):${v3} 载具损毁(解体):${v4}";
static String m48(v0, v1) => "模式:${v0} 用时:${v1}";

View File

@ -120,7 +120,8 @@ class MessageLookup extends MessageLookupByLibrary {
static String m46(v0) => "詳細資訊:${v0}";
static String m47(v0, v1, v2) => "擊殺次數:${v0} 死亡次數:${v1} 自殺次數:${v2}";
static String m47(v0, v1, v2, v3, v4) =>
"擊殺次數:${v0} 死亡次數:${v1} 自殺次數:${v2} \n載具損壞(軟死亡):${v3} 載具損壞(解體):${v4}";
static String m48(v0, v1) => "模式:${v0} 用時:${v1}";

View File

@ -5620,17 +5620,19 @@ class S {
);
}
/// `Kills: {v0} Deaths: {v1} Suicides: {v2}`
/// `Kills: {v0} Deaths: {v1} Suicides: {v2} \nVehicle Destruction (Soft Death): {v3} Vehicle Destruction (Disintegration): {v4}`
String log_analyzer_kill_death_suicide_count(
Object v0,
Object v1,
Object v2,
Object v3,
Object v4,
) {
return Intl.message(
'Kills: $v0 Deaths: $v1 Suicides: $v2',
'Kills: $v0 Deaths: $v1 Suicides: $v2 \nVehicle Destruction (Soft Death): $v3 Vehicle Destruction (Disintegration): $v4',
name: 'log_analyzer_kill_death_suicide_count',
desc: '',
args: [v0, v1, v2],
args: [v0, v1, v2, v3, v4],
);
}

View File

@ -873,7 +873,7 @@
"log_analyzer_no_crash_detected": "No game crash information detected",
"log_analyzer_game_crash": "Game Crash ",
"log_analyzer_kill_summary": "Kill Summary",
"log_analyzer_kill_death_suicide_count": "Kills: {v0} Deaths: {v1} Suicides: {v2}",
"log_analyzer_kill_death_suicide_count": "Kills: {v0} Deaths: {v1} Suicides: {v2} \nVehicle Destruction (Soft Death): {v3} Vehicle Destruction (Disintegration): {v4}",
"log_analyzer_play_time": "Play Time",
"log_analyzer_play_time_format": "{v0} hours {v1} minutes {v2} seconds",
"log_analyzer_game_start": "Game Start",

View File

@ -872,7 +872,7 @@
"log_analyzer_no_crash_detected": "ゲームクラッシュ情報は検出されませんでした",
"log_analyzer_game_crash": "ゲームクラッシュ ",
"log_analyzer_kill_summary": "キル概要",
"log_analyzer_kill_death_suicide_count": "キル数:{v0} 死亡数:{v1} 自殺数:{v2}",
"log_analyzer_kill_death_suicide_count": "キル数:{v0} デス数:{v1} 自殺回数:{v2} \n機体破壊ソフトデス{v3} 機体破壊(解体):{v4}",
"log_analyzer_play_time": "プレイ時間",
"log_analyzer_play_time_format": "{v0}時間{v1}分{v2}秒",
"log_analyzer_game_start": "ゲーム起動",

View File

@ -873,7 +873,7 @@
"log_analyzer_no_crash_detected": "Сбои игры не обнаружены",
"log_analyzer_game_crash": "Сбой игры ",
"log_analyzer_kill_summary": "Сводка убийств",
"log_analyzer_kill_death_suicide_count": "Убийств: {v0} Смертей: {v1} Самоубийств: {v2}",
"log_analyzer_kill_death_suicide_count": "Убийства: {v0} Смерти: {v1} Самоубийства: {v2} \nУничтожение техники (Мягкая смерть): {v3} Уничтожение техники (Распад): {v4}",
"log_analyzer_play_time": "Время игры",
"log_analyzer_play_time_format": "{v0} часов {v1} минут {v2} секунд",
"log_analyzer_game_start": "Запуск игры",

View File

@ -873,7 +873,7 @@
"log_analyzer_no_crash_detected": "未检测到游戏崩溃信息",
"log_analyzer_game_crash": "游戏崩溃 ",
"log_analyzer_kill_summary": "击杀总结",
"log_analyzer_kill_death_suicide_count": "击杀次数:{v0} 死亡次数:{v1} 自杀次数:{v2}",
"log_analyzer_kill_death_suicide_count": "击杀次数:{v0} 死亡次数:{v1} 自杀次数:{v2} \n载具损毁软死亡{v3} 载具损毁(解体):{v4}",
"log_analyzer_play_time": "游玩时长",
"log_analyzer_play_time_format": "{v0} 小时 {v1} 分钟 {v2} 秒",
"log_analyzer_game_start": "游戏启动",

View File

@ -875,7 +875,7 @@
"log_analyzer_no_crash_detected": "未檢測到遊戲崩潰資訊",
"log_analyzer_game_crash": "遊戲崩潰 ",
"log_analyzer_kill_summary": "擊殺總結",
"log_analyzer_kill_death_suicide_count": "擊殺次數:{v0} 死亡次數:{v1} 自殺次數:{v2}",
"log_analyzer_kill_death_suicide_count": "擊殺次數:{v0} 死亡次數:{v1} 自殺次數:{v2} \n載具損壞軟死亡{v3} 載具損壞(解體):{v4}",
"log_analyzer_play_time": "遊玩時長",
"log_analyzer_play_time_format": "{v0} 小時 {v1} 分鐘 {v2} 秒",
"log_analyzer_game_start": "遊戲啟動",

View File

@ -59,6 +59,8 @@ class ToolsLogAnalyze extends _$ToolsLogAnalyze {
int _killCount = 0; //
int _deathCount = 0; //
int _selfKillCount = 0; //
int _vehicleDestructionCount = 0; //
int _vehicleDestructionCountHard = 0; //
DateTime? _gameStartTime; //
int _gameCrashLineNumber = -1; // ${S.current.log_analyzer_filter_game_crash}
int _currentLineNumber = 0; //
@ -70,6 +72,8 @@ class ToolsLogAnalyze extends _$ToolsLogAnalyze {
_killCount = 0;
_deathCount = 0;
_selfKillCount = 0;
_vehicleDestructionCount = 0;
_vehicleDestructionCountHard = 0;
_gameStartTime = null;
_gameCrashLineNumber = -1;
} else if (startLine > logLines.length) {
@ -126,6 +130,8 @@ class ToolsLogAnalyze extends _$ToolsLogAnalyze {
_killCount,
_deathCount,
_selfKillCount,
_vehicleDestructionCount,
_vehicleDestructionCountHard,
),
));
}
@ -314,11 +320,9 @@ class ToolsLogAnalyze extends _$ToolsLogAnalyze {
final hitEntity = safeExtract(patterns['hit_entity']!, line) ?? 'Unknown';
final hitEntityVehicle = safeExtract(patterns['hit_entity_vehicle']!, line) ?? 'Unknown Vehicle';
final distance = double.tryParse(safeExtract(patterns['distance']!, line) ?? '') ?? 0.0;
return LogAnalyzeLineData(
type: "fatal_collision",
title: S.current.log_analyzer_filter_fatal_collision,
// data: "区域:$zone 玩家驾驶:${playerPilot ? '' : ''} 碰撞实体:$hitEntity \n碰撞载具: $hitEntityVehicle 碰撞距离:$distance ",
data: S.current.log_analyzer_collision_details(
zone,
playerPilot ? '' : '',
@ -345,6 +349,14 @@ class ToolsLogAnalyze extends _$ToolsLogAnalyze {
final destructionLevelMap = {1: S.current.log_analyzer_soft_death, 2: S.current.log_analyzer_disintegration};
if (causedBy.trim() == _playerName) {
if (destructionLevel == 1) {
_vehicleDestructionCount++;
} else if (destructionLevel == 2) {
_vehicleDestructionCountHard++;
}
}
return LogAnalyzeLineData(
type: "vehicle_destruction",
title: S.current.log_analyzer_filter_vehicle_damaged,

View File

@ -233,22 +233,25 @@ class ToolsLogAnalyzeDialogUI extends HookConsumerWidget {
if (lastListSize.value == 0) {
lastListSize.value = logResp.value?.length ?? 0;
} else {
//
if (listCtrl.position.pixels >= listCtrl.position.maxScrollExtent) {
//
if ((logResp.value?.length ?? 0) > lastListSize.value) {
Future.delayed(Duration(milliseconds: 100)).then((_) {
listCtrl.jumpTo(listCtrl.position.maxScrollExtent);
});
lastListSize.value = logResp.value?.length ?? 0;
} else {
//
if (listCtrl.position.pixels > 0) {
listCtrl.jumpTo(0);
//
if (listCtrl.position.maxScrollExtent > listCtrl.position.viewportDimension) {
//
if (listCtrl.position.pixels >= listCtrl.position.maxScrollExtent) {
//
if ((logResp.value?.length ?? 0) > lastListSize.value) {
Future.delayed(Duration(milliseconds: 100)).then((_) {
listCtrl.jumpTo(listCtrl.position.maxScrollExtent);
});
lastListSize.value = logResp.value?.length ?? 0;
} else {
//
if (listCtrl.position.pixels > 0) {
listCtrl.jumpTo(0);
}
}
}
}
}
});
}
}
}