Skip to content

Commit c56a567

Browse files
Minor updates (#11)
- Updated `.gitignore` to ignore `launchSettings.json`, adding an example file in its place - Fixed list declaration to prevent odd debugger behavior - Prevent `mod-meta.yml` from being added to MLO - Prevent "Folder not found" warning when using the "stream" folder in Y0 and YK
1 parent d1e0e26 commit c56a567

4 files changed

Lines changed: 14 additions & 6 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,4 +493,4 @@ fabric.properties
493493
# *.ipr
494494

495495
### Custom ###
496-
ShinRyuModManager-Linux/Properties/launchSettings.json
496+
ShinRyuModManager-CE/Properties/launchSettings.json

ShinRyuModManager-CE/ModLoadOrder/Generator.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace ShinRyuModManager.ModLoadOrder;
77

88
public static class Generator {
99
public static async Task<MLO> GenerateModeLoadOrder(List<string> mods, bool looseFilesEnabled, bool cpkRepackingEnabled) {
10-
var modIndices = new List<int> { 0 };
10+
List<int> modIndices = [0];
1111
var files = new OrderedSet<string>();
1212
var modsWithFoldersNotFound = new Dictionary<string, List<string>>(); // Dict of Mod, ListOfFolders
1313
var parDictionary = new Dictionary<string, List<string>>(); // Dict of PathToPar, ListOfMods
@@ -82,6 +82,10 @@ public static async Task<MLO> GenerateModeLoadOrder(List<string> mods, bool loos
8282
var subPathName = new DirectoryInfo(subPath).Name;
8383

8484
if (!(GamePath.DirectoryExistsInData(subPathName) || GamePath.FileExistsInData($"{subPathName}.par"))) {
85+
// While "stream" isn't a folder in Y0 or Kiwami, it shouldn't warn the user as it's used in place of bgm.cpk
86+
if (GamePath.CurrentGame is Game.Yakuza0 or Game.YakuzaKiwami && subPathName == "stream")
87+
continue;
88+
8589
foldersNotFound.Add(subPathName);
8690
}
8791
}

ShinRyuModManager-CE/ModLoadOrder/Mods/Mod.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,13 @@ public void AddFiles(string path, string check) {
240240
// Add files in current directory
241241
var files = Directory.GetFiles(path).Where(f => !f.EndsWith(Constants.VORTEX_MANAGED_FILE)).Select(GamePath.GetDataPathFrom);
242242

243-
foreach (var p in files) {
244-
Files.Add(p);
245-
Log.Verbose("Adding file: {file}", p);
243+
foreach (var file in files) {
244+
// No need to add the meta file
245+
if (file.EndsWith("mod-meta.yaml"))
246+
continue;
247+
248+
Files.Add(file);
249+
Log.Verbose("Adding file: {file}", file);
246250
}
247251

248252
var isParlessMod = GetType() == typeof(ParlessMod);

ShinRyuModManager-CE/Properties/launchSettings.json renamed to ShinRyuModManager-CE/Properties/launchSettings.example.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"ShinRyuModManager-CE": {
55
"commandName": "Project",
66
"commandLineArgs": "",
7-
"workingDirectory": "/mnt/nvme-storage/SteamLibrary/steamapps/common/Yakuza 5/main/"
7+
"workingDirectory": "" // Path to folder containing exe
88
}
99
}
1010
}

0 commit comments

Comments
 (0)