Skip to content

Commit

Permalink
Merge pull request #538 from FFXIV-CombatReborn/mergeWIP
Browse files Browse the repository at this point in the history
shut up code analyzer
  • Loading branch information
CarnifexOptimus authored Jan 2, 2025
2 parents 2026dda + b3c1759 commit 908d15a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 30 deletions.
1 change: 0 additions & 1 deletion BossMod/Autorotation/Utility/ClassSMNUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ public enum AegisStrategy { None, Use }
public float GetStatusDetail(Actor target, SMN.SID sid) => StatusDetails(target, sid, Player.InstanceID).Left; //Checks if Status effect is on target
public bool HasEffect(Actor target, SMN.SID sid, float duration) => GetStatusDetail(target, sid) < duration; //Checks if anyone has a status effect


public static readonly ActionID IDLimitBreak3 = ActionID.MakeSpell(SMN.AID.Teraflare);

public static RotationModuleDefinition Definition()
Expand Down
34 changes: 17 additions & 17 deletions BossMod/BossModule/BossModuleInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,21 @@ public enum HuntRank : uint { B, A, S, SS }
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class ModuleInfoAttribute(BossModuleInfo.Maturity maturity) : Attribute
{
public Type? StatesType; // default: ns.xxxStates
public Type? ConfigType; // default: ns.xxxConfig
public Type? ObjectIDType; // default: ns.OID
public Type? ActionIDType; // default: ns.AID
public Type? StatusIDType; // default: ns.SID
public Type? TetherIDType; // default: ns.TetherID
public Type? IconIDType; // default: ns.IconID
public uint PrimaryActorOID; // default: OID.Boss
public BossModuleInfo.Maturity Maturity = maturity;
public string Contributors = "";
public BossModuleInfo.Expansion Expansion = BossModuleInfo.Expansion.Count; // default: second namespace level
public BossModuleInfo.Category Category = BossModuleInfo.Category.Count; // default: third namespace level
public BossModuleInfo.GroupType GroupType = BossModuleInfo.GroupType.None;
public uint GroupID;
public uint NameID; // usually BNpcName row, unless GroupType uses it differently
public int SortOrder; // default: first number in type name
public int PlanLevel; // if > 0, module supports plans for this level
public Type? StatesType { get; set; } // default: ns.xxxStates
public Type? ConfigType { get; set; } // default: ns.xxxConfig
public Type? ObjectIDType { get; set; } // default: ns.OID
public Type? ActionIDType { get; set; } // default: ns.AID
public Type? StatusIDType { get; set; } // default: ns.SID
public Type? TetherIDType { get; set; } // default: ns.TetherID
public Type? IconIDType { get; set; } // default: ns.IconID
public uint PrimaryActorOID { get; set; } // default: OID.Boss
public BossModuleInfo.Maturity Maturity { get; } = maturity;
public string Contributors { get; set; } = "";
public BossModuleInfo.Expansion Expansion { get; set; } = BossModuleInfo.Expansion.Count; // default: second namespace level
public BossModuleInfo.Category Category { get; set; } = BossModuleInfo.Category.Count; // default: third namespace level
public BossModuleInfo.GroupType GroupType { get; set; } = BossModuleInfo.GroupType.None;
public uint GroupID { get; set; }
public uint NameID { get; set; } // usually BNpcName row, unless GroupType uses it differently
public int SortOrder { get; set; } // default: first number in type name
public int PlanLevel { get; set; } // if > 0, module supports plans for this level
}
24 changes: 12 additions & 12 deletions BossMod/Config/ConfigNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@ namespace BossMod;
[AttributeUsage(AttributeTargets.Class)]
public sealed class ConfigDisplayAttribute : Attribute
{
public string? Name;
public int Order;
public Type? Parent;
public string? Name { get; set; }
public int Order { get; set; }
public Type? Parent { get; set; }
}

// attribute that specifies how config node field or enumeration value is shown in the UI
[AttributeUsage(AttributeTargets.Field)]
public sealed class PropertyDisplayAttribute(string label, uint color = 0, string tooltip = "", bool separator = false) : Attribute
{
public string Label = label;
public uint Color = color == 0 ? Colors.TextColor1 : color;
public string Tooltip = tooltip;
public bool Separator = separator;
public string Label { get; } = label;
public uint Color { get; } = color == 0 ? Colors.TextColor1 : color;
public string Tooltip { get; } = tooltip;
public bool Separator { get; } = separator;
}

// attribute that specifies combobox should be used for displaying int/bool property
[AttributeUsage(AttributeTargets.Field)]
public sealed class PropertyComboAttribute(string[] values) : Attribute
{
public string[] Values = values;
public string[] Values { get; } = values;

#pragma warning disable CA1019 // this is just a shorthand
public PropertyComboAttribute(string falseText, string trueText) : this([falseText, trueText]) { }
Expand All @@ -38,10 +38,10 @@ public PropertyComboAttribute(string falseText, string trueText) : this([falseTe
[AttributeUsage(AttributeTargets.Field)]
public sealed class PropertySliderAttribute(float min, float max) : Attribute
{
public float Speed = 1;
public float Min = min;
public float Max = max;
public bool Logarithmic;
public float Speed { get; set; } = 1;
public float Min { get; } = min;
public float Max { get; } = max;
public bool Logarithmic { get; set; }
}

// base class for configuration nodes
Expand Down

0 comments on commit 908d15a

Please sign in to comment.