Refactores item factories
This commit is contained in:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user