WExpGenericAccountItemDefinition support

This commit is contained in:
GMatrixGames 2020-10-17 17:05:43 -04:00
parent 7b71a43eab
commit fef39af079
No known key found for this signature in database
GPG Key ID: 19B7F96FB9AF302F
3 changed files with 334 additions and 187 deletions

View File

@ -0,0 +1,58 @@
using System;
using System.Windows;
using FModel.Creator.Rarities;
using FModel.Creator.Texts;
using PakReader.Parsers.Class;
using PakReader.Parsers.PropertyTagData;
using SkiaSharp;
namespace FModel.Creator.Bases
{
public class BaseBBDefinition : IBase
{
public SKBitmap FallbackImage;
public SKBitmap IconImage;
public SKColor[] RarityBackgroundColors;
public SKColor[] RarityBorderColor;
public string DisplayName;
public string Description;
public int Width = 512;
public int Height = 512;
public int Margin = 2;
public BaseBBDefinition(string exportType)
{
FallbackImage = SKBitmap.Decode(Application.GetResourceStream(new Uri("pack://application:,,,/Resources/T_Placeholder_Item_Image.png"))?.Stream);
IconImage = FallbackImage;
RarityBackgroundColors = new[] { SKColor.Parse("D0D0D0"), SKColor.Parse("636363") };
RarityBorderColor = new[] { SKColor.Parse("D0D0D0"), SKColor.Parse("FFFFFF") };
DisplayName = "";
Description = "";
}
public BaseBBDefinition(IUExport export, string exportType) : this(exportType)
{
// Not sure how to handle rarity for this. From what I can see, there is no data for colors
if (export.GetExport<SoftObjectProperty>("IconTextureAssetData") is {} previewImage)
IconImage = Utils.GetSoftObjectTexture(previewImage);
else if (export.GetExport<ObjectProperty>("IconTextureAssetData") is {} iconTexture)
IconImage = Utils.GetObjectTexture(iconTexture);
if (export.GetExport<TextProperty>("DisplayName") is {} displayName)
DisplayName = Text.GetTextPropertyBase(displayName);
if (export.GetExport<TextProperty>("Description") is {} description)
Description = Text.GetTextPropertyBase(description);
}
SKBitmap IBase.FallbackImage => FallbackImage;
SKBitmap IBase.IconImage => IconImage;
SKColor[] IBase.RarityBackgroundColors => RarityBackgroundColors;
SKColor[] IBase.RarityBorderColor => RarityBorderColor;
string IBase.DisplayName => DisplayName;
string IBase.Description => Description;
int IBase.Width => Width;
int IBase.Height => Height;
int IBase.Margin => Margin;
}
}

View File

