Elin Decompiled Documentation EA 23.321 Nightly Patch 1
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 static readonly IReadOnlyDictionary<string, string> TypeMapping = new Dictionary<string, string>
31 {
32 ["id"] = "string",
33 ["text_JP"] = "string",
34 ["text"] = "string"
35 };
36
37 public override bool AllowHotInitialization => true;
38
39 public override Row CreateRow()
40 {
41 return new Row
42 {
43 id = SourceData.GetString(0),
44 text_JP = SourceData.GetString(1),
45 text = SourceData.GetString(2)
46 };
47 }
48
49 public override Row CreateRowByMapping(IReadOnlyDictionary<string, int> mapping)
50 {
51 return new Row
52 {
53 id = SourceData.GetString(mapping["id"]),
54 text_JP = SourceData.GetString(mapping["text_JP"]),
55 text = SourceData.GetString(mapping["text"])
56 };
57 }
58
59 public override void SetRow(Row r)
60 {
61 map[r.id] = r;
62 }
63
64 public override IReadOnlyDictionary<string, int> GetRowMapping()
65 {
66 return RowMapping;
67 }
68
69 public override IReadOnlyDictionary<string, string> GetTypeMapping()
70 {
71 return TypeMapping;
72 }
73}
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, string > TypeMapping
Definition: LangNote.cs:30
static readonly IReadOnlyDictionary< string, int > RowMapping
Definition: LangNote.cs:23
override Row CreateRow()
Definition: LangNote.cs:39
override Row CreateRowByMapping(IReadOnlyDictionary< string, int > mapping)
Definition: LangNote.cs:49
override IReadOnlyDictionary< string, int > GetRowMapping()
Definition: LangNote.cs:64
override IReadOnlyDictionary< string, string > GetTypeMapping()
Definition: LangNote.cs:69
override bool AllowHotInitialization
Definition: LangNote.cs:37
override void SetRow(Row r)
Definition: LangNote.cs:59
static string GetString(int id)
Definition: SourceData.cs:1016