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:
parent
6b4bc6cc11
commit
03c5546cdf
12 changed files with 45 additions and 39 deletions
11
config.cpp
11
config.cpp
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue