Skip to content

Commit

Permalink
Updated Readme to remove duplicate (#307)
Browse files Browse the repository at this point in the history
* Updated Readme to remove duplicate

The merge part was duplicated

* Added Mogg filename error output

Change the error struct to add a file name. Added to when a con error is scanned, "" gets added for .ini songs
  • Loading branch information
TheFatBastid committed May 12, 2023
1 parent e6c317f commit 016bbb6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 28 deletions.
8 changes: 4 additions & 4 deletions Assets/Script/Song/Scanning/SongScanThread.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private void FullScan() {
foreach (string cache in _songsByCacheFolder.Keys) {
// Folder doesn't exist, so report as an error and skip
if (!Directory.Exists(cache)) {
_songErrors[cache].Add(new SongError(cache, ScanResult.InvalidDirectory));
_songErrors[cache].Add(new SongError(cache, ScanResult.InvalidDirectory, ""));

Debug.LogError($"Invalid song directory: {cache}");
continue;
Expand Down Expand Up @@ -146,7 +146,7 @@ private void ScanSubDirectory(string cacheFolder, string subDir, ICollection<Son
default:
_errorsEncountered++;
errorsEncountered = _errorsEncountered;
_songErrors[cacheFolder].Add(new SongError(subDir, result));
_songErrors[cacheFolder].Add(new SongError(subDir, result, ""));
Debug.LogWarning($"Error encountered with {subDir}: {result}");
return;
}
Expand All @@ -170,7 +170,7 @@ private void ScanSubDirectory(string cacheFolder, string subDir, ICollection<Son
default:
_errorsEncountered++;
errorsEncountered = _errorsEncountered;
_songErrors[cacheFolder].Add(new SongError(subDir, ExCONResult));
_songErrors[cacheFolder].Add(new SongError(subDir, ExCONResult, file.Name));
Debug.LogWarning($"Error encountered with {subDir}");
break;
}
Expand Down Expand Up @@ -203,7 +203,7 @@ private void ScanSubDirectory(string cacheFolder, string subDir, ICollection<Son
default:
_errorsEncountered++;
errorsEncountered = _errorsEncountered;
_songErrors[cacheFolder].Add(new SongError(subDir, CONResult));
_songErrors[cacheFolder].Add(new SongError(subDir, CONResult, SongInsideCON.Name));
Debug.LogWarning($"Error encountered with {subDir}");
break;
}
Expand Down
6 changes: 4 additions & 2 deletions Assets/Script/Song/Scanning/SongScanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ public enum ScanResult {
public readonly struct SongError {
public string Directory { get; }
public ScanResult Result { get; }
public string FileName { get; }

public SongError(string directory, ScanResult result) {
public SongError(string directory, ScanResult result, string fileName) {
Directory = directory;
Result = result;
FileName = fileName;
}
}

Expand Down Expand Up @@ -239,7 +241,7 @@ await writer.WriteLineAsync(
}
lastResult = error.Result;
}
await writer.WriteLineAsync($" {error.Directory}");
await writer.WriteLineAsync($" {error.Directory}\\{error.FileName}");
}

await writer.WriteLineAsync();
Expand Down
22 changes: 0 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,28 +102,6 @@ Resolving conflicts:
2. If the conflict doesn't resolve automatically, open the command prompt and use `git merge-tool`.
3. Verify that the conflict was resolved correctly, then commit/continue the merge.

> **Note**
>
> If you plan on merging branches, I highly recommend following these instructions for easier merges.
Setup:
1. Open a command prompt to the repository (on VS Code you can do Terminal > New Terminal)
2. Type in `git config --local --edit`
3. In the file that gets opened, go to the bottom and paste this in: (You may need to change the file path depending on where you installed Unity to)
```
[merge]
tool = unityyamlmerge
[mergetool "unityyamlmerge"]
trustExitCode = false
cmd = 'C:\\Program Files\\Unity\\Hub\\Editor\\2021.3.21f1\\Editor\\Data\\Tools\\UnityYAMLMerge.exe' merge -p "$BASE" "$REMOTE" "$LOCAL" "$MERGED"
```
4. Save and close the file.

Resolving conflicts:
1. Start the merge/cherry-pick which is causing conflicts.
2. If the conflict doesn't resolve automatically, open the command prompt and use `git merge-tool`.
3. Verify that the conflict was resolved correctly, then commit/continue the merge.

# ✍️ Contributing

If you want to contribute, please feel free! Please join [our Discord](https://discord.gg/sqpu4R552r) if you want your PR/Art merged.
Expand Down

0 comments on commit 016bbb6

Please sign in to comment.