Rooms are now styled randomly based on assets/styles.json which will evolve into specifications for themes of levels and rooms in them plus other configs.
This commit is contained in:
parent
e45de2a2cf
commit
d2a5dfa713
7 changed files with 56 additions and 2 deletions
|
@ -15,6 +15,10 @@ Config::Config(const std::string src_path) : $src_path(src_path) {
|
|||
$config = json::parse(infile);
|
||||
}
|
||||
|
||||
nlohmann::json &Config::operator[](size_t key) {
|
||||
return $config[key];
|
||||
}
|
||||
|
||||
json &Config::operator[](const std::string &key) {
|
||||
dbc::check($config.contains(key), fmt::format("ERROR in config, key {} doesn't exist.", key));
|
||||
return $config[key];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue