Do not show the encumbrance notification
This commit is contained in:
parent
8a876457ed
commit
3ee609540b
Binary file not shown.
@ -27,8 +27,8 @@ namespace {
|
|||||||
{
|
{
|
||||||
GetMessagingInterface()->RegisterListener([](MessagingInterface::Message* message) {
|
GetMessagingInterface()->RegisterListener([](MessagingInterface::Message* message) {
|
||||||
if (message->type == MessagingInterface::kPostPostLoad) {
|
if (message->type == MessagingInterface::kPostPostLoad) {
|
||||||
if (!std::filesystem::exists("Data\\Enderal - Forgotten Stories.esm")) {
|
if (!std::filesystem::exists("Data\\Enderal - Forgotten Stories.esm") || !std::filesystem::exists("Data\\SKSE\\Plugins\\EnderalSE.dll")) {
|
||||||
MessageBoxW(NULL, L"Enderal SE Easy Crafting requires Enderal - Forgotten Stories.esm.", L"Enderal SE Easy Crafting", MB_OK | MB_ICONERROR);
|
MessageBoxW(NULL, L"Easy Crafting requires Enderal SE 2.0.12 or newer.", L"Enderal SE Easy Crafting", MB_OK | MB_ICONERROR);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
GetSettings(true);
|
GetSettings(true);
|
||||||
|
|||||||
@ -148,6 +148,17 @@ inline void ReturnSupplies()
|
|||||||
playerRef->RemoveItem(item, count, iReason, nullptr, chest, 0, 0);
|
playerRef->RemoveItem(item, count, iReason, nullptr, chest, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::thread([]() {
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||||
|
SKSE::GetTaskInterface()->AddTask([]() {
|
||||||
|
const auto spell = RE::TESForm::LookupByID(0x824AF);
|
||||||
|
if (spell) {
|
||||||
|
RE::PlayerCharacter::GetSingleton()->RemoveSpell(spell->As<RE::SpellItem>());
|
||||||
|
spell->As<RE::SpellItem>()->effects[0]->effectItem.magnitude = 1;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}).detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void FetchSupplies(RE::TESFurniture* a_furn)
|
inline void FetchSupplies(RE::TESFurniture* a_furn)
|
||||||
@ -166,8 +177,7 @@ inline void FetchSupplies(RE::TESFurniture* a_furn)
|
|||||||
bAllowFetch = true;
|
bAllowFetch = true;
|
||||||
} else {
|
} else {
|
||||||
RE::TES::GetSingleton()->ForEachReferenceInRange(playerRef, 4000, [&chestAct, &bAllowFetch](RE::TESObjectREFR& b_ref) {
|
RE::TES::GetSingleton()->ForEachReferenceInRange(playerRef, 4000, [&chestAct, &bAllowFetch](RE::TESObjectREFR& b_ref) {
|
||||||
const auto base = b_ref.GetBaseObject();
|
if (chestAct == b_ref.GetBaseObject()) {
|
||||||
if (chestAct == base) {
|
|
||||||
bAllowFetch = true;
|
bAllowFetch = true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -181,6 +191,17 @@ inline void FetchSupplies(RE::TESFurniture* a_furn)
|
|||||||
|
|
||||||
bSuppliesFetched = true;
|
bSuppliesFetched = true;
|
||||||
|
|
||||||
|
const auto spellForm = RE::TESForm::LookupByID(0x824AF);
|
||||||
|
if (spellForm) {
|
||||||
|
const auto spell = spellForm->As<RE::SpellItem>();
|
||||||
|
playerRef->RemoveSpell(spell);
|
||||||
|
spell->effects[0]->effectItem.magnitude = 30000;
|
||||||
|
playerRef->AddSpell(spell);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::thread([a_furn]() {
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||||
|
SKSE::GetTaskInterface()->AddTask([a_furn]() {
|
||||||
switch (a_furn->workBenchData.benchType.underlying()) {
|
switch (a_furn->workBenchData.benchType.underlying()) {
|
||||||
case (int)RE::TESFurniture::WorkBenchData::BenchType::kAlchemy:
|
case (int)RE::TESFurniture::WorkBenchData::BenchType::kAlchemy:
|
||||||
case (int)RE::TESFurniture::WorkBenchData::BenchType::kAlchemyExperiment:
|
case (int)RE::TESFurniture::WorkBenchData::BenchType::kAlchemyExperiment:
|
||||||
@ -206,6 +227,8 @@ inline void FetchSupplies(RE::TESFurniture* a_furn)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}).detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool GetSuppliesFetched()
|
inline bool GetSuppliesFetched()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user