Skip to content

Commit

Permalink
fixed WT not launching with Raze, updated to 1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fgsfds committed Nov 30, 2024
1 parent f901b73 commit 0b58ce4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>1.1.1</Version>
<Version>1.1.2</Version>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
Expand Down
13 changes: 10 additions & 3 deletions src/Ports/Ports/Raze.cs
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,18 @@ private static void AddGamePathsToConfig(IGame game, IAddon campaign, string gam
_ = sb.Append("Path=").AppendLine(path);

//duke addons folders
if (game is DukeGame dGame)
if (game is DukeGame dGame && !campaign.Id.Equals(nameof(DukeVersionEnum.Duke3D_WT), StringComparison.OrdinalIgnoreCase))
{
foreach (var folder in dGame.AddonsPaths)
var addonPaths = dGame.AddonsPaths.Values.Distinct();

foreach (var folder in addonPaths)
{
path = folder.Value.Replace('\\', '/');
if (folder.Equals(gameInstallFolder))
{
continue;
}

path = folder.Replace('\\', '/');
_ = sb.Append("Path=").AppendLine(path);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/Tests/CmdArguments/DukeCmdArgumentsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ public void RazeWtTest()
Assert.StartsWith($"""
[GameSearch.Directories]
Path=D:/Games/DukeWT
Path=D:/Games/Duke3D/Vaca
[FileSearch.Directories]
Path={Directory.GetCurrentDirectory()}/Data/Addons/Duke3D/Mods
Expand Down

0 comments on commit 0b58ce4

Please sign in to comment.