fix: hardcore mode fixes (#1882)

fixes hardcore modes uscore drops
adds config option for excluded item drops
This commit is contained in:
David Markowitz
2025-09-21 18:36:32 -07:00
committed by GitHub
parent 4a577f233d
commit 4a5dd68e87
6 changed files with 47 additions and 24 deletions

View File

@@ -47,6 +47,7 @@ void dConfig::LoadConfig() {
void dConfig::ReloadConfig() {
this->m_ConfigValues.clear();
LoadConfig();
for (const auto& handler : m_ConfigHandlers) handler();
LogSettings();
}
@@ -59,6 +60,10 @@ const std::string& dConfig::GetValue(std::string key) {
return this->m_ConfigValues[key];
}
void dConfig::AddConfigHandler(std::function<void()> handler) {
m_ConfigHandlers.push_back(handler);
}
void dConfig::LogSettings() const {
LOG("Configuration settings:");
for (const auto& [key, value] : m_ConfigValues) {