forked from awgil/ffxiv_bossmod
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from FFXIV-CombatReborn/merge
Blur - Song 2
- Loading branch information
Showing
362 changed files
with
994 additions
and
1,048 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Dalamud.Interface.Utility.Raii; | ||
|
||
namespace BossMod; | ||
|
||
public class BossModuleConfigWindow : UIWindow | ||
{ | ||
private ModuleRegistry.Info _info; | ||
private WorldState _ws; | ||
private UITree _tree = new(); | ||
|
||
public BossModuleConfigWindow(ModuleRegistry.Info info, WorldState ws) : base($"{info.ModuleType.Name} config", true, new(1200, 800)) | ||
{ | ||
_info = info; | ||
_ws = ws; | ||
} | ||
|
||
public override void Draw() | ||
{ | ||
if (_info.ConfigType == null) | ||
return; // nothing to do... | ||
|
||
using var tabs = ImRaii.TabBar("Tabs"); | ||
if (tabs) | ||
{ | ||
using (var tab = ImRaii.TabItem("Encounter-specific config")) | ||
if (tab) | ||
ConfigUI.DrawNode(Service.Config.Get<ConfigNode>(_info.ConfigType), Service.Config, _tree, _ws); | ||
if (_ws.Party.Player() != null) | ||
using (var tab = ImRaii.TabItem("Party roles assignment")) | ||
if (tab) | ||
ConfigUI.DrawNode(Service.Config.Get<PartyRolesConfig>(), Service.Config, _tree, _ws); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
namespace BossMod; | ||
|
||
public static class BossModuleInfo | ||
{ | ||
public enum Expansion | ||
{ | ||
RealmReborn, | ||
Heavensward, | ||
Stormblood, | ||
Shadowbringers, | ||
Endwalker, | ||
Global, | ||
|
||
Count | ||
} | ||
|
||
public enum Category | ||
{ | ||
Uncategorized, | ||
Dungeon, | ||
Trial, | ||
Extreme, | ||
Raid, | ||
Savage, | ||
Ultimate, | ||
Unreal, | ||
Alliance, | ||
Foray, | ||
Criterion, | ||
DeepDungeon, | ||
FATE, | ||
Hunt, | ||
Quest, | ||
TreasureHunt, | ||
PVP, | ||
MaskedCarnivale, | ||
GoldSaucer, | ||
|
||
Count | ||
} | ||
|
||
public enum GroupType | ||
{ | ||
None, | ||
CFC, // group id is ContentFinderCondition row | ||
MaskedCarnivale, // group id is ContentFinderCondition row | ||
RemovedUnreal, // group id is ContentFinderCondition row | ||
Quest, // group id is Quest row | ||
Fate, // group id is Fate row | ||
Hunt, // group id is HuntRank | ||
BozjaCE, // group id is ContentFinderCondition row, name id is DynamicEvent row | ||
BozjaDuel, // group id is ContentFinderCondition row, name id is DynamicEvent row | ||
GoldSaucer, // group id is GoldSaucerTextData row | ||
} | ||
|
||
public enum HuntRank : uint { B, A, S, SS } | ||
|
||
// shorthand expansion names | ||
public static string ShortName(this Expansion e) => e switch | ||
{ | ||
Expansion.RealmReborn => "ARR", | ||
Expansion.Heavensward => "HW", | ||
Expansion.Stormblood => "SB", | ||
Expansion.Shadowbringers => "ShB", | ||
Expansion.Endwalker => "EW", | ||
_ => e.ToString() | ||
}; | ||
} | ||
|
||
// attribute that allows customizing boss module's metadata; it is optional, each field has some defaults that are fine in most cases | ||
[AttributeUsage(AttributeTargets.Class, Inherited = false)] | ||
public class ModuleInfoAttribute : 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.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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.