-
Notifications
You must be signed in to change notification settings - Fork 0
/
APUrlSuggestor.cs
35 lines (28 loc) · 1.05 KB
/
APUrlSuggestor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using QFSW.QC;
using System;
using System.Collections.Generic;
using System.Text;
namespace Ryguy9999.ATS.ATSForAP {
public struct APUrlSuggestionTag : IQcSuggestorTag {
}
public sealed class APUrlSuggestionAttribute : SuggestorTagAttribute {
private readonly IQcSuggestorTag[] _tags = { new APUrlSuggestionTag() };
public override IQcSuggestorTag[] GetSuggestorTags() {
return _tags;
}
}
public class APUrlSuggestionSuggestor : BasicCachedQcSuggestor<string> {
protected override bool CanProvideSuggestions(SuggestionContext context, SuggestorOptions options) {
return context.HasTag<APUrlSuggestionTag>();
}
protected override IQcSuggestion ItemToSuggestion(string abilityName) {
return new RawSuggestion(abilityName, true);
}
protected override IEnumerable<string> GetItems(SuggestionContext context, SuggestorOptions options) {
return new string[]
{
"archipelago.gg:",
};
}
}
}