Allow FC exclusions
This commit is contained in:
parent
7e0647913c
commit
139c269ddd
@ -15,9 +15,9 @@ public sealed class Configuration : IPluginConfiguration
|
||||
{
|
||||
public bool Enabled { get; set; }
|
||||
public string Server { get; set; } = "http://localhost:8086";
|
||||
public string Token { get; set; } = "xxx";
|
||||
public string Organization { get; set; } = "org";
|
||||
public string Bucket { get; set; } = "bucket";
|
||||
public string Token { get; set; } = "";
|
||||
public string Organization { get; set; } = "";
|
||||
public string Bucket { get; set; } = "";
|
||||
}
|
||||
|
||||
public sealed class CharacterInfo
|
||||
@ -25,5 +25,6 @@ public sealed class Configuration : IPluginConfiguration
|
||||
public ulong LocalContentId { get; set; }
|
||||
public string? CachedPlayerName { get; set; }
|
||||
public string? CachedWorldName { get; set; }
|
||||
public bool IncludeFreeCompany { get; set; } = true;
|
||||
}
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ internal sealed class InfluxStatisticsClient : IDisposable
|
||||
|
||||
var validFcIds = currencyStats.Keys
|
||||
.Where(x => x.CharacterType == CharacterType.Character)
|
||||
.Where(x => _configuration.IncludedCharacters.SingleOrDefault(config => config.LocalContentId == x.CharacterId)?.IncludeFreeCompany == true)
|
||||
.Select(x => x.FreeCompanyId)
|
||||
.ToList();
|
||||
Task.Run(async () =>
|
||||
|
@ -88,9 +88,21 @@ internal sealed class ConfigurationWindow : Window
|
||||
$"Current Character: {_clientState.LocalPlayer?.Name} @ {worldName} ({_clientState.LocalContentId:X})");
|
||||
|
||||
ImGui.Indent(30);
|
||||
if (_configuration.IncludedCharacters.Any(x => x.LocalContentId == _clientState.LocalContentId))
|
||||
Configuration.CharacterInfo? includedCharacter =
|
||||
_configuration.IncludedCharacters.FirstOrDefault(x => x.LocalContentId == _clientState.LocalContentId);
|
||||
if (includedCharacter != null)
|
||||
{
|
||||
ImGui.TextColored(ImGuiColors.HealerGreen, "This character is currently included.");
|
||||
|
||||
bool includeFreeCompany = includedCharacter.IncludeFreeCompany;
|
||||
if (ImGui.Checkbox("Include Free Company statistics", ref includeFreeCompany))
|
||||
{
|
||||
includedCharacter.IncludeFreeCompany = includeFreeCompany;
|
||||
Save();
|
||||
}
|
||||
|
||||
ImGui.Spacing();
|
||||
|
||||
if (ImGui.Button("Remove inclusion"))
|
||||
{
|
||||
_configuration.IncludedCharacters.RemoveAll(
|
||||
|
Loading…
Reference in New Issue
Block a user