Quick refactor of the config system to make it easier to refactor config.cpp/hpp later.

This commit is contained in:
Zed A. Shaw 2025-09-16 11:59:30 -04:00
parent 47f659ae8e
commit e523aa8b02
29 changed files with 138 additions and 140 deletions

View file

@ -16,7 +16,7 @@ TEST_CASE("confirm component loading works", "[components]") {
DinkyECS::World world;
for(auto test_data : test_list) {
Config config(test_data);
auto config = settings::get(test_data);
auto data_list = config.json();
for(auto& [key, data] : data_list.items()) {
@ -31,7 +31,7 @@ TEST_CASE("confirm component loading works", "[components]") {
}
TEST_CASE("make sure json_mods works", "[components]") {
Config config("assets/bosses.json");
auto config = settings::get("bosses");
// this confirms that loading something with an optional
// field works with the json conversions in json_mods.hpp
for(auto& comp_data : config["RAT_KING"]["components"]) {