mirror of
https://github.com/4sval/FModel.git
synced 2026-04-24 06:48:38 -05:00
Merge remote-tracking branch 'fc/dev'
This commit is contained in:
parent
8453692bfe
commit
4fe00c9a1b
|
|
@ -37,9 +37,9 @@ public class BaseUserControl : UCreator
|
|||
|
||||
public override void ParseForInfo()
|
||||
{
|
||||
if (Object.TryGetValue(out FText optionDisplayName, "OptionDisplayName"))
|
||||
if (Object.TryGetValue(out FText optionDisplayName, "OptionDisplayName", "OptionalText"))
|
||||
DisplayName = optionDisplayName.Text.ToUpperInvariant();
|
||||
if (Object.TryGetValue(out FText optionDescription, "OptionDescription"))
|
||||
if (Object.TryGetValue(out FText optionDescription, "OptionDescription", "OptionToolTip"))
|
||||
{
|
||||
Description = optionDescription.Text;
|
||||
|
||||
|
|
@ -48,12 +48,12 @@ public class BaseUserControl : UCreator
|
|||
Height += (int) _descriptionPaint.TextSize;
|
||||
}
|
||||
|
||||
if (Object.TryGetValue(out FStructFallback[] optionValues, "OptionValues"))
|
||||
if (Object.TryGetValue(out FStructFallback[] optionValues, "OptionValues", "Options"))
|
||||
{
|
||||
_optionValues = new List<Options>();
|
||||
foreach (var option in optionValues)
|
||||
{
|
||||
if (option.TryGetValue(out FText displayName, "DisplayName"))
|
||||
if (option.TryGetValue(out FText displayName, "DisplayName", "DisplayText"))
|
||||
{
|
||||
var opt = new Options { Option = displayName.Text.ToUpperInvariant() };
|
||||
if (option.TryGetValue(out FLinearColor color, "Value"))
|
||||
|
|
|
|||
|
|
@ -110,6 +110,8 @@ public class CreatorPackage : IDisposable
|
|||
case "FortCreativeWeaponRangedItemDefinition":
|
||||
case "FortCreativeRealEstatePlotItemDefinition":
|
||||
case "AthenaDanceItemDefinition_AdHocSquadsJoin_C":
|
||||
case "StWFortAccoladeItemDefinition":
|
||||
case "FortSmartBuildingItemDefinition":
|
||||
creator = _style switch
|
||||
{
|
||||
EIconStyle.Cataba => new BaseCommunity(_object, _style, "Cataba"),
|
||||
|
|
@ -149,6 +151,7 @@ public class CreatorPackage : IDisposable
|
|||
case "FortFeatItemDefinition":
|
||||
case "FortQuestItemDefinition":
|
||||
case "FortQuestItemDefinition_Athena":
|
||||
case "FortQuestItemDefinition_Campaign":
|
||||
case "AthenaDailyQuestDefinition":
|
||||
case "FortUrgentQuestItemDefinition":
|
||||
creator = new Bases.FN.BaseQuest(_object, _style);
|
||||
|
|
@ -163,6 +166,7 @@ public class CreatorPackage : IDisposable
|
|||
case "FortItemAccessTokenType":
|
||||
creator = new BaseItemAccessToken(_object, _style);
|
||||
return true;
|
||||
case "FortCreativeOption":
|
||||
case "PlaylistUserOptionEnum":
|
||||
case "PlaylistUserOptionBool":
|
||||
case "PlaylistUserOptionString":
|
||||
|
|
|
|||
|
|
@ -12,14 +12,12 @@ namespace FModel.ViewModels.ApiEndpoints;
|
|||
|
||||
public class DynamicApiEndpoint : AbstractApiProvider
|
||||
{
|
||||
public DynamicApiEndpoint(RestClient client) : base(client)
|
||||
{
|
||||
}
|
||||
public DynamicApiEndpoint(RestClient client) : base(client) { }
|
||||
|
||||
public async Task<AesResponse> GetAesKeysAsync(CancellationToken token, string url, string path)
|
||||
{
|
||||
var body = await GetRequestBody(token, url).ConfigureAwait(false);
|
||||
var tokens = body.SelectTokens(path);
|
||||
var tokens = body.SelectTokens(path).ToArray();
|
||||
|
||||
var ret = new AesResponse { MainKey = Helper.FixKey(tokens.ElementAtOrDefault(0)?.ToString()) };
|
||||
if (tokens.ElementAtOrDefault(1) is JArray dynamicKeys)
|
||||
|
|
@ -32,10 +30,12 @@ public class DynamicApiEndpoint : AbstractApiProvider
|
|||
ret.DynamicKeys.Add(new DynamicKey
|
||||
{
|
||||
Name = dynamicKey["name"]?.ToString(),
|
||||
Guid = guid.ToString(), Key = Helper.FixKey(key.ToString())
|
||||
Guid = guid.ToString(),
|
||||
Key = Helper.FixKey(key.ToString())
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -47,9 +47,9 @@ public class DynamicApiEndpoint : AbstractApiProvider
|
|||
public async Task<MappingsResponse[]> GetMappingsAsync(CancellationToken token, string url, string path)
|
||||
{
|
||||
var body = await GetRequestBody(token, url).ConfigureAwait(false);
|
||||
var tokens = body.SelectTokens(path);
|
||||
var tokens = body.SelectTokens(path).ToArray();
|
||||
|
||||
var ret = new MappingsResponse[] {new()};
|
||||
var ret = new MappingsResponse[] { new() };
|
||||
ret[0].Url = tokens.ElementAtOrDefault(0)?.ToString();
|
||||
if (tokens.ElementAtOrDefault(1) is not { } fileName)
|
||||
fileName = ret[0].Url?.SubstringAfterLast("/");
|
||||
|
|
|
|||
|
|
@ -1,15 +1,10 @@
|
|||
using System.Net;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using EpicManifestParser.Objects;
|
||||
|
||||
using FModel.Framework;
|
||||
using FModel.Settings;
|
||||
using FModel.ViewModels.ApiEndpoints.Models;
|
||||
|
||||
using RestSharp;
|
||||
|
||||
using Serilog;
|
||||
|
||||
namespace FModel.ViewModels.ApiEndpoints;
|
||||
|
|
@ -20,9 +15,7 @@ public class EpicApiEndpoint : AbstractApiProvider
|
|||
private const string _BASIC_TOKEN = "basic MzQ0NmNkNzI2OTRjNGE0NDg1ZDgxYjc3YWRiYjIxNDE6OTIwOWQ0YTVlMjVhNDU3ZmI5YjA3NDg5ZDMxM2I0MWE=";
|
||||
private const string _LAUNCHER_ASSETS = "https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/public/assets/v2/platform/Windows/namespace/fn/catalogItem/4fe75bbc5a674f4f9b356b5c90567da5/app/Fortnite/label/Live";
|
||||
|
||||
public EpicApiEndpoint(RestClient client) : base(client)
|
||||
{
|
||||
}
|
||||
public EpicApiEndpoint(RestClient client) : base(client) { }
|
||||
|
||||
public async Task<ManifestInfo> GetManifestAsync(CancellationToken token)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29,9 +29,7 @@ public class FModelApiEndpoint : AbstractApiProvider
|
|||
private readonly IDictionary<string, CommunityDesign> _communityDesigns = new Dictionary<string, CommunityDesign>();
|
||||
private ApplicationViewModel _applicationView => ApplicationService.ApplicationView;
|
||||
|
||||
public FModelApiEndpoint(RestClient client) : base(client)
|
||||
{
|
||||
}
|
||||
public FModelApiEndpoint(RestClient client) : base(client) { }
|
||||
|
||||
public async Task<News> GetNewsAsync(CancellationToken token, string game)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,9 +8,7 @@ namespace FModel.ViewModels.ApiEndpoints;
|
|||
|
||||
public class FortniteApiEndpoint : AbstractApiProvider
|
||||
{
|
||||
public FortniteApiEndpoint(RestClient client) : base(client)
|
||||
{
|
||||
}
|
||||
public FortniteApiEndpoint(RestClient client) : base(client) { }
|
||||
|
||||
public async Task<PlaylistResponse> GetPlaylistAsync(string playlistId)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,9 +9,7 @@ namespace FModel.ViewModels.ApiEndpoints;
|
|||
|
||||
public class FortniteCentralApiEndpoint : AbstractApiProvider
|
||||
{
|
||||
public FortniteCentralApiEndpoint(RestClient client) : base(client)
|
||||
{
|
||||
}
|
||||
public FortniteCentralApiEndpoint(RestClient client) : base(client) { }
|
||||
|
||||
public async Task<Dictionary<string, Dictionary<string, string>>> GetHotfixesAsync(CancellationToken token, string language = "en")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class Version
|
|||
[J] public int UeVer { get; private set; }
|
||||
[J] public Dictionary<string, int> CustomVersions { get; private set; }
|
||||
[J] public Dictionary<string, bool> Options { get; private set; }
|
||||
[J] public Dictionary<string, KeyValuePair<string, string>> MapStructTypes { get; private set; }
|
||||
[J] public Dictionary<string, KeyValuePair<string, string>> MapStructTypes { get; private set; } = new();
|
||||
}
|
||||
|
||||
[DebuggerDisplay("{" + nameof(Mode) + "}")]
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
using CUE4Parse.UE4.Exceptions;
|
||||
using CUE4Parse.UE4.Exceptions;
|
||||
using CUE4Parse.UE4.Readers;
|
||||
using FModel.Settings;
|
||||
using Ionic.Zlib;
|
||||
|
|
@ -21,9 +21,7 @@ public class ValorantApiEndpoint : AbstractApiProvider
|
|||
{
|
||||
private const string _URL = "https://fmodel.fortnite-api.com/valorant/v2/manifest";
|
||||
|
||||
public ValorantApiEndpoint(RestClient client) : base(client)
|
||||
{
|
||||
}
|
||||
public ValorantApiEndpoint(RestClient client) : base(client) { }
|
||||
|
||||
public async Task<VManifest> GetManifestAsync(CancellationToken token)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using System.Text;
|
|||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using CUE4Parse.UE4.Versions;
|
||||
using CUE4Parse.UE4.Vfs;
|
||||
using CUE4Parse.UE4.VirtualFileSystem;
|
||||
using FModel.Framework;
|
||||
using FModel.Services;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ using System.Linq;
|
|||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using CUE4Parse.UE4.Vfs;
|
||||
using CUE4Parse.UE4.VirtualFileSystem;
|
||||
using FModel.Framework;
|
||||
using FModel.Services;
|
||||
using FModel.Settings;
|
||||
|
|
|
|||
|
|
@ -6,10 +6,9 @@ using System.Globalization;
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AdonisUI.Controls;
|
||||
using CUE4Parse.UE4.Readers;
|
||||
using CUE4Parse.UE4.Vfs;
|
||||
using CUE4Parse.UE4.VirtualFileSystem;
|
||||
using FModel.Extensions;
|
||||
using FModel.Framework;
|
||||
using FModel.Services;
|
||||
|
|
@ -32,9 +31,7 @@ public class LoadCommand : ViewModelCommand<LoadingModesViewModel>
|
|||
private ApplicationViewModel _applicationView => ApplicationService.ApplicationView;
|
||||
private DiscordHandler _discordHandler => DiscordService.DiscordHandler;
|
||||
|
||||
public LoadCommand(LoadingModesViewModel contextViewModel) : base(contextViewModel)
|
||||
{
|
||||
}
|
||||
public LoadCommand(LoadingModesViewModel contextViewModel) : base(contextViewModel) { }
|
||||
|
||||
public override async void Execute(LoadingModesViewModel contextViewModel, object parameter)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
using FModel.Framework;
|
||||
using FModel.Framework;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using CUE4Parse.UE4.Objects.Core.Misc;
|
||||
using CUE4Parse.UE4.Vfs;
|
||||
using CUE4Parse.UE4.VirtualFileSystem;
|
||||
|
||||
namespace FModel.ViewModels;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user