|
| static readonly Dictionary< string, HashSet< Action< object > > > | _eventHandlers = new Dictionary<string, HashSet<Action<object>>>() |
| |
Definition at line 7 of file BaseModManager.cs.
◆ HasEventSubscriber()
| static bool BaseModManager.HasEventSubscriber |
( |
string |
eventId | ) |
|
|
inlinestatic |
Definition at line 133 of file BaseModManager.cs.
134 {
136 if (num.HasValue)
137 {
138 return num.GetValueOrDefault() > 0;
139 }
140 return false;
141 }
static readonly Dictionary< string, HashSet< Action< object > > > _eventHandlers
References _eventHandlers.
◆ Init()
| virtual void BaseModManager.Init |
( |
string |
path, |
|
|
string |
defaultPackage = "_Elona" |
|
) |
| |
|
inlinevirtual |
◆ InitLang()
| void BaseModManager.InitLang |
( |
| ) |
|
|
inline |
Definition at line 55 of file BaseModManager.cs.
56 {
59 {
61 {
62 continue;
63 }
64 new DirectoryInfo(value.
dir);
65 FileInfo[] files =
new DirectoryInfo(value.
dir +
"Data").GetFiles();
66 foreach (FileInfo fileInfo in files)
67 {
68 if (fileInfo.Name == "Alias.xlsx")
69 {
70 Lang.alias =
new ExcelData(fileInfo.FullName);
71 }
72 if (fileInfo.Name == "Name.xlsx")
73 {
74 Lang.names =
new ExcelData(fileInfo.FullName);
75 }
76 if (fileInfo.Name == "chara_talk.xlsx")
77 {
79 }
80 if (fileInfo.Name == "chara_tone.xlsx")
81 {
83 }
84 }
85 }
86 }
static TalkDataList listTalk
static ToneDataList tones
static Dictionary< string, LangSetting > langs
References Debug, LangSetting.dir, LangSetting.id, ExcelDataList.items, Lang.langCode, MOD.langs, MOD.listTalk, and MOD.tones.
◆ ParseExtra()
| virtual void BaseModManager.ParseExtra |
( |
DirectoryInfo |
dir, |
|
|
BaseModPackage |
package |
|
) |
| |
|
inlinevirtual |
◆ PublishEvent()
| static void BaseModManager.PublishEvent |
( |
string |
eventId, |
|
|
object |
data = null |
|
) |
| |
|
inlinestatic |
Definition at line 114 of file BaseModManager.cs.
115 {
117 {
118 return;
119 }
120 foreach (Action<object>
item in value.ToList())
121 {
122 try
123 {
125 }
126 catch (Exception arg)
127 {
128 Debug.LogError(
$"#event '{eventId}' throws error in one of the handlers\n{arg}");
129 }
130 }
131 }
References $, _eventHandlers, Debug, and item.
Referenced by Card._OnDeserialized(), Feat.Apply(), Card.Create(), SourceManager.Init(), Scene.Init(), Game.Load(), ModUtil.OnModsActivated(), Game.Save(), Core.SetLang(), and Game.StartNewGame().
◆ SubscribeEvent()
| static void BaseModManager.SubscribeEvent |
( |
string |
eventId, |
|
|
Action< object > |
handler |
|
) |
| |
|
inlinestatic |
◆ UnsubscribeEvent()
| static void BaseModManager.UnsubscribeEvent |
( |
string |
eventId, |
|
|
Action< object > |
handler |
|
) |
| |
|
inlinestatic |
◆ _eventHandlers
| readonly Dictionary<string, HashSet<Action<object> > > BaseModManager._eventHandlers = new Dictionary<string, HashSet<Action<object>>>() |
|
staticprivate |
◆ dirWorkshop
| DirectoryInfo BaseModManager.dirWorkshop |
◆ Instance
◆ isInitialized
| bool BaseModManager.isInitialized |
|
static |
◆ listChainLoad
| List<string> BaseModManager.listChainLoad = new List<string>() |
|
static |
◆ packages
◆ priorityIndex
| int BaseModManager.priorityIndex |
◆ rootDefaultPacakge
| string BaseModManager.rootDefaultPacakge |
|
static |
◆ rootMod
| string BaseModManager.rootMod |
|
static |
The documentation for this class was generated from the following file: