Elin Modding Docs Doc
Loading...
Searching...
No Matches
ReligionManager.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using Newtonsoft.Json;
5
6// Token: 0x02000092 RID: 146
7public class ReligionManager : EClass
8{
9 // Token: 0x060003FC RID: 1020 RVA: 0x0001B85C File Offset: 0x00019A5C
10 public void SetOwner()
11 {
12 this.list = new List<Religion>
13 {
14 this.Eyth,
15 this.Wind,
16 this.Earth,
17 this.Healing,
18 this.Luck,
19 this.Machine,
20 this.Element,
21 this.Harvest,
22 this.Oblivion,
23 this.Harmony,
24 this.Trickery,
25 this.MoonShadow,
26 this.Strife
27 };
28 foreach (Religion religion in this.list)
29 {
30 this.dictAll.Add(religion.id, religion);
31 }
32 }
33
34 // Token: 0x060003FD RID: 1021 RVA: 0x0001B964 File Offset: 0x00019B64
35 public void OnCreateGame()
36 {
37 this.SetOwner();
38 foreach (Religion religion in this.list)
39 {
40 religion.Init();
41 }
42 }
43
44 // Token: 0x060003FE RID: 1022 RVA: 0x0001B9BC File Offset: 0x00019BBC
45 public void OnLoad()
46 {
47 this.SetOwner();
48 foreach (Religion religion in this.dictAll.Values)
49 {
50 religion.OnLoad();
51 }
52 }
53
54 // Token: 0x060003FF RID: 1023 RVA: 0x0001BA18 File Offset: 0x00019C18
55 public Religion Find(string id)
56 {
57 foreach (Religion religion in this.dictAll.Values)
58 {
59 if (religion.id == id)
60 {
61 return religion;
62 }
63 }
64 return null;
65 }
66
67 // Token: 0x06000400 RID: 1024 RVA: 0x0001BA80 File Offset: 0x00019C80
68 public Religion GetRandomReligion(bool onlyJoinable = true, bool includeMinor = false)
69 {
70 return (from a in this.list
71 where (!onlyJoinable || a.CanJoin) && (includeMinor || !a.IsMinorGod)
72 select a).RandomItem<Religion>();
73 }
74
75 // Token: 0x040005BC RID: 1468
76 public Dictionary<string, Religion> dictAll = new Dictionary<string, Religion>();
77
78 // Token: 0x040005BD RID: 1469
79 public List<Religion> list = new List<Religion>();
80
81 // Token: 0x040005BE RID: 1470
82 [JsonProperty]
83 public ReligionEyth Eyth = new ReligionEyth();
84
85 // Token: 0x040005BF RID: 1471
86 [JsonProperty]
87 public ReligionWind Wind = new ReligionWind();
88
89 // Token: 0x040005C0 RID: 1472
90 [JsonProperty]
91 public ReligionEarth Earth = new ReligionEarth();
92
93 // Token: 0x040005C1 RID: 1473
94 [JsonProperty]
95 public ReligionHealing Healing = new ReligionHealing();
96
97 // Token: 0x040005C2 RID: 1474
98 [JsonProperty]
99 public ReligionLuck Luck = new ReligionLuck();
100
101 // Token: 0x040005C3 RID: 1475
102 [JsonProperty]
103 public ReligionMachine Machine = new ReligionMachine();
104
105 // Token: 0x040005C4 RID: 1476
106 [JsonProperty]
108
109 // Token: 0x040005C5 RID: 1477
110 [JsonProperty]
111 public ReligionHarvest Harvest = new ReligionHarvest();
112
113 // Token: 0x040005C6 RID: 1478
114 [JsonProperty]
115 public ReligionOblivion Oblivion = new ReligionOblivion();
116
117 // Token: 0x040005C7 RID: 1479
118 [JsonProperty]
119 public ReligionHarmony Harmony = new ReligionHarmony();
120
121 // Token: 0x040005C8 RID: 1480
122 [JsonProperty]
123 public ReligionTrickery Trickery = new ReligionTrickery();
124
125 // Token: 0x040005C9 RID: 1481
126 [JsonProperty]
127 public ReligionMoonShadow MoonShadow = new ReligionMoonShadow();
128
129 // Token: 0x040005CA RID: 1482
130 [JsonProperty]
131 public ReligionStrife Strife = new ReligionStrife();
132}