Skip to content

Commit

Permalink
Merge pull request #232 from KizKizz/system-rework
Browse files Browse the repository at this point in the history
System rework
  • Loading branch information
KizKizz authored Jul 7, 2024
2 parents 1c7173e + 45bc25c commit b2f7766
Show file tree
Hide file tree
Showing 15 changed files with 250 additions and 138 deletions.
5 changes: 5 additions & 0 deletions Language/CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@
"uiSelectAqmFile": "选择一个AQM文件",
"uiReSelectAqmFile": "重新选择aqm文件",
"uiSelectFile": "选择文件",
"uiAntiCheatSelect": "Anticheat (JP only)",
"uiGameguard": "Gameguard",
"uiWellbia": "Wellbia",
"uiWellbiaLoaderFileNotFound": "Wellbia loader file not found\nPlease start the game once using the official launcher with Wellbia enabled on the launcher\nThen try again",
"uiCouldNotCreateCustomLauncher": "Could not create custom launcher",
"uiReSelectFile": "重新选择文件",
"uiInjectCustomAqmToBasewearsAndSetwears": "将自定义AQM文件注入到基底服装和套装服饰",
"uiItemList": "物品列表",
Expand Down
5 changes: 5 additions & 0 deletions Language/EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@
"uiSelectAqmFile": "Select an aqm File",
"uiReSelectAqmFile": "Reselect aqm File",
"uiInjectCustomAqmToBasewearsAndSetwears": "Inject custom aqm to Basewears and Setwears",
"uiAntiCheatSelect": "Anticheat (JP only)",
"uiGameguard": "Gameguard",
"uiWellbia": "Wellbia",
"uiWellbiaLoaderFileNotFound": "Wellbia loader file not found\nPlease start the game once using the official launcher with Wellbia enabled in the launcher\nThen try again",
"uiCouldNotCreateCustomLauncher": "Could not create custom launcher",
"uiItemList": "Item List",
"uiLoadingUILanguage": "Loading UI Language",
"uiReloadingMods": "Reloading Mods",
Expand Down
5 changes: 5 additions & 0 deletions Language/JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@
"uiSelectAqmFile": "aqmファイルを選択する",
"uiReSelectAqmFile": "aqmファイルを再選択する",
"uiInjectCustomAqmToBasewearsAndSetwears": "ベースウェアとセットウェアにカスタムaqmを注入する",
"uiAntiCheatSelect": "アンティコート(JPのみ)",
"uiGameguard": "ゲームガード",
"uiWellbia": "ウェルビア",
"uiWellbiaLoaderFileNotFound": "Wellbiaローダーファイルが見つかりません\n公式ランチャーを使用し、ランチャーでWellbiaを有効にしてゲームを一度起動してください\nそれからもう一度",
"uiCouldNotCreateCustomLauncher": "カスタムランチャーを作成できませんでした",
"uiItemList": "アイテムリスト",
"uiLoadingUILanguage": "UI言語の読み込み",
"uiReloadingMods": "リローディングモッズ",
Expand Down
11 changes: 5 additions & 6 deletions app_version_check/app_version.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"name": "PSO2NGS Mod Manager",
"version": "2.7.12",
"version": "2.7.13",
"description": [
"Fixed a problem where Mod Manager could not figure out some paths when reselect pso_bin and Mod Manager Main folders",
"Added custom aqm injection to Basewears and Setwears (Both mods and original items)",
"Fixed a problem where mod manager did not check for existing mod names when renaming a mod",
"Added a button in Settings to switch between Gameguard or Wellbia anticheat when launching the game with Mod Manager (JP version only)",
"More bug fixes",
"pso_binとMod Managerのメインフォルダを再選択する際、Mod Managerが一部のパスを把握できなかった問題を修正",
"ベースウェアとセットウェアにカスタムaqmファイルのインジェクションを追加",
"一部のJPユーザーはv2.7からMODを追加する際に問題が発生しています",
"MODの名前を変更する際に、MODマネージャが既存のMODの名前をチェックしていなかった問題を修正",
"MODマネージャーでゲームを起動する際、ゲームガードとウェルビアアンチヒートを切り替えるボタンを設定に追加(JP版のみ)",
"その他のバグ修正"
],
"windows_file": "",
Expand Down
39 changes: 19 additions & 20 deletions lib/functions/mods_rename_functions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Future<String> modsRenameDialog(context, String parentLocationPath, String curLo
textAlignVertical: TextAlignVertical.center,
inputFormatters: <TextInputFormatter>[FilteringTextInputFormatter.deny(RegExp('[\\/:*?"<>|]'))],
validator: (value) {
if (Directory(parentLocationPath).listSync().where((element) => p.basename(element.path) == newName.text).isNotEmpty) {
if (Directory(parentLocationPath).listSync().where((element) => p.basenameWithoutExtension(element.path).toLowerCase() == newName.text.toLowerCase()).isNotEmpty) {
return curLangText!.uiNameAlreadyExisted;
}
return null;
Expand Down Expand Up @@ -83,9 +83,8 @@ Future<String> modsRenameDialog(context, String parentLocationPath, String curLo
borderRadius: BorderRadius.circular(2),
)),
onChanged: (value) async {
setState(() {
nameFormKey.currentState!.validate();
});
nameFormKey.currentState!.validate();
setState(() {});
},
),
),
Expand All @@ -110,22 +109,22 @@ Future<String> modsRenameDialog(context, String parentLocationPath, String curLo

void renamedPreviewPathsGet(String parentDirPath, List<String> previewImagePaths, List<String> previewVideoPaths) {
//Get preview images;
final imagesInModDir = Directory(parentDirPath).listSync(recursive: false).whereType<File>().where(((element) => p.extension(element.path) == '.jpg' || p.extension(element.path) == '.png'));
for (var element in imagesInModDir) {
bool isIconImage = false;
for (var part in p.basenameWithoutExtension(parentDirPath).split(' ')) {
if (p.basenameWithoutExtension(element.path).contains(part)) {
isIconImage = true;
break;
}
}
if (!isIconImage) {
previewImagePaths.add(Uri.file(element.path).toFilePath());
final imagesInModDir = Directory(parentDirPath).listSync(recursive: false).whereType<File>().where(((element) => p.extension(element.path) == '.jpg' || p.extension(element.path) == '.png'));
for (var element in imagesInModDir) {
bool isIconImage = false;
for (var part in p.basenameWithoutExtension(parentDirPath).split(' ')) {
if (p.basenameWithoutExtension(element.path).contains(part)) {
isIconImage = true;
break;
}
}
//Get preview videos;
final videosInModDir = Directory(parentDirPath).listSync(recursive: false).whereType<File>().where((element) => p.extension(element.path) == '.webm' || p.extension(element.path) == '.mp4');
for (var element in videosInModDir) {
previewVideoPaths.add(Uri.file(element.path).toFilePath());
if (!isIconImage) {
previewImagePaths.add(Uri.file(element.path).toFilePath());
}
}
}
//Get preview videos;
final videosInModDir = Directory(parentDirPath).listSync(recursive: false).whereType<File>().where((element) => p.extension(element.path) == '.webm' || p.extension(element.path) == '.mp4');
for (var element in videosInModDir) {
previewVideoPaths.add(Uri.file(element.path).toFilePath());
}
}
1 change: 1 addition & 0 deletions lib/global_variables.dart
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,4 @@ bool showPreviewPanel = false;
bool autoAqmInject = false;
String modManCustomAqmFileName = '';
String modManCustomAqmFilePath = '';
bool gameguardAnticheat = true;
3 changes: 3 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ class _MyHomePageState extends State<MyHomePage> with WindowListener {
}
}

//JP anticheat
gameguardAnticheat = (prefs.getBool('gameguardAnticheat') ?? true);

//Empty categories hide
isEmptyCatesHide = (prefs.getBool('isShowHideEmptyCategories') ?? false);

Expand Down
Loading

0 comments on commit b2f7766

Please sign in to comment.