mirror of
https://github.com/4sval/FModel.git
synced 2026-09-14 20:46:45 -05:00
Fix '+' being drawn on icons that don't have UserFacingFlags
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using CUE4Parse.UE4.Assets.Exports;
|
using System.Linq;
|
||||||
|
using CUE4Parse.UE4.Assets.Exports;
|
||||||
using CUE4Parse.UE4.Objects.GameplayTags;
|
using CUE4Parse.UE4.Objects.GameplayTags;
|
||||||
using CUE4Parse.UE4.Objects.UObject;
|
using CUE4Parse.UE4.Objects.UObject;
|
||||||
using CUE4Parse.UE4.Versions;
|
using CUE4Parse.UE4.Versions;
|
||||||
@@ -20,6 +21,7 @@ namespace FModel.Creator.Bases.FN
|
|||||||
private string _source;
|
private string _source;
|
||||||
private string _season;
|
private string _season;
|
||||||
private bool _lowerDrawn;
|
private bool _lowerDrawn;
|
||||||
|
private bool _hasStyle;
|
||||||
|
|
||||||
public BaseCommunity(UObject uObject, EIconStyle style, string designName) : base(uObject, style)
|
public BaseCommunity(UObject uObject, EIconStyle style, string designName) : base(uObject, style)
|
||||||
{
|
{
|
||||||
@@ -87,9 +89,8 @@ namespace FModel.Creator.Bases.FN
|
|||||||
Description += GetCosmeticSet(set.Text, _design.DrawSetShort);
|
Description += GetCosmeticSet(set.Text, _design.DrawSetShort);
|
||||||
if (_design.DrawSeason && gameplayTags.TryGetGameplayTag("Cosmetics.Filter.Season.", out var season))
|
if (_design.DrawSeason && gameplayTags.TryGetGameplayTag("Cosmetics.Filter.Season.", out var season))
|
||||||
_season = GetCosmeticSeason(season.Text, _design.DrawSeasonShort);
|
_season = GetCosmeticSeason(season.Text, _design.DrawSeasonShort);
|
||||||
|
if (gameplayTags.Any(x => x.Text.StartsWith("Cosmetics.UserFacingFlags.")))
|
||||||
GetUserFacingFlags(gameplayTags.GetAllGameplayTags(
|
_hasStyle = true;
|
||||||
"Cosmetics.UserFacingFlags.", "Homebase.Class.", "NPC.CharacterType.Survivor.Defender."));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetCosmeticSet(string setName, bool bShort)
|
private string GetCosmeticSet(string setName, bool bShort)
|
||||||
@@ -290,7 +291,7 @@ namespace FModel.Creator.Bases.FN
|
|||||||
|
|
||||||
private void DrawUserFacingFlags(SKCanvas c, bool customOnly)
|
private void DrawUserFacingFlags(SKCanvas c, bool customOnly)
|
||||||
{
|
{
|
||||||
if (UserFacingFlags == null || UserFacingFlags.Length < 1) return;
|
if (!_hasStyle) return;
|
||||||
if (customOnly)
|
if (customOnly)
|
||||||
{
|
{
|
||||||
c.DrawBitmap(_design.GameplayTags.Custom, 0, 0, ImagePaint);
|
c.DrawBitmap(_design.GameplayTags.Custom, 0, 0, ImagePaint);
|
||||||
|
|||||||
Reference in New Issue
Block a user