Skip to content

Commit

Permalink
Initial 3x (#61)
Browse files Browse the repository at this point in the history
* Changes

* begin splitting out updates

* Interim commit

* Interim commit

* Simplify for interim release

* Add original update warning

* Update gitignore

* Cleanup

* Update default button logic in UpdateControl

* Update markdown
  • Loading branch information
amirburbea authored Sep 16, 2020
1 parent 161ec80 commit 4abcdbe
Show file tree
Hide file tree
Showing 31 changed files with 808 additions and 674 deletions.
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ _UpgradeReport_Files/
Backup*/
UpgradeLog*.XML



############
## Windows
############
Expand Down Expand Up @@ -164,4 +162,6 @@ pip-log.txt

# Mac crap
.DS_Store
/KoAR.SaveEditor/Views/Updates/github.credentials

# Github Credentials
github.credentials
4 changes: 2 additions & 2 deletions KoAR.Core/Amalur.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ internal static TValue GetOrDefault<TKey, TValue>(this IReadOnlyDictionary<TKey,
public static string? FindSaveGameDirectory()
{
// GOG
var directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "..", "LocalLow", "THQNOnline", "Kingdoms of Amalur Re-Reckoning", "autocloud", "save");
var directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"..\LocalLow\THQNOnline\Kingdoms of Amalur Re-Reckoning\autocloud\save");
if (Directory.Exists(directory))
{
return directory;
}
// Steam
directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "Steam", "userdata");
return Directory.Exists(directory) && Directory.GetDirectories(directory) is string[] { Length: 1 } userDirs
&& (Directory.Exists(directory = Path.Combine(userDirs[0], "1041720", "remote", "autocloud", "save")) || Directory.Exists(directory = Path.Combine(userDirs[0], "102500", "remote")))
&& (Directory.Exists(directory = Path.Combine(userDirs[0], @"1041720\remote\autocloud\save")) || Directory.Exists(directory = Path.Combine(userDirs[0], @"102500\remote")))
? directory
: null;
}
Expand Down
2 changes: 1 addition & 1 deletion KoAR.Core/GameSave.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public GameSave(string fileName)
IsRemaster = BitConverter.ToInt32(Bytes, 8) == 0;
if(IsRemaster && !Path.GetFileNameWithoutExtension(fileName).StartsWith("svd_fmt_5_"))
{
throw new NotSupportedException("Save file is not a user save and changing them can lead to the game infinite looping. The editor only supports saves that start with svd_fmt_5_");
throw new NotSupportedException("Save file is not a user save and changing them can lead to the game infinite looping. The editor only supports saves that start with svd_fmt_5.");
}
_header = new GameSaveHeader(this);
Body = Bytes.AsSpan(BodyStart, BodyDataLength).ToArray();
Expand Down
3 changes: 3 additions & 0 deletions KoAR.SaveEditor/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<setting name="LastDirectory" serializeAs="String">
<value />
</setting>
<setting name="Acknowledged3x" serializeAs="String">
<value>False</value>
</setting>
</KoAR.SaveEditor.Properties.Settings>
</userSettings>
<applicationSettings>
Expand Down
2 changes: 0 additions & 2 deletions KoAR.SaveEditor/App.xaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<Application x:Class="KoAR.SaveEditor.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:updates="clr-namespace:KoAR.SaveEditor.Views.Updates"
StartupUri="Views/Main/MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/PresentationFramework.Aero;component/Themes/Aero.NormalColor.xaml" />
</ResourceDictionary.MergedDictionaries>
<updates:UpdateService x:Key="{x:Type updates:UpdateService}" />
</ResourceDictionary>
</Application.Resources>
</Application>
3 changes: 3 additions & 0 deletions KoAR.SaveEditor/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
using System;
using System.Reflection;
using Microsoft.Windows.Themes;

