Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fgsfds committed Jun 1, 2024
1 parent bd72039 commit ec47b20
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/Avalonia/Core/Controls/MapsControl.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<ListBox Name="MapsList"
Grid.Row="1" Grid.Column="0"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
ScrollViewer.HorizontalScrollBarVisibility="Auto"
Padding="2"
ItemsSource="{Binding MapsList}"
SelectedItem="{Binding SelectedAddon}"
Expand Down
5 changes: 5 additions & 0 deletions src/Mods/Providers/InstalledAddonsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ public void DeleteAddon(IAddon addon)

File.Delete(addon.PathToFile);

if (addon is LooseMap lMap && lMap.BloodIni is not null)
{
File.Delete(lMap.BloodIni);
}

_cache[addon.Type].Remove(new(addon.Id, addon.Version));

AddonsChangedEvent?.Invoke(_game, addon.Type);
Expand Down
2 changes: 1 addition & 1 deletion src/Ports/Ports/BasePort.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ protected void GetBloodArgs(StringBuilder sb, BloodGame game, IAddon addon)
}
else
{
sb.Append($@" -ini ""{lMap.BloodIni}""");
sb.Append($@" -ini ""{Path.GetFileName(lMap.BloodIni)}""");
}

GetLooseMapArgs(sb, game, addon);
Expand Down
4 changes: 2 additions & 2 deletions src/Ports/Ports/EDuke32/VoidSW.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ protected override void GetStartCampaignArgs(StringBuilder sb, IGame game, IAddo



if (game is WangGame wGame && addon is WangCampaign wMod)
if (game is WangGame wGame)
{
GetWangArgs(sb, wGame, wMod);
GetWangArgs(sb, wGame, addon);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/Ports/Ports/Raze.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ private void GetRedneckArgs(StringBuilder sb, RedneckGame game, IAddon addon)
return;
}

if (addon is not DukeCampaign rCamp)
if (addon is not RedneckCampaign rCamp)
{
ThrowHelper.ArgumentException(nameof(addon));
return;
Expand Down

0 comments on commit ec47b20

Please sign in to comment.