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