Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
EntrySorter.cs
Go to the documentation of this file.
3
5
7{
9
10 private int _prioritizedStep;
11
16
17 public int Compare(TEntryType x, TEntryType y)
18 {
19 int num = 0;
20 if (_prioritizedStep != -1)
21 {
22 num = Steps[_prioritizedStep].Compare(x, y);
23 if (num != 0)
24 {
25 return num;
26 }
27 }
28 for (int i = 0; i < Steps.Count; i++)
29 {
30 if (i != _prioritizedStep)
31 {
32 num = Steps[i].Compare(x, y);
33 if (num != 0)
34 {
35 return num;
36 }
37 }
38 }
39 return num;
40 }
41
42 public void SetPrioritizedStepIndex(int index)
43 {
44 _prioritizedStep = index;
45 }
46
47 public string GetDisplayName()
48 {
49 return Language.GetTextValue(Steps[_prioritizedStep].GetDisplayNameKey());
50 }
51}
void AddRange(IEnumerable< T > collection)
Definition List.cs:275
int Compare(TEntryType x, TEntryType y)
void AddSortSteps(List< TStepType > sortSteps)
static string GetTextValue(string key)
Definition Language.cs:15