namespace KoAR.SaveEditor
{
partial class App
{
static App() => Type.GetTypeCode(typeof(PlatformCulture)); // Needed to enforce loading of PresentationFramework.Aero.dll before initializing App.

public static Version Version { get; } = new Version(Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion);
}
}
17 changes: 11 additions & 6 deletions KoAR.SaveEditor/KoAR.SaveEditor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,22 @@
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<AssemblyTitle>KoAR.SaveEditor</AssemblyTitle>
<Product>Kingdoms of Amalur: Reckoning Save Editor</Product>
<Copyright>Copyright © Michael Burbea 2020</Copyright>
<Copyright>Copyright © Michael Burbea &amp; Amir Burbea 2020</Copyright>
<OutputPath>bin\$(Configuration)\</OutputPath>
<UseWPF>true</UseWPF>
<ApplicationIcon>app.ico</ApplicationIcon>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Authors>Michael Burbea; Amir Burbea</Authors>
<Company>-</Company>
<Description>Save editor for Kingdoms of Amalur: Reckoning</Description>
<PackageLicenseExpression>ISC</PackageLicenseExpression>
<PackageLicenseExpression></PackageLicenseExpression>
<RepositoryType>Git</RepositoryType>
<PackageProjectUrl>https://github.com/mburbea/koar-item-editor</PackageProjectUrl>
<RepositoryUrl>https://github.com/mburbea/koar-item-editor</RepositoryUrl>
<NeutralLanguage>en-US</NeutralLanguage>
<UserSecretsId>08a013c8-a2ef-43c0-9e42-9500e36a74d4</UserSecretsId>
<Version>2.0.0</Version>
<Version>3.0.0</Version>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
Expand Down Expand Up @@ -196,6 +197,10 @@
<None Remove="Resources\Zoom.png" />
<None Remove="Views\Updates\github.credentials" />
<None Remove="Views\Updates\update.ps1" />
<None Include="..\LICENSE.md">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Markdown.Xaml" Version="1.0.0" />
Expand Down Expand Up @@ -344,8 +349,8 @@
<Resource Include="Resources\categories\Torso_Finesse.png" />
<Resource Include="Resources\Unknown.png" />
<Resource Include="Resources\Zoom.png" />
<Resource Include="Views\Updates\github.credentials" />
<Resource Include="Views\Updates\update.ps1" />
<Resource Include="Updates\github.credentials" />
<Resource Include="Updates\update.ps1" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
Expand Down Expand Up @@ -380,6 +385,6 @@
</None>
</ItemGroup>
<Target Name="EnsureCredentialsFileExists" BeforeTargets="BeforeBuild">
<WriteLinesToFile File="$(MSBuildProjectDirectory)\Views\Updates\github.credentials" Lines="" Overwrite="False" />
<WriteLinesToFile File="$(MSBuildProjectDirectory)\Updates\github.credentials" Lines="" Overwrite="False" />
</Target>
</Project>
16 changes: 14 additions & 2 deletions KoAR.SaveEditor/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions KoAR.SaveEditor/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@
<Setting Name="LastDirectory" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="Acknowledged3x" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>
12 changes: 6 additions & 6 deletions KoAR.SaveEditor/Themes/Generic.xaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<ResourceDictionary.MergedDictionaries>
<!-- Views -->
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.ArmorTypeIcon.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.BuffCollectionManager.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.BuffSelector.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.BuffDescriptionIcon.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.BuffIcon.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.RarityIcon.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.BuffSelector.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.ElementIcon.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.SocketIcon.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.ArmorTypeIcon.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.ItemFiltersEditor.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.EquipmentCategoryIcon.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.ItemDefinitionControl.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.ItemCollectionManager.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.ItemDefinitionControl.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.ItemFiltersEditor.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.RarityIcon.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.SocketIcon.xaml" />
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.ZoomScaler.xaml" />
<!-- Constructs -->
<ResourceDictionary Source="/KoAR.SaveEditor;component/Themes/Generic.LoadingIndicator.xaml" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace KoAR.SaveEditor.Views.Updates
namespace KoAR.SaveEditor.Updates
{
public interface IReleaseInfo
{
Expand All @@ -10,7 +10,7 @@ public interface IReleaseInfo

DateTime PublishedAt { get; }

string Version { get; }
Version Version { get; }

int ZipFileSize { get; }

Expand Down
Loading

0 comments on commit 4abcdbe

Please sign in to comment.