Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
LangList.cs
Go to the documentation of this file.
1using System;
2
3public class LangList : SourceDataString<LangList.Row>
4{
5 [Serializable]
6 public class Row : BaseRow
7 {
8 public string id;
9
10 public string filter;
11
12 public string[] text_JP;
13
14 public string[] text;
15
16 [NonSerialized]
17 public string[] text_L;
18
19 public override bool UseAlias => false;
20
21 public override string GetAlias => "n";
22 }
23
24 public override bool AllowHotInitialization => true;
25
26 public override Row CreateRow()
27 {
28 return new Row
29 {
30 id = SourceData.GetString(0),
31 filter = SourceData.GetString(1),
32 text_JP = SourceData.GetStringArray(2),
34 };
35 }
36
37 public override void SetRow(Row r)
38 {
39 map[r.id] = r;
40 }
41
42 public override string[] GetList(string id)
43 {
44 Row row = map.TryGetValue(id);
45 if (row == null)
46 {
47 return null;
48 }
49 if (!Lang.isBuiltin)
50 {
51 if (row.text_L == null || row.text_L.Length == 0)
52 {
53 return row.text;
54 }
55 return row.text_L;
56 }
57 if (!Lang.isJP)
58 {
59 return row.text;
60 }
61 return row.text_JP;
62 }
63}
string filter
Definition: LangList.cs:10
string id
Definition: LangList.cs:8
override string GetAlias
Definition: LangList.cs:21
string[] text_L
Definition: LangList.cs:17
string[] text
Definition: LangList.cs:14
override bool UseAlias
Definition: LangList.cs:19
string[] text_JP
Definition: LangList.cs:12
override bool AllowHotInitialization
Definition: LangList.cs:24
override Row CreateRow()
Definition: LangList.cs:26
override string[] GetList(string id)
Definition: LangList.cs:42
override void SetRow(Row r)
Definition: LangList.cs:37
Definition: Lang.cs:6
static bool isBuiltin
Definition: Lang.cs:42
static bool isJP
Definition: Lang.cs:38
static string[] GetStringArray(int id)
Definition: SourceData.cs:741
static string GetString(int id)
Definition: SourceData.cs:746