Merge branch 'main' into feature/tags-by-zone
This commit is contained in:
@@ -17,9 +17,9 @@ namespace Pilz.Dalamud.Nameplates.EventArgs
|
||||
}
|
||||
|
||||
public SafeNameplateObject SafeNameplateObject { get; set; }
|
||||
public SeString Title { get; set; }
|
||||
public SeString Name { get; set; }
|
||||
public SeString FreeCompany { get; set; }
|
||||
public SeString Title { get; internal set; }
|
||||
public SeString Name { get; internal set; }
|
||||
public SeString FreeCompany { get; internal set; }
|
||||
|
||||
public bool IsTitleAboveName
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Pilz.Dalamud.Nameplates.EventArgs;
|
||||
using Pilz.Dalamud.Tools.Strings;
|
||||
|
||||
namespace Pilz.Dalamud.Nameplates.Tools
|
||||
@@ -18,6 +19,13 @@ namespace Pilz.Dalamud.Nameplates.Tools
|
||||
changes.Add(NameplateElements.FreeCompany, new());
|
||||
}
|
||||
|
||||
public NameplateChanges(AddonNamePlate_SetPlayerNameManagedEventArgs eventArgs) : this()
|
||||
{
|
||||
GetProps(NameplateElements.Title).Destination = eventArgs.Title;
|
||||
GetProps(NameplateElements.Name).Destination = eventArgs.Name;
|
||||
GetProps(NameplateElements.FreeCompany).Destination = eventArgs.FreeCompany;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the properties with the changes of an element of your choice where you can add your payloads to a change and setup some options.
|
||||
/// </summary>
|
||||
|
||||
@@ -12,5 +12,14 @@ namespace Pilz.Dalamud.Nameplates.Tools
|
||||
/// All the changes to the nameplate that should be made.
|
||||
/// </summary>
|
||||
public NameplateChanges Changes { get; set; }
|
||||
|
||||
public NameplateChangesProps()
|
||||
{
|
||||
}
|
||||
|
||||
public NameplateChangesProps(NameplateChanges changes) : this()
|
||||
{
|
||||
Changes = changes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,9 +21,10 @@
|
||||
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
|
||||
<Copyright>Pilzinsel64</Copyright>
|
||||
<PackageProjectUrl>https://github.com/Pilzinsel64/Pilz.Dalamud</PackageProjectUrl>
|
||||
<PackageReadmeFile>README.md</PackageReadmeFile>
|
||||
<RepositoryUrl>https://github.com/Pilzinsel64/Pilz.Dalamud</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<Version>0.2.0</Version>
|
||||
<Version>0.3.1</Version>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -58,4 +59,8 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\README.md" Pack="true" PackagePath="\"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -98,14 +98,14 @@ namespace Pilz.Dalamud.Tools.Strings
|
||||
if (tagPosition == StringPosition.Before)
|
||||
{
|
||||
var significantPayloads = payloads.Where(payload => payload is TextPayload || payload is IconPayload);
|
||||
if (significantPayloads.Last() is TextPayload)
|
||||
if (significantPayloads.LastOrDefault() is TextPayload)
|
||||
payloads.Add(getNewTextPayload());
|
||||
}
|
||||
// Decide whether to add a space to the beginning
|
||||
else if (tagPosition == StringPosition.After)
|
||||
{
|
||||
var significantPayloads = payloads.Where(payload => payload is TextPayload || payload is IconPayload);
|
||||
if (significantPayloads.First() is TextPayload)
|
||||
if (significantPayloads.FirstOrDefault() is TextPayload)
|
||||
payloads.Insert(0, getNewTextPayload());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user