mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-22 07:47:45 +01:00
fix: remove fate tracking features
This commit is contained in:
parent
574a831444
commit
4d906923a2
2 changed files with 0 additions and 104 deletions
|
|
@ -144,18 +144,6 @@ namespace Dalamud {
|
|||
HelpMessage = "Shows list of commands available."
|
||||
});
|
||||
|
||||
CommandManager.AddHandler("/fatewatchadd", new CommandInfo(OnFateWatchAdd) {
|
||||
HelpMessage = "Add a fate to your watch list by name. Usage: /fatewatchadd <name of fate>"
|
||||
});
|
||||
|
||||
CommandManager.AddHandler("/fatewatchlist", new CommandInfo(OnFateWatchList) {
|
||||
HelpMessage = "List fates you're currently watching."
|
||||
});
|
||||
|
||||
CommandManager.AddHandler("/fatewatchremove", new CommandInfo(OnFateWatchRemove) {
|
||||
HelpMessage = "Remove a fate from your watch list. Usage: /fatewatchremove <name of fate>"
|
||||
});
|
||||
|
||||
CommandManager.AddHandler("/xlmute", new CommandInfo(OnBadWordsAdd) {
|
||||
HelpMessage = "Mute a word or sentence from appearing in chat. Usage: /xlmute <word or sentence>"
|
||||
});
|
||||
|
|
@ -236,62 +224,6 @@ namespace Dalamud {
|
|||
}
|
||||
}
|
||||
|
||||
private void OnFateWatchAdd(string command, string arguments) {
|
||||
if (this.Configuration.Fates == null)
|
||||
this.Configuration.Fates = new List<DalamudConfiguration.FateInfo>();
|
||||
|
||||
dynamic candidates = XivApi.Search(arguments, "Fate").GetAwaiter().GetResult();
|
||||
|
||||
if (candidates.Results.Count == 0) {
|
||||
Framework.Gui.Chat.Print("No fates found using that name.");
|
||||
return;
|
||||
}
|
||||
|
||||
var fateInfo = new DalamudConfiguration.FateInfo {
|
||||
Id = candidates.Results[0].ID,
|
||||
Name = candidates.Results[0].Name
|
||||
};
|
||||
|
||||
this.Configuration.Fates.Add(fateInfo);
|
||||
|
||||
this.Configuration.Save(this.StartInfo.ConfigurationPath);
|
||||
|
||||
Framework.Gui.Chat.Print($"Added fate \"{fateInfo.Name}\".");
|
||||
}
|
||||
|
||||
private void OnFateWatchList(string command, string arguments) {
|
||||
if (this.Configuration.Fates == null)
|
||||
this.Configuration.Fates = new List<DalamudConfiguration.FateInfo>();
|
||||
|
||||
if (this.Configuration.Fates.Count == 0) {
|
||||
Framework.Gui.Chat.Print("No fates on your watchlist.");
|
||||
return;
|
||||
}
|
||||
|
||||
this.Configuration.Save(this.StartInfo.ConfigurationPath);
|
||||
|
||||
foreach (var fate in this.Configuration.Fates)
|
||||
Framework.Gui.Chat.Print($"Fate {fate.Id}: {fate.Name}");
|
||||
}
|
||||
|
||||
private void OnFateWatchRemove(string command, string arguments) {
|
||||
if (this.Configuration.Fates == null)
|
||||
this.Configuration.Fates = new List<DalamudConfiguration.FateInfo>();
|
||||
|
||||
dynamic candidates = XivApi.Search(arguments, "Fate").GetAwaiter().GetResult();
|
||||
|
||||
if (candidates.Results.Count == 0) {
|
||||
Framework.Gui.Chat.Print("No fates found using that name.");
|
||||
return;
|
||||
}
|
||||
|
||||
this.Configuration.Fates.RemoveAll(x => x.Id == candidates.Results[0].ID);
|
||||
|
||||
this.Configuration.Save(this.StartInfo.ConfigurationPath);
|
||||
|
||||
Framework.Gui.Chat.Print($"Removed fate \"{candidates.Results[0].Name}\".");
|
||||
}
|
||||
|
||||
private void OnBadWordsAdd(string command, string arguments) {
|
||||
if (this.Configuration.BadWords == null)
|
||||
this.Configuration.BadWords = new List<string>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue