mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-06-28 05:34:45 +08:00
l10n: Update
This commit is contained in:
@ -21,7 +21,8 @@ class AdvancedLocalizationUI extends HookConsumerWidget {
|
||||
final model = ref.read(advancedLocalizationUIModelProvider.notifier);
|
||||
final homeUIState = ref.watch(homeUIModelProvider);
|
||||
return makeDefaultPage(
|
||||
title: "高级汉化 -> ${homeUIState.scInstalledPath}",
|
||||
title: S.current.home_localization_advanced_title(
|
||||
homeUIState.scInstalledPath ?? "-"),
|
||||
context,
|
||||
content: state.workingText.isNotEmpty
|
||||
? Center(
|
||||
@ -40,16 +41,19 @@ class AdvancedLocalizationUI extends HookConsumerWidget {
|
||||
children: [
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'已加载汉化版本:${state.apiLocalizationData?.versionName}')),
|
||||
Text('汉化文本行数:${state.serverGlobalIniLines}'
|
||||
' P4K文本行数:${state.p4kGlobalIniLines}'),
|
||||
child: Text(S.current
|
||||
.home_localization_advanced_msg_version(
|
||||
state.apiLocalizationData?.versionName ??
|
||||
"-"))),
|
||||
Text(S.current.home_localization_advanced_title_msg(
|
||||
state.serverGlobalIniLines, state.p4kGlobalIniLines)),
|
||||
const SizedBox(width: 32),
|
||||
Button(
|
||||
child: const Padding(
|
||||
padding: EdgeInsets.only(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 12, right: 12, top: 4, bottom: 4),
|
||||
child: Text("安装汉化"),
|
||||
child: Text(S.current
|
||||
.home_localization_advanced_action_install),
|
||||
),
|
||||
onPressed: () async {
|
||||
await model.doInstall().unwrap(context: context);
|
||||
@ -128,7 +132,8 @@ class AdvancedLocalizationUI extends HookConsumerWidget {
|
||||
children: [
|
||||
makeLoading(context),
|
||||
const SizedBox(height: 6),
|
||||
const Text("正在重新生成文本..."),
|
||||
Text(
|
||||
S.current.home_localization_advanced_action_mod_change),
|
||||
],
|
||||
)
|
||||
else ...[
|
||||
@ -136,7 +141,9 @@ class AdvancedLocalizationUI extends HookConsumerWidget {
|
||||
padding: const EdgeInsets.only(left: 12, right: 12),
|
||||
child: Row(
|
||||
children: [
|
||||
const Expanded(child: Text("模式")),
|
||||
Expanded(
|
||||
child: Text(S
|
||||
.current.home_localization_advanced_action_mode)),
|
||||
ComboBox(
|
||||
value: item.mode,
|
||||
items: [
|
||||
@ -222,7 +229,8 @@ class AdvancedLocalizationUI extends HookConsumerWidget {
|
||||
const SizedBox(
|
||||
width: 24,
|
||||
),
|
||||
Text("预览:${item.className}"),
|
||||
Text(S.current.home_localization_advanced_title_preview(
|
||||
item.className ?? "-")),
|
||||
],
|
||||
),
|
||||
content: textData.value.isEmpty
|
||||
|
@ -1,8 +1,10 @@
|
||||
import 'package:starcitizen_doctor/generated/l10n.dart';
|
||||
|
||||
final advancedLocalizationJsonData = {
|
||||
"class_keys": [
|
||||
{
|
||||
"id": "location_opt",
|
||||
"class_name": "地点-其他",
|
||||
"class_name": S.current.home_localization_advanced_json_text_location_other,
|
||||
"keys": [
|
||||
"ATC_.*",
|
||||
"Crus_HistMarker_.*",
|
||||
@ -58,7 +60,7 @@ final advancedLocalizationJsonData = {
|
||||
},
|
||||
{
|
||||
"id": "location",
|
||||
"class_name": "地点-常用",
|
||||
"class_name": S.current.home_localization_advanced_json_text_location_used,
|
||||
"keys": [
|
||||
"Bacchus(?!.*_Desc).*",
|
||||
"Cano(?!.*_Desc).*",
|
||||
@ -81,7 +83,7 @@ final advancedLocalizationJsonData = {
|
||||
]
|
||||
},
|
||||
{
|
||||
"class_name": "物品-其他",
|
||||
"class_name": S.current.home_localization_advanced_json_text_things_other,
|
||||
"id": "thing_opt",
|
||||
"keys": [
|
||||
"BarMenu_.*",
|
||||
@ -96,12 +98,12 @@ final advancedLocalizationJsonData = {
|
||||
]
|
||||
},
|
||||
{
|
||||
"class_name": "物品-常用",
|
||||
"class_name": S.current.home_localization_advanced_json_text_things_used,
|
||||
"id": "thing",
|
||||
"keys": ["item_Name.*"]
|
||||
},
|
||||
{
|
||||
"class_name": "载具-其他",
|
||||
"class_name": S.current.home_localization_advanced_json_text_vehicle_other,
|
||||
"id": "vehicle_name",
|
||||
"keys": [
|
||||
"vehicle_Desc.*",
|
||||
@ -111,13 +113,13 @@ final advancedLocalizationJsonData = {
|
||||
]
|
||||
},
|
||||
{
|
||||
"class_name": "载具-常用",
|
||||
"class_name": S.current.home_localization_advanced_json_text_vehicle_used,
|
||||
"id": "vehicle",
|
||||
"keys": ["vehicle_Name.*"]
|
||||
},
|
||||
{
|
||||
"id": "mission",
|
||||
"class_name": "任务/日志",
|
||||
"class_name": S.current.home_localization_advanced_json_text_mission_or_logs,
|
||||
"keys": [
|
||||
"BasicSalvage_.*",
|
||||
"BitZeros_.*",
|
||||
@ -377,7 +379,7 @@ final advancedLocalizationJsonData = {
|
||||
},
|
||||
{
|
||||
"id": "subtitle",
|
||||
"class_name": "字幕",
|
||||
"class_name": S.current.home_localization_advanced_json_text_subtitle,
|
||||
"keys": [
|
||||
"DXSH_",
|
||||
"Dlg_SC_.*",
|
||||
@ -402,7 +404,7 @@ final advancedLocalizationJsonData = {
|
||||
},
|
||||
{
|
||||
"id": "ui",
|
||||
"class_name": "UI/HUD/菜单",
|
||||
"class_name": S.current.home_localization_advanced_json_text_ui_or_hud_or_menu,
|
||||
"keys": [
|
||||
".*_RepUI_.*",
|
||||
"CharacterCustomizer_.*",
|
||||
@ -558,4 +560,4 @@ final advancedLocalizationJsonData = {
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
@ -33,10 +33,14 @@ class AdvancedLocalizationUIState with _$AdvancedLocalizationUIState {
|
||||
|
||||
extension AdvancedLocalizationUIStateEx on AdvancedLocalizationUIState {
|
||||
Map<AppAdvancedLocalizationClassKeysDataMode, String> get typeNames => {
|
||||
AppAdvancedLocalizationClassKeysDataMode.localization: "汉化",
|
||||
AppAdvancedLocalizationClassKeysDataMode.unLocalization: "英文原文",
|
||||
AppAdvancedLocalizationClassKeysDataMode.mixed: "双语",
|
||||
AppAdvancedLocalizationClassKeysDataMode.mixedNewline: "双语(换行)",
|
||||
AppAdvancedLocalizationClassKeysDataMode.localization:
|
||||
S.current.home_localization_advanced_action_mod_change_localization,
|
||||
AppAdvancedLocalizationClassKeysDataMode.unLocalization: S.current
|
||||
.home_localization_advanced_action_mod_change_un_localization,
|
||||
AppAdvancedLocalizationClassKeysDataMode.mixed:
|
||||
S.current.home_localization_advanced_action_mod_change_mixed,
|
||||
AppAdvancedLocalizationClassKeysDataMode.mixedNewline: S
|
||||
.current.home_localization_advanced_action_mod_change_mixed_newline,
|
||||
};
|
||||
}
|
||||
|
||||
@ -57,8 +61,15 @@ class AdvancedLocalizationUIModel extends _$AdvancedLocalizationUIModel {
|
||||
await _readIni(localizationUIState, localizationUIModel);
|
||||
final ald = await _readClassJson();
|
||||
if (ald.classKeys == null) return;
|
||||
state = state.copyWith(workingText: "正在分类 ...");
|
||||
final m = await compute(_doClassIni, (ald, p4kGlobalIni, serverGlobalIni));
|
||||
state = state.copyWith(
|
||||
workingText: S.current.home_localization_advanced_msg_classifying);
|
||||
final m = await compute(_doClassIni, (
|
||||
ald,
|
||||
p4kGlobalIni,
|
||||
serverGlobalIni,
|
||||
S.current.home_localization_advanced_json_text_un_localization,
|
||||
S.current.home_localization_advanced_json_text_others
|
||||
));
|
||||
final p4kGlobalIniLines = p4kGlobalIni.split("\n").length;
|
||||
final serverGlobalIniLines = serverGlobalIni.split("\n").length;
|
||||
state = state.copyWith(
|
||||
@ -74,24 +85,28 @@ class AdvancedLocalizationUIModel extends _$AdvancedLocalizationUIModel {
|
||||
(
|
||||
AppAdvancedLocalizationData ald,
|
||||
String p4kGlobalIni,
|
||||
String serverGlobalIni
|
||||
String serverGlobalIni,
|
||||
String unLocalizationClassName,
|
||||
String othersClassName,
|
||||
) v,
|
||||
) {
|
||||
final (
|
||||
AppAdvancedLocalizationData ald,
|
||||
String p4kGlobalIni,
|
||||
String serverGlobalIni,
|
||||
String unLocalizationClassName,
|
||||
String othersClassName,
|
||||
) = v;
|
||||
final unLocalization = AppAdvancedLocalizationClassKeysData(
|
||||
id: "un_localization",
|
||||
className: "未汉化",
|
||||
className: unLocalizationClassName,
|
||||
keys: [],
|
||||
)
|
||||
..mode = AppAdvancedLocalizationClassKeysDataMode.unLocalization
|
||||
..lockMod = true;
|
||||
final unClass = AppAdvancedLocalizationClassKeysData(
|
||||
id: "un_class",
|
||||
className: "其他",
|
||||
className: othersClassName,
|
||||
keys: [],
|
||||
);
|
||||
final classMap = <String, AppAdvancedLocalizationClassKeysData>{
|
||||
@ -158,10 +173,13 @@ class AdvancedLocalizationUIModel extends _$AdvancedLocalizationUIModel {
|
||||
final homeUIState = ref.read(homeUIModelProvider);
|
||||
final gameDir = homeUIState.scInstalledPath;
|
||||
if (gameDir == null) return ("", "");
|
||||
state = state.copyWith(workingText: "读取 p4k 文件 ...");
|
||||
state = state.copyWith(
|
||||
workingText: S.current.home_localization_advanced_msg_reading_p4k);
|
||||
final p4kGlobalIni = await readEnglishInI(gameDir);
|
||||
dPrint("read p4kGlobalIni => ${p4kGlobalIni.length}");
|
||||
state = state.copyWith(workingText: "获取汉化文本 ...");
|
||||
state = state.copyWith(
|
||||
workingText: S.current
|
||||
.home_localization_advanced_msg_reading_server_localization_text);
|
||||
final apiLocalizationData =
|
||||
localizationUIState.apiLocalizationData?.values.firstOrNull;
|
||||
if (apiLocalizationData == null) return ("", "");
|
||||
@ -239,7 +257,9 @@ class AdvancedLocalizationUIModel extends _$AdvancedLocalizationUIModel {
|
||||
}
|
||||
|
||||
Future<bool> doInstall() async {
|
||||
state = state.copyWith(workingText: "生成汉化文件...");
|
||||
state = state.copyWith(
|
||||
workingText:
|
||||
S.current.home_localization_advanced_msg_gen_localization_text);
|
||||
final classMap = state.classMap!;
|
||||
final globalIni = StringBuffer();
|
||||
for (var item in classMap.values) {
|
||||
@ -248,7 +268,9 @@ class AdvancedLocalizationUIModel extends _$AdvancedLocalizationUIModel {
|
||||
await Future.delayed(Duration.zero);
|
||||
}
|
||||
}
|
||||
state = state.copyWith(workingText: "安装汉化文件...");
|
||||
state = state.copyWith(
|
||||
workingText:
|
||||
S.current.home_localization_advanced_msg_gen_localization_install);
|
||||
final localizationUIModel = ref.read(localizationUIModelProvider.notifier);
|
||||
await localizationUIModel.installFormString(
|
||||
globalIni, state.apiLocalizationData?.versionName ?? "-",
|
||||
|
@ -7,7 +7,7 @@ part of 'advanced_localization_ui_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
String _$advancedLocalizationUIModelHash() =>
|
||||
r'2db0a21dd98f5fb002469fcefe1bc1c0d514e135';
|
||||
r'acf91fc467108c3669d8ddd6fed3c24434be4ae8';
|
||||
|
||||
/// See also [AdvancedLocalizationUIModel].
|
||||
@ProviderFor(AdvancedLocalizationUIModel)
|
||||
|
@ -86,7 +86,7 @@ class LocalizationDialogUI extends HookConsumerWidget {
|
||||
Row(
|
||||
children: [
|
||||
Text(S.current.localization_info_installed_version(
|
||||
"${state.patchStatus?.value ?? ""} ${(state.isInstalledAdvanced ?? false) ? " (高级汉化)" : ""}")),
|
||||
"${state.patchStatus?.value ?? ""} ${(state.isInstalledAdvanced ?? false) ? S.current.home_localization_msg_version_advanced : ""}")),
|
||||
const Spacer(),
|
||||
if (state.patchStatus?.value !=
|
||||
S.current.home_action_info_game_built_in)
|
||||
@ -426,7 +426,7 @@ class LocalizationDialogUI extends HookConsumerWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
item.value.note ?? "该版本没有提供描述",
|
||||
item.value.note ?? S.current.home_localization_msg_no_note,
|
||||
style: const TextStyle(fontSize: 15),
|
||||
),
|
||||
),
|
||||
@ -451,22 +451,22 @@ class LocalizationDialogUI extends HookConsumerWidget {
|
||||
final toolsMenu = {
|
||||
"launcher_mod": (
|
||||
const Icon(FluentIcons.c_plus_plus, size: 24),
|
||||
"RSI 启动器汉化",
|
||||
(S.current.home_localization_action_rsi_launcher_localization),
|
||||
),
|
||||
"advanced": (
|
||||
const Icon(FluentIcons.queue_advanced, size: 24),
|
||||
"高级汉化",
|
||||
(S.current.home_localization_action_advanced),
|
||||
),
|
||||
"custom_files": (
|
||||
const Icon(FluentIcons.custom_activity, size: 24),
|
||||
"安装自定义文件",
|
||||
(S.current.home_localization_action_install_customize),
|
||||
),
|
||||
};
|
||||
|
||||
final enableTap = state.workingVersion.isEmpty;
|
||||
|
||||
return makeListContainer(
|
||||
"汉化工具",
|
||||
S.current.home_localization_title_localization_tools,
|
||||
[
|
||||
for (final item in toolsMenu.entries)
|
||||
Tilt(
|
||||
@ -512,6 +512,6 @@ class LocalizationDialogUI extends HookConsumerWidget {
|
||||
],
|
||||
context,
|
||||
gridViewMode: true,
|
||||
gridViewCrossAxisCount: 4);
|
||||
gridViewCrossAxisCount: 3);
|
||||
}
|
||||
}
|
||||
|
@ -1,322 +1,324 @@
|
||||
import 'package:starcitizen_doctor/generated/l10n.dart';
|
||||
|
||||
final performanceUIConfJsonData = [
|
||||
{
|
||||
"key": "r_ssdo",
|
||||
"name": "屏幕光线后处理",
|
||||
"info": "调整光线后处理等级",
|
||||
"name": S.current.performance_json_text_ssdo,
|
||||
"info": S.current.performance_json_text_ssdo_info,
|
||||
"type": "int",
|
||||
"max": 2,
|
||||
"min": 0,
|
||||
"value": 1,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "r_AntialiasingMode",
|
||||
"name": "抗锯齿",
|
||||
"info": "0 关闭,1 SMAA,2 时间过滤+SMAA,3 时间滤波和投影矩阵抖动的 SMAA",
|
||||
"name": S.current.performance_json_text_antialiasing,
|
||||
"info": S.current.performance_json_text_antialiasing_info,
|
||||
"type": "int",
|
||||
"max": 3,
|
||||
"min": 0,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "sys_spec_gameeffects",
|
||||
"name": "特效等级",
|
||||
"info": "游戏特效等级",
|
||||
"name": S.current.performance_json_text_game_effects,
|
||||
"info": S.current.performance_json_text_game_effects_info,
|
||||
"type": "int",
|
||||
"max": 4,
|
||||
"min": 1,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "sys_spec_texture",
|
||||
"name": "纹理等级",
|
||||
"info": "模型纹理细节",
|
||||
"name": S.current.performance_json_text_texture,
|
||||
"info": S.current.performance_json_text_texture_info,
|
||||
"type": "int",
|
||||
"max": 3,
|
||||
"min": 1,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "sys_spec_volumetriceffects",
|
||||
"name": "体积效果",
|
||||
"info": "体积云、体积光照等",
|
||||
"name": S.current.performance_json_text_volumetric_effects,
|
||||
"info": S.current.performance_json_text_volumetric_effects_info,
|
||||
"type": "int",
|
||||
"max": 4,
|
||||
"min": 1,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "sys_spec_water",
|
||||
"name": "水体效果",
|
||||
"info": "各种水的等级",
|
||||
"name": S.current.performance_json_text_water,
|
||||
"info": S.current.performance_json_text_water_info,
|
||||
"type": "int",
|
||||
"max": 4,
|
||||
"min": 1,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "sys_spec_objectdetail",
|
||||
"name": "对象细节",
|
||||
"info": "模型对象细节,影响LOD等..",
|
||||
"name": S.current.performance_json_text_object_detail,
|
||||
"info": S.current.performance_json_text_object_detail_info,
|
||||
"type": "int",
|
||||
"max": 4,
|
||||
"min": 1,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "sys_spec_particles",
|
||||
"name": "粒子细节",
|
||||
"name": S.current.performance_json_text_particles,
|
||||
"info": "",
|
||||
"type": "int",
|
||||
"max": 4,
|
||||
"min": 1,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "sys_spec_physics",
|
||||
"name": "物理细节",
|
||||
"info": "物理效果范围",
|
||||
"name": S.current.performance_json_text_physics,
|
||||
"info": S.current.performance_json_text_physics_info,
|
||||
"type": "int",
|
||||
"max": 4,
|
||||
"min": 1,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "sys_spec_shading",
|
||||
"name": "着色器细节",
|
||||
"info": "着色器相关",
|
||||
"name": S.current.performance_json_text_shading,
|
||||
"info": S.current.performance_json_text_shading_info,
|
||||
"type": "int",
|
||||
"max": 4,
|
||||
"min": 1,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "sys_spec_shadows",
|
||||
"name": "阴影细节",
|
||||
"info": "阴影效果",
|
||||
"name": S.current.performance_json_text_shadows,
|
||||
"info": S.current.performance_json_text_shadows_info,
|
||||
"type": "int",
|
||||
"max": 4,
|
||||
"min": 1,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "sys_spec_postprocessing",
|
||||
"name": "后处理细节",
|
||||
"info": "后处理着色器,动态模糊效果 等",
|
||||
"name": S.current.performance_json_text_postprocessing,
|
||||
"info": S.current.performance_json_text_postprocessing_info,
|
||||
"type": "int",
|
||||
"max": 4,
|
||||
"min": 1,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "q_Renderer",
|
||||
"name": "渲染器质量",
|
||||
"info": "cryengine 渲染器质量",
|
||||
"name": S.current.performance_json_text_renderer,
|
||||
"info": S.current.performance_json_text_renderer_info,
|
||||
"type": "int",
|
||||
"max": 3,
|
||||
"min": 0,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "q_ShaderDecal",
|
||||
"name": "贴花质量",
|
||||
"info": "(LOGO、标志等)",
|
||||
"name": S.current.performance_json_text_shader_decal,
|
||||
"info": S.current.performance_json_text_shader_decal_info,
|
||||
"type": "int",
|
||||
"max": 3,
|
||||
"min": 0,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "q_ShaderPostProcess",
|
||||
"name": "着色器质量",
|
||||
"name": S.current.performance_json_text_shader_post_process,
|
||||
"info": "",
|
||||
"type": "int",
|
||||
"max": 3,
|
||||
"min": 0,
|
||||
"value": 3,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "q_ShaderFX",
|
||||
"name": "FX 质量",
|
||||
"name": S.current.performance_json_text_shader_fx,
|
||||
"info": "",
|
||||
"type": "int",
|
||||
"max": 3,
|
||||
"min": 0,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "q_ShaderGeneral",
|
||||
"name": "常规质量",
|
||||
"info": "整体模型质量",
|
||||
"name": S.current.performance_json_text_shader_general,
|
||||
"info": S.current.performance_json_text_shader_general_info,
|
||||
"type": "int",
|
||||
"max": 3,
|
||||
"min": 0,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "q_ShaderGlass",
|
||||
"name": "玻璃质量",
|
||||
"info": "窗、镜子等",
|
||||
"name": S.current.performance_json_text_shader_glass,
|
||||
"info": S.current.performance_json_text_shader_glass_info,
|
||||
"type": "int",
|
||||
"max": 3,
|
||||
"min": 0,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "q_ShaderHDR",
|
||||
"name": "HDR质量",
|
||||
"info": "HDR色差,亮度层级 处理 等",
|
||||
"name": S.current.performance_json_text_shader_hdr,
|
||||
"info": S.current.performance_json_text_shader_hdr_info,
|
||||
"type": "int",
|
||||
"max": 3,
|
||||
"min": 0,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "q_ShaderParticle",
|
||||
"name": "粒子质量",
|
||||
"info": "粒子效果质量",
|
||||
"name": S.current.performance_json_text_shader_particle,
|
||||
"info": S.current.performance_json_text_shader_particle_info,
|
||||
"type": "int",
|
||||
"max": 3,
|
||||
"min": 0,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "q_ShaderTerrain",
|
||||
"name": "地面质量",
|
||||
"name": S.current.performance_json_text_shader_terrain,
|
||||
"info": "",
|
||||
"type": "int",
|
||||
"max": 3,
|
||||
"min": 0,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "q_ShaderShadow",
|
||||
"name": "阴影质量",
|
||||
"name": S.current.performance_json_text_shader_shadow,
|
||||
"info": "",
|
||||
"type": "int",
|
||||
"max": 3,
|
||||
"min": 0,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "q_ShaderSky",
|
||||
"name": "天空质量",
|
||||
"name": S.current.performance_json_text_shader_sky,
|
||||
"info": "",
|
||||
"type": "int",
|
||||
"max": 3,
|
||||
"min": 0,
|
||||
"value": 2,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "e_ParticlesObjectCollisions",
|
||||
"name": "粒子碰撞",
|
||||
"info": "1 仅静态粒子 2 包括动态粒子",
|
||||
"name": S.current.performance_json_text_particles_object_collisions,
|
||||
"info": S.current.performance_json_text_particles_object_collisions_info,
|
||||
"type": "int",
|
||||
"max": 2,
|
||||
"min": 1,
|
||||
"value": 1,
|
||||
"group": "图形(修改后建议清理着色器)"
|
||||
"group": S.current.performance_json_text_title_graphics
|
||||
},
|
||||
{
|
||||
"key": "r_displayinfo",
|
||||
"name": "屏幕信息(展示帧率)",
|
||||
"info": "在屏幕右上角展示帧率,服务器信息等",
|
||||
"name": S.current.performance_json_text_displayinfo,
|
||||
"info": S.current.performance_json_text_displayinfo_info,
|
||||
"type": "int",
|
||||
"max": 4,
|
||||
"min": 0,
|
||||
"value": 1,
|
||||
"group": "设置"
|
||||
"group": S.current.app_index_menu_settings
|
||||
},
|
||||
{
|
||||
"key": "sys_maxFps",
|
||||
"name": "最大帧率",
|
||||
"info": "调整游戏最高帧率,0为不限制",
|
||||
"name": S.current.performance_json_text_max_fps,
|
||||
"info": S.current.performance_json_text_max_fps_info,
|
||||
"type": "int",
|
||||
"max": 300,
|
||||
"min": 0,
|
||||
"value": 0,
|
||||
"group": "设置"
|
||||
"group": S.current.app_index_menu_settings
|
||||
},
|
||||
{
|
||||
"key": "r_DisplaySessionInfo",
|
||||
"name": "显示会话信息",
|
||||
"info": "开启后在屏幕上显示一个二维码,用于反馈时让 CIG 快速定位相关信息",
|
||||
"name": S.current.performance_json_text_display_session,
|
||||
"info": S.current.performance_json_text_display_session_info,
|
||||
"type": "bool",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"value": 0,
|
||||
"group": "设置"
|
||||
"group": S.current.app_index_menu_settings
|
||||
},
|
||||
{
|
||||
"key": "r_VSync",
|
||||
"name": "垂直同步",
|
||||
"info": "开启以防止撕裂,关闭以提高帧率",
|
||||
"name": S.current.performance_json_text_vsync,
|
||||
"info": S.current.performance_json_text_vsync_info,
|
||||
"type": "bool",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"value": 0,
|
||||
"group": "设置"
|
||||
"group": S.current.app_index_menu_settings
|
||||
},
|
||||
{
|
||||
"key": "r_MotionBlur",
|
||||
"name": "动态模糊",
|
||||
"info": "开启以提高运动感,关闭提升观感",
|
||||
"name": S.current.performance_json_text_motion_blur,
|
||||
"info": S.current.performance_json_text_motion_blur_info,
|
||||
"type": "bool",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"value": 0,
|
||||
"group": "设置"
|
||||
"group": S.current.app_index_menu_settings
|
||||
},
|
||||
{
|
||||
"key": "cl_fov",
|
||||
"name": "FOV",
|
||||
"info": "设置视角FOV",
|
||||
"info": S.current.performance_json_text_fov,
|
||||
"type": "int",
|
||||
"max": 160,
|
||||
"min": 25,
|
||||
"value": 90,
|
||||
"group": "设置"
|
||||
"group": S.current.app_index_menu_settings
|
||||
},
|
||||
{
|
||||
"key": "ui_disableScreenFade",
|
||||
"name": "UI 淡入淡出动画",
|
||||
"name": S.current.performance_json_text_ui_animation,
|
||||
"info": "",
|
||||
"type": "bool",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"value": 1,
|
||||
"group": "设置"
|
||||
"group": S.current.app_index_menu_settings
|
||||
},
|
||||
{
|
||||
"key": "customize",
|
||||
"name": "自定义参数",
|
||||
"name": S.current.performance_json_text_custom_parameters,
|
||||
"info": "",
|
||||
"type": "customize",
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"value": 1,
|
||||
"group": "自定义"
|
||||
"group": S.current.performance_json_text_title_custom
|
||||
}
|
||||
];
|
||||
];
|
@ -47,13 +47,13 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
|
||||
final assarState = useState<RSILauncherStateData?>(null);
|
||||
|
||||
Future<void> readState() async {
|
||||
workingText.value = "读取启动器信息...";
|
||||
workingText.value = S.current.tools_rsi_launcher_enhance_init_msg1;
|
||||
assarState.value = await _readState(context).unwrap(context: context);
|
||||
if (assarState.value == null) {
|
||||
workingText.value = "";
|
||||
return;
|
||||
}
|
||||
workingText.value = "正在从网络获取增强数据...";
|
||||
workingText.value = S.current.tools_rsi_launcher_enhance_init_msg2;
|
||||
if (!context.mounted) return;
|
||||
await _loadEnhanceData(context, ref, assarState)
|
||||
.unwrap(context: context)
|
||||
@ -71,10 +71,10 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
|
||||
return;
|
||||
}
|
||||
if (!context.mounted) return;
|
||||
workingText.value = "生成补丁 ...";
|
||||
workingText.value = S.current.tools_rsi_launcher_enhance_working_msg1;
|
||||
final newScript =
|
||||
await _genNewScript(assarState).unwrap(context: context);
|
||||
workingText.value = "安装补丁,这需要一点时间,取决于您的计算机性能 ...";
|
||||
workingText.value = S.current.tools_rsi_launcher_enhance_working_msg2;
|
||||
if (!context.mounted) return;
|
||||
await assarState.value?.data
|
||||
.writeMainJs(content: utf8.encode(newScript))
|
||||
@ -99,7 +99,7 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
|
||||
onPressed:
|
||||
workingText.value.isEmpty ? Navigator.of(context).pop : null),
|
||||
const SizedBox(width: 12),
|
||||
const Text("RSI 启动器增强"),
|
||||
Text(S.current.tools_rsi_launcher_enhance_title),
|
||||
]),
|
||||
content: AnimatedSize(
|
||||
duration: const Duration(milliseconds: 130),
|
||||
@ -126,14 +126,18 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"启动器内部版本信息:${assarState.value?.version}",
|
||||
S.current.tools_rsi_launcher_enhance_msg_version(
|
||||
assarState.value?.version ?? ""),
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(.6),
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"补丁状态:${(assarState.value?.isPatchInstalled ?? false) ? "已安装" : "未安装"}",
|
||||
S.current.tools_rsi_launcher_enhance_msg_patch_status(
|
||||
(assarState.value?.isPatchInstalled ?? false)
|
||||
? S.current.localization_info_installed
|
||||
: S.current.tools_action_info_not_installed),
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(.6),
|
||||
),
|
||||
@ -141,7 +145,7 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
|
||||
],
|
||||
),
|
||||
if (assarState.value?.serverData.isEmpty ?? true) ...[
|
||||
const Text("获取增强数据失败,可能是网络问题或当前版本不支持"),
|
||||
Text(S.current.tools_rsi_launcher_enhance_msg_error),
|
||||
] else ...[
|
||||
const SizedBox(height: 24),
|
||||
if (assarState.value?.enabledLocalization != null)
|
||||
@ -158,10 +162,12 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text("RSI 启动器本地化"),
|
||||
Text(S.current
|
||||
.tools_rsi_launcher_enhance_title_localization),
|
||||
const SizedBox(height: 3),
|
||||
Text(
|
||||
"为 RSI 启动器增加多语言支持。",
|
||||
S.current
|
||||
.tools_rsi_launcher_enhance_subtitle_localization,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: Colors.white.withOpacity(.6),
|
||||
@ -198,10 +204,12 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text("RSI 启动器下载增强"),
|
||||
Text(S.current
|
||||
.tools_rsi_launcher_enhance_title_download_booster),
|
||||
const SizedBox(height: 3),
|
||||
Text(
|
||||
"下载游戏时可使用更多线程以提升下载速度,启用后请在启动器设置修改线程数。",
|
||||
S.current
|
||||
.tools_rsi_launcher_enhance_subtitle_download_booster,
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: Colors.white.withOpacity(.6),
|
||||
@ -222,15 +230,16 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
|
||||
Center(
|
||||
child: FilledButton(
|
||||
onPressed: doInstall,
|
||||
child: const Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 4, horizontal: 6),
|
||||
child: Text("安装增强补丁"),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 4, horizontal: 6),
|
||||
child: Text(S.current
|
||||
.tools_rsi_launcher_enhance_action_install),
|
||||
))),
|
||||
],
|
||||
const SizedBox(height: 16),
|
||||
Text(
|
||||
"* 如需卸载增强补丁,请覆盖安装 RSI 启动器。",
|
||||
S.current.tools_rsi_launcher_enhance_msg_uninstall,
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(.6), fontSize: 13),
|
||||
),
|
||||
@ -245,7 +254,8 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
|
||||
final lPath = await SystemHelper.getRSILauncherPath(skipEXE: true);
|
||||
if (lPath.isEmpty) {
|
||||
if (!context.mounted) return null;
|
||||
showToast(context, "未找到 RSI 启动器");
|
||||
showToast(context,
|
||||
S.current.tools_rsi_launcher_enhance_msg_error_launcher_notfound);
|
||||
return null;
|
||||
}
|
||||
dPrint("[RsiLauncherEnhanceDialogUI] rsiLauncherPath ==== $lPath");
|
||||
@ -259,7 +269,10 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
|
||||
RegExp(r"main\.(\w+)\.js").firstMatch(data.mainJsPath)?.group(1);
|
||||
if (version == null) {
|
||||
if (!context.mounted) return null;
|
||||
showToast(context, "读取启动器信息失败!");
|
||||
showToast(
|
||||
context,
|
||||
S.current
|
||||
.tools_rsi_launcher_enhance_msg_error_get_launcher_info_error);
|
||||
return null;
|
||||
}
|
||||
dPrint(
|
||||
@ -280,7 +293,8 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
|
||||
);
|
||||
} catch (e) {
|
||||
if (!context.mounted) return null;
|
||||
showToast(context, "读取启动器信息失败:$e");
|
||||
showToast(context,
|
||||
S.current.tools_rsi_launcher_enhance_msg_error_get_launcher_info_error_with_args(e));
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -390,4 +404,4 @@ class RsiLauncherEnhanceDialogUI extends HookConsumerWidget {
|
||||
}
|
||||
return scriptBuffer.toString();
|
||||
}
|
||||
}
|
||||
}
|
@ -93,8 +93,8 @@ class ToolsUIModel extends _$ToolsUIModel {
|
||||
),
|
||||
ToolsItemData(
|
||||
"rsilauncher_enhance_mod",
|
||||
"RSI 启动器增强",
|
||||
"启动器汉化,下载线程增强",
|
||||
S.current.tools_rsi_launcher_enhance_title,
|
||||
S.current.tools_action_rsi_launcher_enhance_info,
|
||||
const Icon(FluentIcons.c_plus_plus, size: 24),
|
||||
onTap: () => rsiEnhance(context),
|
||||
),
|
||||
@ -114,8 +114,8 @@ class ToolsUIModel extends _$ToolsUIModel {
|
||||
),
|
||||
ToolsItemData(
|
||||
"unp4kc",
|
||||
"P4K 查看器",
|
||||
"解包星际公民 p4k 文件",
|
||||
"${S.current.tools_action_unp4k}",
|
||||
"${S.current.tools_action_unp4k_info}",
|
||||
const Icon(FontAwesomeIcons.fileZipper, size: 24),
|
||||
onTap: () => _unp4kc(context),
|
||||
),
|
||||
@ -596,15 +596,11 @@ class ToolsUIModel extends _$ToolsUIModel {
|
||||
static rsiEnhance(BuildContext context) async {
|
||||
final userOK = await showConfirmDialogs(
|
||||
context,
|
||||
"RSI 启动器增强使用须知",
|
||||
const Column(
|
||||
S.current.tools_rsi_launcher_enhance_note_title,
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
"RSI 启动器增强是一项社区功能,它会在您的电脑上解包 \"RSI Launcher\" 并加入额外的增强功能,具体使用哪些功能由您决定。"
|
||||
"\n\n目前,官方(CIG)仅许可我们进行多语言操作,启动器下载增强是我们认为有用的额外功能,违反cig用户协议(https://robertsspaceindustries.com/eula)可能导致账号被封禁等严重后果,是否启用由您自己决定,我们不对可能产生的后果(游戏损坏,账号封禁等)承担任何责任。"
|
||||
"\n\n对于启动器的修改内容,我们开源于:https://github.com/StarCitizenToolBox/RSILauncherEnhance,如有需要,您可自行查阅。"
|
||||
"\n\n如果您因为任何原因需要取消此增强补丁,请直接覆盖安装官方启动器。"),
|
||||
Text(S.current.tools_rsi_launcher_enhance_note_msg),
|
||||
],
|
||||
),
|
||||
constraints:
|
||||
@ -623,4 +619,4 @@ class ToolsUIModel extends _$ToolsUIModel {
|
||||
context: context,
|
||||
builder: (BuildContext context) => const RsiLauncherEnhanceDialogUI());
|
||||
}
|
||||
}
|
||||
}
|
@ -20,7 +20,7 @@ class UnP4kcUI extends HookConsumerWidget {
|
||||
final files = model.getFiles();
|
||||
final paths = state.curPath.trim().split("\\");
|
||||
return makeDefaultPage(context,
|
||||
title: "P4K 查看器 -> ${model.getGamePath()}",
|
||||
title: S.current.tools_unp4k_title(model.getGamePath()),
|
||||
useBodyContainer: false,
|
||||
content: state.files == null
|
||||
? Column(
|
||||
@ -187,8 +187,9 @@ class UnP4kcUI extends HookConsumerWidget {
|
||||
Expanded(
|
||||
child: Container(
|
||||
child: state.tempOpenFile == null
|
||||
? const Center(
|
||||
child: Text("单击文件以预览"),
|
||||
? Center(
|
||||
child:
|
||||
Text(S.current.tools_unp4k_view_file),
|
||||
)
|
||||
: state.tempOpenFile?.key == "loading"
|
||||
? makeLoading(context)
|
||||
@ -207,14 +208,19 @@ class UnP4kcUI extends HookConsumerWidget {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
"未知文件类型\n${state.tempOpenFile?.value}"),
|
||||
Text(S.current
|
||||
.tools_unp4k_msg_unknown_file_type(
|
||||
state.tempOpenFile
|
||||
?.value ??
|
||||
"")),
|
||||
const SizedBox(height: 32),
|
||||
FilledButton(
|
||||
child: const Padding(
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsets.all(4),
|
||||
child: Text("打开文件夹"),
|
||||
const EdgeInsets
|
||||
.all(4),
|
||||
child: Text(S.current
|
||||
.action_open_folder),
|
||||
),
|
||||
onPressed: () {
|
||||
SystemHelper.openDir(
|
||||
|
Reference in New Issue
Block a user