1
Fork 0

Localizable notifications via Papyrus scripts

ae-1.6.629
Eddoursul 2 years ago
parent be249e6ab9
commit a20629cde9
  1. BIN
      SKSE/Plugins/ArtifactTracker.dll
  2. BIN
      Scripts/ETR_NewArtifactNotification.pex
  3. BIN
      Scripts/ETR_NewArtifactsCombinedNotification.pex
  4. 4
      Source/ArtifactTrackerDLL/src/ArtifactTracker.cpp
  5. 6
      Source/ArtifactTrackerDLL/src/EventListener.cpp
  6. 5
      Source/Scripts/ETR_NewArtifactNotification.psc
  7. 9
      Source/Scripts/ETR_NewArtifactsCombinedNotification.psc

Binary file not shown.

@ -531,7 +531,9 @@ namespace ArtifactTracker
if (g_bTakeAll) {
g_bTakeAllCount++;
} else {
RE::DebugNotification(fmt::format("New artifact acquired: {}", form->GetName()).c_str());
//RE::DebugNotification(fmt::format("New artifact acquired: {}", form->GetName()).c_str());
RE::BSTSmartPointer<RE::BSScript::IStackCallbackFunctor> stackCallback;
RE::BSScript::Internal::VirtualMachine::GetSingleton()->DispatchStaticCall("ETR_NewArtifactNotification", "Show", RE::MakeFunctionArguments<RE::TESForm*>(std::move(form)), stackCallback);
}
}
}

@ -88,8 +88,10 @@ auto EventListener::ProcessEvent(
RE::BSInputDeviceManager::GetSingleton()->AddEventSink(EventListener::GetSingleton());
} else {
RE::BSInputDeviceManager::GetSingleton()->RemoveEventSink(EventListener::GetSingleton());
if (ArtifactTracker::g_bTakeAll && ArtifactTracker::g_bTakeAllCount > 0) {
RE::DebugNotification(fmt::format("{} new artifact(s) acquired", ArtifactTracker::g_bTakeAllCount).c_str());
if (ArtifactTracker::g_bTakeAll && ArtifactTracker::g_bNotifyNewArtifact && ArtifactTracker::g_bTakeAllCount > 0) {
//RE::DebugNotification(fmt::format("{} new artifact(s) acquired", ArtifactTracker::g_bTakeAllCount).c_str());
RE::BSTSmartPointer<RE::BSScript::IStackCallbackFunctor> stackCallback;
RE::BSScript::Internal::VirtualMachine::GetSingleton()->DispatchStaticCall("ETR_NewArtifactsCombinedNotification", "Show", RE::MakeFunctionArguments<std::uint32_t>(std::move(ArtifactTracker::g_bTakeAllCount)), stackCallback);
}
ArtifactTracker::g_bTakeAll = false;
ArtifactTracker::g_bTakeAllCount = 0;

@ -0,0 +1,5 @@
Scriptname ETR_NewArtifactNotification Hidden
function Show(Form a_form) global
Debug.Notification("New artifact acquired: " + a_form.GetName())
endfunction

@ -0,0 +1,9 @@
Scriptname ETR_NewArtifactsCombinedNotification Hidden
function Show(int iCount) global
if iCount == 1
Debug.Notification(iCount + " new artifact acquired")
else
Debug.Notification(iCount + " new artifacts acquired")
endif
endfunction
Loading…
Cancel
Save