Initial release: HSUI v1.0.0.0 - HUD replacement with configurable hotbars
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
|
||||
namespace HSUI.Interface.StatusEffects
|
||||
{
|
||||
public class CustomEffectsListHud : StatusEffectsListHud
|
||||
{
|
||||
public CustomEffectsListHud(StatusEffectsListConfig config, string displayName) : base(config, displayName)
|
||||
{
|
||||
}
|
||||
|
||||
public IGameObject? TargetActor { get; set; } = null!;
|
||||
|
||||
protected override List<StatusEffectData> StatusEffectsData()
|
||||
{
|
||||
var list = StatusEffectDataList(TargetActor);
|
||||
list.AddRange(StatusEffectDataList(Actor));
|
||||
|
||||
// cull duplicate statuses from the same source
|
||||
list = list.GroupBy(s => new { s.Status.StatusId, s.Status.SourceObject.Id })
|
||||
.Select(status => status.First())
|
||||
.ToList();
|
||||
|
||||
// show mine or permanent first
|
||||
if (Config.ShowMineFirst || Config.ShowPermanentFirst)
|
||||
{
|
||||
return OrderByMineOrPermanentFirst(list);
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user