Elin Modding Docs Doc
Loading...
Searching...
No Matches
TraitStoryBook.cs
1using System;
2using System.Collections.Generic;
3using System.Runtime.CompilerServices;
4
5// Token: 0x02000369 RID: 873
7{
8 // Token: 0x170007EF RID: 2031
9 // (get) Token: 0x06001B01 RID: 6913 RVA: 0x000A6E21 File Offset: 0x000A5021
10 public virtual string IdBook
11 {
12 get
13 {
14 return "_main";
15 }
16 }
17
18 // Token: 0x06001B02 RID: 6914 RVA: 0x000A6E28 File Offset: 0x000A5028
19 public override void OnRead(Chara c)
20 {
21 if (this is TraitTutorialBook)
22 {
23 Tutorial.debugSkip = false;
24 }
25 ExcelData excelData = new ExcelData();
26 excelData.path = CorePath.DramaData + this.IdBook + ".xlsx";
27 if (!Lang.isBuiltin)
28 {
29 excelData.path = CorePath.DramaDataLocal + this.IdBook + ".xlsx";
30 }
31 excelData.BuildList("index");
32 ExcelData.Sheet sheet = excelData.sheets["index"];
33 List<Dictionary<string, string>> rows = sheet.list;
34 if (!EClass.debug.allStory)
35 {
36 rows.ForeachReverse(delegate(Dictionary<string, string> a)
37 {
38 int num = a["id"].ToInt();
39 if (!EClass.player.flags.IsStoryPlayed(num) || num >= 950)
40 {
41 rows.Remove(a);
42 }
43 });
44 }
45 EClass.ui.AddLayer<LayerList>().SetSize(450f, -1f).SetList2<Dictionary<string, string>>(rows, (Dictionary<string, string> a) => TraitStoryBook.<OnRead>g__GetText|2_1(a, "text"), delegate(Dictionary<string, string> a, ItemGeneral b)
46 {
47 EClass.player.flags.PlayStory(this.IdBook, a["id"].ToInt(), true);
48 }, delegate(Dictionary<string, string> a, ItemGeneral b)
49 {
50 }, false);
51 }
52
53 // Token: 0x06001B04 RID: 6916 RVA: 0x000A6F58 File Offset: 0x000A5158
54 [CompilerGenerated]
55 internal static string <OnRead>g__GetText|2_1(Dictionary<string, string> dict, string id)
56 {
57 if (!Lang.isBuiltin)
58 {
59 return dict[id];
60 }
61 if (!dict.ContainsKey(id + "_" + Lang.langCode))
62 {
63 return dict[id + "_JP"];
64 }
65 return dict[id + "_" + Lang.langCode];
66 }
67}
Definition Chara.cs:12