MCPcopy Create free account
hub / github.com/Norbyte/bg3se / GetConfigString

Function GetConfigString

BG3Extender/Extender/Shared/ExtensionState.cpp:167–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165 }
166
167 std::optional<STDString> GetConfigString(Value const& node, std::string_view const& key)
168 {
169 auto v = node.FindMember(key.data());
170 if (v != node.MemberEnd()) {
171 if (v->value.IsString()) {
172 return v->value.GetString();
173 } else {
174 OsiError("Config option '" << key << "' should be a string.");
175 }
176 }
177
178 return {};
179 }
180
181 bool LoadModConfig(Module const & mod, Document& json, ExtensionModConfig & config)
182 {

Callers 1

LoadModConfigFunction · 0.85

Calls 2

GetStringMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected