Configurable notifications
This commit is contained in:
parent
3ee609540b
commit
804504e7a2
Binary file not shown.
@ -1,2 +1,4 @@
|
||||
LoadSuppliesEverywhere = false
|
||||
StoreInventorySupplies = true
|
||||
ShowFetchingNotification = true
|
||||
ShowReturningNotification = false
|
||||
|
@ -58,6 +58,8 @@ inline const std::map<std::string, bool> GetSettings(bool bInit = false)
|
||||
if (bInit) {
|
||||
settings.insert({ "LoadSuppliesEverywhere", false });
|
||||
settings.insert({ "StoreInventorySupplies", true });
|
||||
settings.insert({ "ShowFetchingNotification", true });
|
||||
settings.insert({ "ShowReturningNotification", false });
|
||||
LoadINI(&settings, "Data/SKSE/Plugins/EnderalSEEasyCrafting.ini");
|
||||
}
|
||||
return settings;
|
||||
@ -98,8 +100,10 @@ inline void ReturnSupplies()
|
||||
}
|
||||
|
||||
bSuppliesFetched = false;
|
||||
|
||||
//RE::DebugNotification("Returning supplies...");
|
||||
|
||||
if (GetSettings().at("ShowReturningNotification")) {
|
||||
RE::DebugNotification("Returning supplies...");
|
||||
}
|
||||
|
||||
const auto chest = RE::TESForm::LookupByID(0x5C132)->As<RE::TESObjectREFR>();
|
||||
const auto playerRef = RE::PlayerCharacter::GetSingleton();
|
||||
@ -202,24 +206,34 @@ inline void FetchSupplies(RE::TESFurniture* a_furn)
|
||||
std::thread([a_furn]() {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
SKSE::GetTaskInterface()->AddTask([a_furn]() {
|
||||
bool bNotify = GetSettings().at("ShowFetchingNotification");
|
||||
|
||||
switch (a_furn->workBenchData.benchType.underlying()) {
|
||||
case (int)RE::TESFurniture::WorkBenchData::BenchType::kAlchemy:
|
||||
case (int)RE::TESFurniture::WorkBenchData::BenchType::kAlchemyExperiment:
|
||||
RE::DebugNotification("Fetching ingredients...");
|
||||
if (bNotify) {
|
||||
RE::DebugNotification("Fetching ingredients...");
|
||||
}
|
||||
FetchSuppliesByType(RE::FormType::Ingredient);
|
||||
break;
|
||||
case (int)RE::TESFurniture::WorkBenchData::BenchType::kEnchanting:
|
||||
case (int)RE::TESFurniture::WorkBenchData::BenchType::kEnchantingExperiment:
|
||||
RE::DebugNotification("Fetching soul gems...");
|
||||
if (bNotify) {
|
||||
RE::DebugNotification("Fetching soul gems...");
|
||||
}
|
||||
FetchSuppliesByType(RE::FormType::SoulGem);
|
||||
break;
|
||||
default:
|
||||
if (a_furn->As<RE::BGSKeywordForm>()->HasKeywordString("CraftingCookpot")) {
|
||||
RE::DebugNotification("Fetching cooking ingredients...");
|
||||
if (bNotify) {
|
||||
RE::DebugNotification("Fetching cooking ingredients...");
|
||||
}
|
||||
FetchSuppliesByType(RE::FormType::Ingredient);
|
||||
FetchSuppliesByType(RE::FormType::AlchemyItem);
|
||||
} else {
|
||||
RE::DebugNotification("Fetching crafting supplies...");
|
||||
if (bNotify) {
|
||||
RE::DebugNotification("Fetching crafting supplies...");
|
||||
}
|
||||
FetchSuppliesByType(RE::FormType::Misc);
|
||||
FetchSuppliesByType(RE::FormType::Ingredient);
|
||||
FetchSuppliesByType(RE::FormType::SoulGem);
|
||||
|
Loading…
Reference in New Issue
Block a user