Skip to content

Commit

Permalink
Merge pull request #9 from Goose-Bomb/dev
Browse files Browse the repository at this point in the history
Hotfix 🌶
  • Loading branch information
Nullkooland authored Aug 27, 2019
2 parents e677352 + 6c0e355 commit ad0a18b
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 31 deletions.
4 changes: 2 additions & 2 deletions GBCLV3/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
[assembly: AssemblyCopyright("Copyright © Goose Bomb 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("3.0.2.36")]
[assembly: AssemblyFileVersion("3.0.2.36")]
[assembly: AssemblyVersion("3.0.2.38")]
[assembly: AssemblyFileVersion("3.0.2.38")]

[assembly: ComVisible(false)]

Expand Down
2 changes: 1 addition & 1 deletion GBCLV3/Services/Launcher/AssetService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public async Task<bool> DownloadIndexJsonAsync(AssetsInfo info)
{
try
{
string json = await _client.GetStringAsync(_urlService.Base.Json + info.IndexUrl);
string json = await _client.GetStringAsync(info.IndexUrl);
string indexDir = $"{_gamePathService.AssetsDir}/indexes";

//Make sure directory exists
Expand Down
1 change: 1 addition & 0 deletions GBCLV3/Services/Launcher/LibraryService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ string GetUrl(Library lib)
case LibraryType.Forge:
return _urlService.Base.Forge + lib.Url;
case LibraryType.Minecraft:
case LibraryType.Native:
return _urlService.Base.Library + (lib.Url ?? lib.Path);
case LibraryType.Maven:
return _urlService.Base.Maven + (lib.Url ?? lib.Path);
Expand Down
2 changes: 1 addition & 1 deletion GBCLV3/Services/Launcher/VersionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ private static Version Load(string json)
{
ID = jver.assetIndex.id,
IndexSize = jver.assetIndex.size,
IndexUrl = jver.assetIndex.url.Substring(32),
IndexUrl = jver.assetIndex.url,
IndexSHA1 = jver.assetIndex.sha1,
TotalSize = jver.assetIndex.totalSize,
};
Expand Down
11 changes: 5 additions & 6 deletions GBCLV3/ViewModels/GameInstallViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,12 @@ public async void InstallSelectedVersion(VersionDownload download)
var missingLibs = _libraryService.CheckIntegrity(version.Libraries);
downloads = downloads.Concat(_libraryService.GetDownloads(missingLibs));

if (IsDownloadAssets)
{
if (await _assetService.DownloadIndexJsonAsync(version.AssetsInfo))
{
_assetService.LoadAllObjects(version.AssetsInfo);
}
// Download assets index json
await _assetService.DownloadIndexJsonAsync(version.AssetsInfo);

// Download assets objects on user's discretion
if (IsDownloadAssets && _assetService.LoadAllObjects(version.AssetsInfo))
{
var missingAssets = await _assetService.CheckIntegrityAsync(version.AssetsInfo);
downloads = downloads.Concat(_assetService.GetDownloads(missingAssets));
}
Expand Down
4 changes: 2 additions & 2 deletions GBCLV3/ViewModels/GameSettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ public string ExtraMinecraftArgs

public bool IsShowAdvancedSettings { get; set; }

public void OnPasswordLoaded(PasswordBox passwordBox, EventArgs args)
public void OnPasswordLoaded(PasswordBox passwordBox, EventArgs _)
{
passwordBox.Password = _config.Password;
}

public void OnPasswordChanged(PasswordBox passwordBox, EventArgs args)
public void OnPasswordChanged(PasswordBox passwordBox, EventArgs _)
{
_config.Password = passwordBox.Password;
}
Expand Down
8 changes: 1 addition & 7 deletions GBCLV3/ViewModels/Pages/AboutViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,15 @@ class AboutViewModel : Screen
#region Private Members

// IoC
private readonly int _;

private readonly Config _config;
private readonly IWindowManager _windowManager;

#endregion

#region Constructor

[Inject]
public AboutViewModel(
ConfigService configService,
IWindowManager windowManager)
public AboutViewModel(IWindowManager windowManager)
{
_config = configService.Entries;
_windowManager = windowManager;
}

Expand Down
3 changes: 0 additions & 3 deletions GBCLV3/ViewModels/Pages/LaunchViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class LaunchViewModel : Conductor<IScreen>.Collection.OneActive
// IoC
private readonly Config _config;
private readonly VersionService _versionService;
private readonly ForgeInstallService _forgeService;
private readonly LibraryService _libraryService;
private readonly AssetService _assetService;
private readonly LaunchService _launchService;
Expand All @@ -46,7 +45,6 @@ public LaunchViewModel(

ConfigService configService,
VersionService versionService,
ForgeInstallService forgeService,
LibraryService libraryService,
AssetService assetService,
LaunchService launchService,
Expand All @@ -61,7 +59,6 @@ public LaunchViewModel(
_config = configService.Entries;

_versionService = versionService;
_forgeService = forgeService;
_libraryService = libraryService;
_assetService = assetService;
_launchService = launchService;
Expand Down
9 changes: 0 additions & 9 deletions GBCLV3/ViewModels/VersionsManagementViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ class VersionsManagementViewModel : Screen
private readonly GamePathService _gamePathService;
private readonly VersionService _versionService;

private readonly GameInstallViewModel _gameInstallVM;
private readonly ForgeInstallViewModel _forgeInstallVM;

private readonly IWindowManager _windowManager;

#endregion
Expand All @@ -41,9 +38,6 @@ public VersionsManagementViewModel(
GamePathService gamePathService,
VersionService versionService,

GameInstallViewModel gameInstallVM,
ForgeInstallViewModel forgeInstallVM,

IWindowManager windowManager)
{
_windowManager = windowManager;
Expand All @@ -59,9 +53,6 @@ public VersionsManagementViewModel(
};
_versionService.Created += version => Versions.Insert(0, version);
_versionService.Deleted += version => Versions.Remove(version);

_gameInstallVM = gameInstallVM;
_forgeInstallVM = forgeInstallVM;
}

#endregion
Expand Down
Binary file modified GBCLV3/ViewModels/Windows/MainViewModel.cs
Binary file not shown.

0 comments on commit ad0a18b

Please sign in to comment.