Improved Take All detection
This commit is contained in:
parent
1797222063
commit
4a1218782f
Binary file not shown.
@ -138,15 +138,16 @@ RE::BSEventNotifyControl EventListener::ProcessEvent(
|
|||||||
RE::InputEvent* const* a_event,
|
RE::InputEvent* const* a_event,
|
||||||
RE::BSTEventSource<RE::InputEvent*>* a_eventSource)
|
RE::BSTEventSource<RE::InputEvent*>* a_eventSource)
|
||||||
{
|
{
|
||||||
if (RE::UI::GetSingleton()->GameIsPaused()) {
|
auto inputEvent = a_event ? *a_event : nullptr;
|
||||||
auto inputEvent = a_event ? *a_event : nullptr;
|
auto buttonEvent = inputEvent ? inputEvent->AsButtonEvent() : nullptr;
|
||||||
auto buttonEvent = inputEvent ? inputEvent->AsButtonEvent() : nullptr;
|
|
||||||
|
|
||||||
if (!buttonEvent) {
|
if (!buttonEvent || !buttonEvent->IsPressed()) {
|
||||||
return RE::BSEventNotifyControl::kContinue;
|
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_bTakeAll = true;
|
||||||
ArtifactTracker::g_bTakeAllCount = 0;
|
ArtifactTracker::g_bTakeAllCount = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user