Elin Decompiled Documentation EA 23.324 Nightly
Loading...
Searching...
No Matches
LangGame.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3
4public class LangGame : SourceLang<LangGame.Row>
5{
6 [Serializable]
7 public class Row : LangRow
8 {
9 public string filter;
10
11 public string group;
12
13 public string color;
14
15 public string logColor;
16
17 public string sound;
18
19 public string effect;
20
21 public override bool UseAlias => false;
22
23 public override string GetAlias => "n";
24 }
25
26 public static readonly IReadOnlyDictionary<string, int> RowMapping = new Dictionary<string, int>
27 {
28 ["id"] = 0,
29 ["filter"] = 1,
30 ["group"] = 2,
31 ["color"] = 3,
32 ["logColor"] = 4,
33 ["sound"] = 5,
34 ["effect"] = 6,
35 ["text_JP"] = 7,
36 ["text"] = 8
37 };
38
39 public static readonly IReadOnlyDictionary<string, string> TypeMapping = new Dictionary<string, string>
40 {
41 ["id"] = "string",
42 ["filter"] = "string",
43 ["group"] = "string",
44 ["color"] = "string",
45 ["logColor"] = "string",
46 ["sound"] = "string",
47 ["effect"] = "string",
48 ["text_JP"] = "string",
49 ["text"] = "string"
50 };
51
52 public override Row CreateRow()
53 {
54 return new Row
55 {
56 id = SourceData.GetString(0),
57 filter = SourceData.GetString(1),
58 group = SourceData.GetString(2),
59 color = SourceData.GetString(3),
60 logColor = SourceData.GetString(4),
61 sound = SourceData.GetString(5),
62 effect = SourceData.GetString(6),
63 text_JP = SourceData.GetString(7),
64 text = SourceData.GetString(8)
65 };
66 }
67
68 public override Row CreateRowByMapping(IReadOnlyDictionary<string, int> mapping)
69 {
70 return new Row
71 {
72 id = SourceData.GetString(mapping["id"]),
73 filter = SourceData.GetString(mapping["filter"]),
74 group = SourceData.GetString(mapping["group"]),
75 color = SourceData.GetString(mapping["color"]),
76 logColor = SourceData.GetString(mapping["logColor"]),
77 sound = SourceData.GetString(mapping["sound"]),
78 effect = SourceData.GetString(mapping["effect"]),
79 text_JP = SourceData.GetString(mapping["text_JP"]),
80 text = SourceData.GetString(mapping["text"])
81 };
82 }
83
84 public override void SetRow(Row r)
85 {
86 map[r.id] = r;
87 }
88
89 public override IReadOnlyDictionary<string, int> GetRowMapping()
90 {
91 return RowMapping;
92 }
93
94 public override IReadOnlyDictionary<string, string> GetTypeMapping()
95 {
96 return TypeMapping;
97 }
98
99 public static bool Has(string id)
100 {
101 return Lang.Game.map.ContainsKey(id);
102 }
103}
string sound
Definition: LangGame.cs:17
override bool UseAlias
Definition: LangGame.cs:21
string color
Definition: LangGame.cs:13
override string GetAlias
Definition: LangGame.cs:23
string group
Definition: LangGame.cs:11
string logColor
Definition: LangGame.cs:15
string filter
Definition: LangGame.cs:9
string effect
Definition: LangGame.cs:19
override Row CreateRow()
Definition: LangGame.cs:52
override Row CreateRowByMapping(IReadOnlyDictionary< string, int > mapping)
Definition: LangGame.cs:68
static bool Has(string id)
Definition: LangGame.cs:99
override void SetRow(Row r)
Definition: LangGame.cs:84
override IReadOnlyDictionary< string, int > GetRowMapping()
Definition: LangGame.cs:89
override IReadOnlyDictionary< string, string > GetTypeMapping()
Definition: LangGame.cs:94
static readonly IReadOnlyDictionary< string, int > RowMapping
Definition: LangGame.cs:26
static readonly IReadOnlyDictionary< string, string > TypeMapping
Definition: LangGame.cs:39
string id
Definition: LangRow.cs:5
Definition: Lang.cs:7
static LangGame Game
Definition: Lang.cs:49
static string GetString(int id)
Definition: SourceData.cs:1016