1
Fork 0

Initialize on kDataLoaded even when KID is not installed

ae-1.6.629
Eddoursul 2 years ago
parent 9fe55a34b7
commit be249e6ab9
  1. BIN
      SKSE/Plugins/ArtifactTracker.dll
  2. 10
      Source/ArtifactTrackerDLL/src/Main.cpp

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…
Cancel
Save