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