Refactores item factories

This commit is contained in:
Johannes Wendel
2020-01-06 14:38:21 +01:00
parent fda8197a26
commit 87c2a8a5fc
22 changed files with 50 additions and 46 deletions

View File

@@ -25,10 +25,10 @@ SoundFactory::SoundFactory(nlohmann::json &object, std::shared_ptr<SoundBoardPin
this->set_address_pins();
}
std::map<std::string, std::shared_ptr<items::Item>> SoundFactory::getItemMap()
std::map<std::string, std::shared_ptr<items::Sound>> SoundFactory::getItemMap()
{
auto sounds = this->object.at(config_path::sound_path);
std::map<std::string, std::shared_ptr<items::Item>> sound_map;
std::map<std::string, std::shared_ptr<items::Sound>> sound_map;
for (auto sound : sounds)
{
auto name = sound.at(config_path::item_name).get<std::string>();