Initialize on kDataLoaded even when KID is not installed
This commit is contained in:
parent
9fe55a34b7
commit
be249e6ab9
Binary file not shown.
@ -29,11 +29,13 @@ namespace {
|
||||
{
|
||||
GetMessagingInterface()->RegisterListener([](MessagingInterface::Message* message) {
|
||||
if (message->type == MessagingInterface::kPostLoad) {
|
||||
SKSE::GetModCallbackEventSource()->AddEventSink(EventListener::GetSingleton());
|
||||
} else if (message->type == MessagingInterface::kNewGame || message->type == MessagingInterface::kPreLoadGame) {
|
||||
ArtifactTracker::Init(); // if KID is not installed
|
||||
SKSE::GetModCallbackEventSource()->AddEventSink(EventListener::GetSingleton()); // runs, if KID is installed
|
||||
} else if (message->type == MessagingInterface::kDataLoaded) {
|
||||
if (const auto pluginInfo = ArtifactTracker::g_loadInterface->GetPluginInfo("po3_KeywordItemDistributor"); !pluginInfo) {
|
||||
ArtifactTracker::Init(); // if KID is not installed
|
||||
}
|
||||
} else if (message->type == MessagingInterface::kPostLoadGame) {
|
||||
ArtifactTracker::OnGameLoad(); // refresh g_persistentMap from savegame
|
||||
ArtifactTracker::OnGameLoad(); // save-specific updates
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user