Files
mod-ale/src/LuaEngine/ALEConfig.cpp
Foe 81d3f02679 chore: rename Eluna to ALE (#318)
Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
2025-10-23 12:53:30 +02:00

31 lines
1.2 KiB
C++

#include "ALEConfig.h"
ALEConfig& ALEConfig::GetInstance()
{
static ALEConfig instance;
return instance;
}
ALEConfig::ALEConfig() : ConfigValueCache<ALEConfigValues>(ALEConfigValues::CONFIG_VALUE_COUNT)
{
}
void ALEConfig::Initialize(bool reload)
{
ConfigValueCache<ALEConfigValues>::Initialize(reload);
}
void ALEConfig::BuildConfigCache()
{
SetConfigValue<bool>(ALEConfigValues::ENABLED, "ALE.Enabled", "false");
SetConfigValue<bool>(ALEConfigValues::TRACEBACK_ENABLED, "ALE.TraceBack", "false");
SetConfigValue<bool>(ALEConfigValues::AUTORELOAD_ENABLED, "ALE.AutoReload", "false");
SetConfigValue<bool>(ALEConfigValues::BYTECODE_CACHE_ENABLED, "ALE.BytecodeCache", "false");
SetConfigValue<std::string>(ALEConfigValues::SCRIPT_PATH, "ALE.ScriptPath", "lua_scripts");
SetConfigValue<std::string>(ALEConfigValues::REQUIRE_PATH, "ALE.RequirePaths", "");
SetConfigValue<std::string>(ALEConfigValues::REQUIRE_CPATH, "ALE.RequireCPaths", "");
SetConfigValue<uint32>(ALEConfigValues::AUTORELOAD_INTERVAL, "ALE.AutoReloadInterval", 1);
}