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