World builder now loads the tile map json and usese the keys to figure out how to randomize the floor configurations.

This commit is contained in:
Zed A. Shaw 2024-12-28 13:25:23 -05:00
parent 6b4bc6cc11
commit 03c5546cdf
12 changed files with 45 additions and 39 deletions

View file

@ -17,6 +17,17 @@ std::wstring Config::wstring(const std::string key) {
return $converter.from_bytes(str_val);
}
std::vector<std::string> Config::keys() {
// BUG: I mean, c'mon seriously this is how?
std::vector<std::string> keys;
for(const auto& el : $config.items()) {
keys.push_back(el.key());
}
return keys;
}
std::wstring Config::wstring(const std::string main_key, const std::string sub_key) {
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> $converter;
const std::string& str_val = $config[main_key][sub_key];