|
|
|
@ -98,9 +98,19 @@ auto EventListener::ProcessEvent( |
|
|
|
|
} else { |
|
|
|
|
std::thread([furn]() { |
|
|
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(300)); |
|
|
|
|
if (RE::PlayerCharacter::GetSingleton()->GetSitSleepState() == RE::SIT_SLEEP_STATE::kWaitingForSitAnim) { |
|
|
|
|
SKSE::GetTaskInterface()->AddTask([furn]() { |
|
|
|
|
FetchSupplies(furn); |
|
|
|
|
if (RE::PlayerCharacter::GetSingleton()->GetSitSleepState() != RE::SIT_SLEEP_STATE::kWaitingForSitAnim) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
SKSE::GetTaskInterface()->AddTask([furn]() { |
|
|
|
|
FetchSupplies(furn); |
|
|
|
|
}); |
|
|
|
|
while (RE::PlayerCharacter::GetSingleton()->GetSitSleepState() == RE::SIT_SLEEP_STATE::kWaitingForSitAnim) { |
|
|
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(100)); |
|
|
|
|
} |
|
|
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(300)); |
|
|
|
|
if (!RE::UI::GetSingleton()->IsMenuOpen(RE::CraftingMenu::MENU_NAME)) { |
|
|
|
|
SKSE::GetTaskInterface()->AddTask([]() { |
|
|
|
|
ReturnSupplies(); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}).detach(); |
|
|
|
|