Elin Decompiled Documentation EA 23.306 Nightly
Loading...
Searching...
No Matches
LangNote.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3
4public class LangNote : SourceDataString<LangNote.Row>
5{
6 [Serializable]
7 public class Row : BaseRow
8 {
9 public string id;
10
11 public string text_JP;
12
13 public string text;
14
15 [NonSerialized]
16 public string text_L;
17
18 public override bool UseAlias => false;
19
20 public override string GetAlias => "n";
21 }
22
23 public static readonly IReadOnlyDictionary<string, int> RowMapping = new Dictionary<string, int>
24 {
25 ["id"] = 0,
26 ["text_JP"] = 1,
27 ["text"] = 2
28 };
29
30 public override bool AllowHotInitialization => true;
31
32 public override Row CreateRow()
33 {
34 return new Row
35 {
36 id = SourceData.GetString(0),
37 text_JP = SourceData.GetString(1),
38 text = SourceData.GetString(2)
39 };
40 }
41
42 public override Row CreateRowByMapping(IReadOnlyDictionary<string, int> mapping)
43 {
44 return new Row
45 {
46 id = SourceData.GetString(mapping["id"]),
47 text_JP = SourceData.GetString(mapping["text_JP"]),
48 text = SourceData.GetString(mapping["text"])
49 };
50 }
51
52 public override void SetRow(Row r)
53 {
54 map[r.id] = r;
55 }
56
57 public override IReadOnlyDictionary<string, int> GetRowMapping()
58 {
59 return RowMapping;
60 }
61}
string text_L
Definition: LangNote.cs:16
override bool UseAlias
Definition: LangNote.cs:18
string id
Definition: LangNote.cs:9
string text
Definition: LangNote.cs:13
override string GetAlias
Definition: LangNote.cs:20
string text_JP
Definition: LangNote.cs:11
static readonly IReadOnlyDictionary< string, int > RowMapping
Definition: LangNote.cs:23
override Row CreateRow()
Definition: LangNote.cs:32
override Row CreateRowByMapping(IReadOnlyDictionary< string, int > mapping)
Definition: LangNote.cs:42
override IReadOnlyDictionary< string, int > GetRowMapping()
Definition: LangNote.cs:57
override bool AllowHotInitialization
Definition: LangNote.cs:30
override void SetRow(Row r)
Definition: LangNote.cs:52
static string GetString(int id)
Definition: SourceData.cs:983