@ -23,7 +23,8 @@ namespace FModel.Creator
var d = new DirectoryInfo(assetPath);
string assetName = d.Name;
string assetFolder = d.Parent.Name;
if (Text.TypeFaces.NeedReload(false)) Text.TypeFaces = new Typefaces(); // when opening bundle creator settings without loading paks first
if (Text.TypeFaces.NeedReload(false))
Text.TypeFaces = new Typefaces(); // when opening bundle creator settings without loading paks first
int index;
{
@ -115,63 +116,66 @@ namespace FModel.Creator
case "FortWeaponMeleeDualWieldItemDefinition":
case "FortDailyRewardScheduleTokenDefinition":
case "FortCreativeRealEstatePlotItemDefinition":
{
BaseIcon icon = new BaseIcon(exports[index], exportType, ref assetName);
int height = icon.Size + icon.AdditionalSize;
using (var ret = new SKBitmap(icon.Size, height, SKColorType.Rgba8888, SKAlphaType.Premul))
using (var c = new SKCanvas(ret))
{
BaseIcon icon = new BaseIcon(exports[index], exportType, ref assetName);
int height = icon.Size + icon.AdditionalSize;
using (var ret = new SKBitmap(icon.Size, height, SKColorType.Rgba8888, SKAlphaType.Premul))
using (var c = new SKCanvas(ret))
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
Rarity.DrawRarity(c, icon);
}
LargeSmallImage.DrawPreviewImage(c, icon);
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoText)
{
Text.DrawBackground(c, icon);
Text.DrawDisplayName(c, icon);
Text.DrawDescription(c, icon);
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.Mini)
{
if (!icon.ShortDescription.Equals(icon.DisplayName) && !icon.ShortDescription.Equals(icon.Description))
Text.DrawToBottom(c, icon, ETextSide.Left, icon.ShortDescription);
Text.DrawToBottom(c, icon, ETextSide.Right, icon.CosmeticSource);
}
}
UserFacingFlag.DrawUserFacingFlags(c, icon);
// has more things to show
if (height > icon.Size)
{
Statistics.DrawStats(c, icon);
}
}
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
Rarity.DrawRarity(c, icon);
}
return true;
LargeSmallImage.DrawPreviewImage(c, icon);
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoText)
{
Text.DrawBackground(c, icon);
Text.DrawDisplayName(c, icon);
Text.DrawDescription(c, icon);
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.Mini)
{
if (!icon.ShortDescription.Equals(icon.DisplayName) &&
!icon.ShortDescription.Equals(icon.Description))
Text.DrawToBottom(c, icon, ETextSide.Left, icon.ShortDescription);
Text.DrawToBottom(c, icon, ETextSide.Right, icon.CosmeticSource);
}
}
UserFacingFlag.DrawUserFacingFlags(c, icon);
// has more things to show
if (height > icon.Size)
{
Statistics.DrawStats(c, icon);
}
}
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
}
case "FortPlaylistAthena":
{
BasePlaylist icon = new BasePlaylist(exports[index]);
using (var ret = new SKBitmap(icon.Width, icon.Height, SKColorType.Rgba8888, SKAlphaType.Premul))
using (var c = new SKCanvas(ret))
{
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
Rarity.DrawRarity(c, icon);
}
LargeSmallImage.DrawNotStretchedPreviewImage(c, icon);
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoText)
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoText)
{
Text.DrawBackground(c, icon);
Text.DrawDisplayName(c, icon);
@ -182,72 +186,81 @@ namespace FModel.Creator
// Watermark.DrawWatermark(c); // boi why would you watermark something you don't own ¯\_(ツ)_/¯
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
}
case "AthenaSeasonItemDefinition":
{
BaseSeason icon = new BaseSeason(exports[index], assetFolder);
using (var ret = new SKBitmap(icon.Width, icon.HeaderHeight + icon.AdditionalSize,
SKColorType.Rgba8888, SKAlphaType.Opaque))
using (var c = new SKCanvas(ret))
{
BaseSeason icon = new BaseSeason(exports[index], assetFolder);
using (var ret = new SKBitmap(icon.Width, icon.HeaderHeight + icon.AdditionalSize, SKColorType.Rgba8888, SKAlphaType.Opaque))
using (var c = new SKCanvas(ret))
{
icon.Draw(c);
icon.Draw(c);
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
}
case "FortMtxOfferData":
{
BaseOffer icon = new BaseOffer(exports[index]);
using (var ret = new SKBitmap(icon.Size, icon.Size, SKColorType.Rgba8888, SKAlphaType.Premul))
using (var c = new SKCanvas(ret))
{
BaseOffer icon = new BaseOffer(exports[index]);
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
icon.DrawBackground(c);
}
icon.DrawImage(c);
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
}
case "MaterialInstanceConstant":
{
if (assetFolder.Equals("MI_OfferImages"))
{
BaseOfferMaterial icon = new BaseOfferMaterial(exports[index]);
using (var ret = new SKBitmap(icon.Size, icon.Size, SKColorType.Rgba8888, SKAlphaType.Premul))
using (var c = new SKCanvas(ret))
{
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
icon.DrawBackground(c);
}
icon.DrawImage(c);
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
}
case "MaterialInstanceConstant":
{
if (assetFolder.Equals("MI_OfferImages"))
{
BaseOfferMaterial icon = new BaseOfferMaterial(exports[index]);
using (var ret = new SKBitmap(icon.Size, icon.Size, SKColorType.Rgba8888, SKAlphaType.Premul))
using (var c = new SKCanvas(ret))
{
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
icon.DrawBackground(c);
}
icon.DrawImage(c);
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
}
return false;
}
return false;
}
case "FortItemSeriesDefinition":
{
BaseIcon icon = new BaseIcon();
using (var ret = new SKBitmap(icon.Size, icon.Size, SKColorType.Rgba8888, SKAlphaType.Opaque))
using (var c = new SKCanvas(ret))
{
BaseIcon icon = new BaseIcon();
using (var ret = new SKBitmap(icon.Size, icon.Size, SKColorType.Rgba8888, SKAlphaType.Opaque))
using (var c = new SKCanvas(ret))
{
Serie.GetRarity(icon, exports[index]);
Rarity.DrawRarity(c, icon);
Serie.GetRarity(icon, exports[index]);
Rarity.DrawRarity(c, icon);
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
}
case "PlaylistUserOptionEnum":
case "PlaylistUserOptionBool":
case "PlaylistUserOptionString":
@ -258,57 +271,62 @@ namespace FModel.Creator
case "PlaylistUserOptionFloatRange":
case "PlaylistUserOptionPrimaryAsset":
case "PlaylistUserOptionCollisionProfileEnum":
{
BaseUserOption icon = new BaseUserOption(exports[index]);
using (var ret = new SKBitmap(icon.Width, icon.Height, SKColorType.Rgba8888, SKAlphaType.Opaque))
using (var c = new SKCanvas(ret))
{
BaseUserOption icon = new BaseUserOption(exports[index]);
using (var ret = new SKBitmap(icon.Width, icon.Height, SKColorType.Rgba8888, SKAlphaType.Opaque))
using (var c = new SKCanvas(ret))
{
icon.Draw(c);
icon.Draw(c);
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
}
case "FortChallengeBundleItemDefinition":
{
BaseBundle icon = new BaseBundle(exports[index], assetFolder);
using (var ret = new SKBitmap(icon.Width, icon.HeaderHeight + icon.AdditionalSize,
SKColorType.Rgba8888, SKAlphaType.Opaque))
using (var c = new SKCanvas(ret))
{
BaseBundle icon = new BaseBundle(exports[index], assetFolder);
using (var ret = new SKBitmap(icon.Width, icon.HeaderHeight + icon.AdditionalSize, SKColorType.Rgba8888, SKAlphaType.Opaque))
using (var c = new SKCanvas(ret))
{
HeaderStyle.DrawHeaderPaint(c, icon);
HeaderStyle.DrawHeaderText(c, icon);
QuestStyle.DrawQuests(c, icon);
QuestStyle.DrawCompletionRewards(c, icon);
HeaderStyle.DrawHeaderPaint(c, icon);
HeaderStyle.DrawHeaderText(c, icon);
QuestStyle.DrawQuests(c, icon);
QuestStyle.DrawCompletionRewards(c, icon);
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
}
case "FortItemAccessTokenType":
{
BaseItemAccess icon = new BaseItemAccess(exports[index]);
using (var ret = new SKBitmap(icon.Size, icon.Size, SKColorType.Rgba8888, SKAlphaType.Opaque))
using (var c = new SKCanvas(ret))
{
BaseItemAccess icon = new BaseItemAccess(exports[index]);
using (var ret = new SKBitmap(icon.Size, icon.Size, SKColorType.Rgba8888, SKAlphaType.Opaque))
using (var c = new SKCanvas(ret))
{
icon.Draw(c);
icon.Draw(c);
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
}
case "MapUIData":
{
BaseMapUIData icon = new BaseMapUIData(exports[index]);
using (var ret = new SKBitmap(icon.Width, icon.Height, SKColorType.Rgba8888, SKAlphaType.Premul))
using (var c = new SKCanvas(ret))
{
BaseMapUIData icon = new BaseMapUIData(exports[index]);
using (var ret = new SKBitmap(icon.Width, icon.Height, SKColorType.Rgba8888, SKAlphaType.Premul))
using (var c = new SKCanvas(ret))
{
icon.Draw(c);
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
icon.Draw(c);
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
}
case "ArmorUIData":
case "SprayUIData":
case "ThemeUIData":
@ -326,18 +344,20 @@ namespace FModel.Creator
case "EquippableSkinLevelUIData":
case "EquippableSkinChromaUIData":
case "EquippableCharmLevelUIData":
{
BaseUIData icon = new BaseUIData(exports, index);
using (var ret = new SKBitmap(icon.Width + icon.AdditionalWidth, icon.Height, SKColorType.Rgba8888,
SKAlphaType.Premul))
using (var c = new SKCanvas(ret))
{
BaseUIData icon = new BaseUIData(exports, index);
using (var ret = new SKBitmap(icon.Width + icon.AdditionalWidth, icon.Height, SKColorType.Rgba8888, SKAlphaType.Premul))
using (var c = new SKCanvas(ret))
{
icon.Draw(c);
icon.Draw(c);
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
}
//case "StreamedVideoDataAsset": // must find a way to automatically gets the right version in the url
// {
// if (Globals.Game.ActualGame == EGame.Valorant && exports[index].GetExport<StructProperty>("Uuid") is StructProperty s && s.Value is FGuid uuid)
@ -363,75 +383,109 @@ namespace FModel.Creator
case "GCosmeticRunTrail":
case "GCosmeticArtifact":
case "GCosmeticDropTrail":
{
BaseGCosmetic icon = new BaseGCosmetic(exports[index], exportType);
using (var ret = new SKBitmap(icon.Width, icon.Height, SKColorType.Rgba8888, SKAlphaType.Premul))
using (var c = new SKCanvas(ret))
{
BaseGCosmetic icon = new BaseGCosmetic(exports[index], exportType);
using (var ret = new SKBitmap(icon.Width, icon.Height, SKColorType.Rgba8888, SKAlphaType.Premul))
using (var c = new SKCanvas(ret))
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign == EIconDesign.Flat)
{
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign == EIconDesign.Flat)
{
icon.Draw(c);
}
else
{
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
Rarity.DrawRarity(c, icon);
}
}
LargeSmallImage.DrawPreviewImage(c, icon);
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoText)
{
Text.DrawBackground(c, icon);
Text.DrawDisplayName(c, icon);
Text.DrawDescription(c, icon);
}
}
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
icon.Draw(c);
}
return true;
else
{
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
Rarity.DrawRarity(c, icon);
}
}
LargeSmallImage.DrawPreviewImage(c, icon);
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoText)
{
Text.DrawBackground(c, icon);
Text.DrawDisplayName(c, icon);
Text.DrawDescription(c, icon);
}
}
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
}
case "GCosmeticCard":
{
BaseGCosmetic icon = new BaseGCosmetic(exports[index], exportType);
using (var ret = new SKBitmap(icon.Width, icon.Height, SKColorType.Rgba8888, SKAlphaType.Premul))
using (var c = new SKCanvas(ret))
{
BaseGCosmetic icon = new BaseGCosmetic(exports[index], exportType);
using (var ret = new SKBitmap(icon.Width, icon.Height, SKColorType.Rgba8888, SKAlphaType.Premul))
using (var c = new SKCanvas(ret))
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign == EIconDesign.Flat)
{
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign == EIconDesign.Flat)
{
icon.Draw(c);
}
else
{
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
Rarity.DrawRarity(c, icon);
}
}
LargeSmallImage.DrawPreviewImage(c, icon);
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoText)
{
Text.DrawBackground(c, icon);
Text.DrawDisplayName(c, icon);
Text.DrawDescription(c, icon);
}
}
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
icon.Draw(c);
}
return true;
else
{
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
Rarity.DrawRarity(c, icon);
}
}
LargeSmallImage.DrawPreviewImage(c, icon);
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoText)
{
Text.DrawBackground(c, icon);
Text.DrawDisplayName(c, icon);
Text.DrawDescription(c, icon);
}
}
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
}
// Battle Breakers
case "WExpGenericAccountItemDefinition":
{
BaseBBDefinition icon = new BaseBBDefinition(exports[index], exportType);
using (var ret = new SKBitmap(icon.Width, icon.Height, SKColorType.Rgba8888, SKAlphaType.Premul))
using (var c = new SKCanvas(ret))
{
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
Rarity.DrawRarity(c, icon);
}
LargeSmallImage.DrawPreviewImage(c, icon);
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
if ((EIconDesign) Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoText)
{
Text.DrawBackground(c, icon);
Text.DrawDisplayName(c, icon);
Text.DrawDescription(c, icon);
}
}
Watermark.DrawWatermark(c); // watermark should only be applied on icons with width = 512
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
}
}
return false;
}
}
}
}

