summaryrefslogtreecommitdiff
path: root/src/config/ConfigValue.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2026-04-26 15:16:36 +0100
committerGitHub <noreply@github.com>2026-04-26 15:16:36 +0100
commit5ba33f846129f3e6c0505b19f94634b24505e828 (patch)
treeaaacabe678006040c342935481a86607c66607fd /src/config/ConfigValue.cpp
parent329b2b356dd92ac07f4e2aa69cbce82ee9ba9d19 (diff)
config/lua: init lua config manager, use lua if available (#13817)
Adds a new lua config manager, which will automatically be used if there is a lua config present.
Diffstat (limited to 'src/config/ConfigValue.cpp')
-rw-r--r--src/config/ConfigValue.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/config/ConfigValue.cpp b/src/config/ConfigValue.cpp
index 169bf29c..1c658b05 100644
--- a/src/config/ConfigValue.cpp
+++ b/src/config/ConfigValue.cpp
@@ -1,9 +1,18 @@
#include "ConfigValue.hpp"
#include "ConfigManager.hpp"
-void local__configValuePopulate(void* const** p, const std::string& val) {
+void local__configValuePopulate(void* const** p, void* const** hlangp, std::type_index* ti, const std::string& val) {
const auto BIGP = Config::mgr()->getConfigValue(val);
- *p = BIGP.dataptr;
+
+ RASSERT(BIGP.dataptr, "Something went really fucking wrong with config values");
+
+ *ti = std::type_index(*BIGP.type);
+
+ if (std::type_index(*BIGP.type) == typeid(void*) || std::type_index(*BIGP.type) == typeid(const char*)) {
+ // this is a special, cursed case. ew.
+ *hlangp = BIGP.dataptr;
+ } else
+ *p = BIGP.dataptr;
}
std::type_index local__configValueTypeIdx(const std::string& val) {