Elin Decompiled Documentation EA 23.307 Stable
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 override Row CreateRow()
40 {
41 return new Row
42 {
43 id = SourceData.GetString(0),
44 filter = SourceData.GetString(1),
45 group = SourceData.GetString(2),
46 color = SourceData.GetString(3),
47 logColor = SourceData.GetString(4),
48 sound = SourceData.GetString(5),
49 effect = SourceData.GetString(6),
50 text_JP = SourceData.GetString(7),
51 text = SourceData.GetString(8)
52 };
53 }
54
55 public override Row CreateRowByMapping(IReadOnlyDictionary<string, int> mapping)
56 {
57 return new Row
58 {
59 id = SourceData.GetString(mapping["id"]),
60 filter = SourceData.GetString(mapping["filter"]),
61 group = SourceData.GetString(mapping["group"]),
62 color = SourceData.GetString(mapping["color"]),
63 logColor = SourceData.GetString(mapping["logColor"]),
64 sound = SourceData.GetString(mapping["sound"]),
65 effect = SourceData.GetString(mapping["effect"]),
66 text_JP = SourceData.GetString(mapping["text_JP"]),
67 text = SourceData.GetString(mapping["text"])
68 };
69 }
70
71 public override void SetRow(Row r)
72 {
73 map[r.id] = r;
74 }
75
76 public override IReadOnlyDictionary<string, int> GetRowMapping()
77 {
78 return RowMapping;
79 }
80
81 public static bool Has(string id)
82 {
83 return Lang.Game.map.ContainsKey(id);
84 }
85}
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:39
override Row CreateRowByMapping(IReadOnlyDictionary< string, int > mapping)
Definition: LangGame.cs:55
static bool Has(string id)
Definition: LangGame.cs:81
override void SetRow(Row r)
Definition: LangGame.cs:71
override IReadOnlyDictionary< string, int > GetRowMapping()
Definition: LangGame.cs:76
static readonly IReadOnlyDictionary< string, int > RowMapping
Definition: LangGame.cs:26
string id
Definition: LangRow.cs:5
Definition: Lang.cs:6
static LangGame Game
Definition: Lang.cs:48
static string GetString(int id)
Definition: SourceData.cs:983