mirror of
https://github.com/4sval/FModel.git
synced 2026-03-24 18:54:42 -05:00
random stuff
This commit is contained in:
parent
7d4b9e7094
commit
99bcfb2c29
|
|
@ -59,7 +59,7 @@ public class BaseBundle : UCreator
|
|||
foreach (var reward in rewards)
|
||||
{
|
||||
if (!reward.TryGetValue(out FSoftObjectPath itemDefinition, "ItemDefinition")) continue;
|
||||
quest.AddCompletionRequest(itemDefinition);
|
||||
quest.AddCompletionReward(itemDefinition);
|
||||
}
|
||||
_quests.Add(quest);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,12 +44,12 @@ public class BaseQuest : BaseIcon
|
|||
DisplayName = ReformatString(description, completionCount.ToString(), completionCount < 0);
|
||||
}
|
||||
|
||||
public void AddCompletionRequest(FSoftObjectPath itemDefinition)
|
||||
public void AddCompletionReward(FSoftObjectPath itemDefinition)
|
||||
{
|
||||
_rewards.Add(itemDefinition.TryLoad(out UObject uObject) ? new Reward(uObject) : new Reward());
|
||||
}
|
||||
|
||||
public void AddCompletionRequest(int quantity, string reward)
|
||||
public void AddCompletionReward(int quantity, string reward)
|
||||
{
|
||||
_rewards.Add(new Reward(quantity, reward));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@
|
|||
<PackageReference Include="RestSharp" Version="112.1.0" />
|
||||
<PackageReference Include="Serilog" Version="4.2.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.6" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.8" />
|
||||
<PackageReference Include="SkiaSharp.HarfBuzz" Version="2.88.9" />
|
||||
<PackageReference Include="SkiaSharp.Svg" Version="1.60.0" />
|
||||
<PackageReference Include="Twizzle.ImGui-Bundle.NET" Version="1.91.5.2" />
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ public partial class MainWindow
|
|||
|
||||
await ApplicationViewModel.InitOodle();
|
||||
await ApplicationViewModel.InitZlib();
|
||||
await ApplicationViewModel.InitDetex();
|
||||
await _applicationView.CUE4Parse.Initialize();
|
||||
await _applicationView.AesManager.InitAes();
|
||||
await _applicationView.UpdateProvider(true);
|
||||
|
|
@ -74,6 +73,7 @@ public partial class MainWindow
|
|||
_applicationView.CUE4Parse.VerifyConsoleVariables(),
|
||||
_applicationView.CUE4Parse.VerifyOnDemandArchives(),
|
||||
_applicationView.CUE4Parse.InitMappings(),
|
||||
ApplicationViewModel.InitDetex(),
|
||||
ApplicationViewModel.InitVgmStream(),
|
||||
ApplicationViewModel.InitImGuiSettings(newOrUpdated),
|
||||
Task.Run(() =>
|
||||
|
|
|
|||
|
|
@ -106,7 +106,11 @@ public class FModelApiEndpoint : AbstractApiProvider
|
|||
|
||||
public void CheckForUpdates(bool launch = false)
|
||||
{
|
||||
if (DateTime.Now < UserSettings.Default.NextUpdateCheck) return;
|
||||
if (DateTime.Now < UserSettings.Default.NextUpdateCheck)
|
||||
{
|
||||
Log.Warning("Updates have been silenced until {DateTime}", UserSettings.Default.NextUpdateCheck);
|
||||
return;
|
||||
}
|
||||
|
||||
if (launch)
|
||||
{
|
||||
|
|
@ -140,7 +144,8 @@ public class FModelApiEndpoint : AbstractApiProvider
|
|||
{
|
||||
UserSettings.Default.LastUpdateCheck = DateTime.Now;
|
||||
|
||||
if (((CustomMandatory)args.Mandatory).CommitHash == Constants.APP_COMMIT_ID)
|
||||
var targetHash = ((CustomMandatory) args.Mandatory).CommitHash;
|
||||
if (targetHash == Constants.APP_COMMIT_ID)
|
||||
{
|
||||
if (UserSettings.Default.ShowChangelog)
|
||||
ShowChangelog(args);
|
||||
|
|
@ -152,6 +157,7 @@ public class FModelApiEndpoint : AbstractApiProvider
|
|||
UserSettings.Default.ShowChangelog = currentVersion != args.InstalledVersion;
|
||||
|
||||
const string message = "A new update is available!";
|
||||
Log.Warning("{message} Version {CurrentVersion} ({Hash})", message, currentVersion, targetHash);
|
||||
Helper.OpenWindow<AdonisWindow>(message, () => new UpdateView { Title = message, ResizeMode = ResizeMode.NoResize }.ShowDialog());
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ public class ApplicationViewModel : ViewModel
|
|||
ZlibHelper.Initialize(zlibPath);
|
||||
}
|
||||
|
||||
public static async ValueTask InitDetex()
|
||||
public static async Task InitDetex()
|
||||
{
|
||||
var detexPath = Path.Combine(UserSettings.Default.OutputDirectory, ".data", DetexHelper.DLL_NAME);
|
||||
if (File.Exists(DetexHelper.DLL_NAME))
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using System.Windows.Data;
|
|||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Threading;
|
||||
|
||||
namespace FModel.Views.Resources.Controls;
|
||||
|
||||
|
|
@ -54,7 +55,7 @@ public class FLogger : ITextFormatter
|
|||
}
|
||||
|
||||
job();
|
||||
});
|
||||
}, DispatcherPriority.Background);
|
||||
}
|
||||
|
||||
public static void Text(string message, string color, bool newLine = false)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user