Localizable notifications via Papyrus scripts
This commit is contained in:
parent
be249e6ab9
commit
a20629cde9
Binary file not shown.
BIN
Scripts/ETR_NewArtifactNotification.pex
Normal file
BIN
Scripts/ETR_NewArtifactNotification.pex
Normal file
Binary file not shown.
BIN
Scripts/ETR_NewArtifactsCombinedNotification.pex
Normal file
BIN
Scripts/ETR_NewArtifactsCombinedNotification.pex
Normal file
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;
|
||||
|
5
Source/Scripts/ETR_NewArtifactNotification.psc
Normal file
5
Source/Scripts/ETR_NewArtifactNotification.psc
Normal file
@ -0,0 +1,5 @@
|
||||
Scriptname ETR_NewArtifactNotification Hidden
|
||||
|
||||
function Show(Form a_form) global
|
||||
Debug.Notification("New artifact acquired: " + a_form.GetName())
|
||||
endfunction
|
9
Source/Scripts/ETR_NewArtifactsCombinedNotification.psc
Normal file
9
Source/Scripts/ETR_NewArtifactsCombinedNotification.psc
Normal file
@ -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…
Reference in New Issue
Block a user