1
Fork 0

Improved Take All detection

ae-1.6.629
Eddoursul 2 years ago
parent 1797222063
commit 4a1218782f
  1. BIN
      SKSE/Plugins/ArtifactTracker.dll
  2. 15
      Source/ArtifactTrackerDLL/src/EventListener.cpp

Binary file not shown.

@ -138,15 +138,16 @@ RE::BSEventNotifyControl EventListener::ProcessEvent(
RE::InputEvent* const* a_event,
RE::BSTEventSource<RE::InputEvent*>* a_eventSource)
{
if (RE::UI::GetSingleton()->GameIsPaused()) {
auto inputEvent = a_event ? *a_event : nullptr;
auto buttonEvent = inputEvent ? inputEvent->AsButtonEvent() : nullptr;
auto inputEvent = a_event ? *a_event : nullptr;
auto buttonEvent = inputEvent ? inputEvent->AsButtonEvent() : nullptr;
if (!buttonEvent) {
return RE::BSEventNotifyControl::kContinue;
}
if (!buttonEvent || !buttonEvent->IsPressed()) {
return RE::BSEventNotifyControl::kContinue;
}
if (RE::UI::GetSingleton()->IsMenuOpen("ContainerMenu") && buttonEvent->QUserEvent() == RE::UserEvents::GetSingleton()->xButton) {
if (RE::UI::GetSingleton()->GameIsPaused() && RE::UI::GetSingleton()->IsItemMenuOpen() && RE::UI::GetSingleton()->IsMenuOpen("ContainerMenu")) {
const auto takeAllKey = RE::ControlMap::GetSingleton()->GetMappedKey(RE::UserEvents::GetSingleton()->readyWeapon, buttonEvent->GetDevice(), RE::UserEvents::INPUT_CONTEXT_ID::kGameplay);
if (takeAllKey == buttonEvent->GetIDCode()) {
ArtifactTracker::g_bTakeAll = true;
ArtifactTracker::g_bTakeAllCount = 0;
}

Loading…
Cancel
Save