View File

@ -56,6 +56,17 @@ namespace FModel.Creator.Texts
private const string _NANUM_GOTHIC = "NanumGothic";
private const string _QUADRAT_BOLD = "Quadrat_Bold";
private const string _SEGOE_BOLD_ITALIC = "Segoe_Bold_Italic";
private const string _BATTLE_BREAKERS_BASE_PATH = "/Game/UMG/Fonts/Faces/";
private const string _HEMIHEAD426 = "HemiHead426";
private const string _ROBOTO_BOLD = "Roboto-Bold";
private const string _ROBOTO_BOLD_ALL_CAPS = "Roboto-BoldAllCaps";
private const string _ROBOTO_REGULAR = "Roboto-Regular";
private const string _NOTO_SANS_JP_REGULAR = "NotoSansJP-Regular";
private const string _LATO_LIGHT = "Lato-Light";
private const string _LATO_MEDIUM = "Lato-Medium";
private const string _LATO_BLACK_ITALIC = "Lato-BlackItalic";
private const string _LATO_BLACK = "Lato-Black";
#pragma warning restore IDE0051
public SKTypeface DefaultTypeface; // used as default font for all untranslated strings (item source, ...)
@ -67,7 +78,7 @@ namespace FModel.Creator.Texts
public Typefaces()
{
DefaultTypeface = SKTypeface.FromStream(Application.GetResourceStream(_BURBANK_BIG_CONDENSED_BOLD).Stream);
DefaultTypeface = SKTypeface.FromStream(Application.GetResourceStream(_BURBANK_BIG_CONDENSED_BOLD)?.Stream);
if (Globals.Game.ActualGame == EGame.Fortnite)
{
ArraySegment<byte>[] t = Utils.GetPropertyArraySegmentByte(_FORTNITE_BASE_PATH + _BURBANK_BIG_CONDENSED_BLACK);
@ -174,6 +185,30 @@ namespace FModel.Creator.Texts
DescriptionTypeface = SKTypeface.FromStream(t[2].AsStream());
else DescriptionTypeface = DefaultTypeface;
}
else if (Globals.Game.ActualGame == EGame.BattleBreakers)
{
string namePath = _BATTLE_BREAKERS_BASE_PATH + (
Properties.Settings.Default.AssetsLanguage == (long)ELanguage.Korean ? _NOTO_SANS_KR_REGULAR :
Properties.Settings.Default.AssetsLanguage == (long)ELanguage.Russian ? _LATO_BLACK :
Properties.Settings.Default.AssetsLanguage == (long)ELanguage.Japanese ? _NOTO_SANS_JP_REGULAR :
Properties.Settings.Default.AssetsLanguage == (long)ELanguage.Chinese ? _NOTO_SANS_SC_REGULAR :
_HEMIHEAD426);
ArraySegment<byte>[] t = Utils.GetPropertyArraySegmentByte(namePath);
if (t != null && t.Length == 3 && t[2].Array != null)
DisplayNameTypeface = SKTypeface.FromStream(t[2].AsStream());
else DisplayNameTypeface = DefaultTypeface;
string descriptionPath = _BATTLE_BREAKERS_BASE_PATH + (
Properties.Settings.Default.AssetsLanguage == (long)ELanguage.Korean ? _NOTO_SANS_KR_REGULAR :
Properties.Settings.Default.AssetsLanguage == (long)ELanguage.Russian ? _LATO_BLACK :
Properties.Settings.Default.AssetsLanguage == (long)ELanguage.Japanese ? _NOTO_SANS_JP_REGULAR :
Properties.Settings.Default.AssetsLanguage == (long)ELanguage.Chinese ? _NOTO_SANS_SC_REGULAR :
_HEMIHEAD426);
t = Utils.GetPropertyArraySegmentByte(descriptionPath);
if (t != null && t.Length == 3 && t[2].Array != null)
DescriptionTypeface = SKTypeface.FromStream(t[2].AsStream());
else DescriptionTypeface = DefaultTypeface;
}
}
public bool NeedReload(bool forceReload) => forceReload ?