mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-01 23:12:49 +02:00
Use ResourcePath for audio files
This commit is contained in:
@@ -83,13 +83,13 @@ void AObjectTypeHandler::init(const JsonNode & input)
|
||||
}
|
||||
|
||||
for(const JsonNode & node : input["sounds"]["ambient"].Vector())
|
||||
sounds.ambient.push_back(node.String());
|
||||
sounds.ambient.push_back(AudioPath::fromJson(node));
|
||||
|
||||
for(const JsonNode & node : input["sounds"]["visit"].Vector())
|
||||
sounds.visit.push_back(node.String());
|
||||
sounds.visit.push_back(AudioPath::fromJson(node));
|
||||
|
||||
for(const JsonNode & node : input["sounds"]["removal"].Vector())
|
||||
sounds.removal.push_back(node.String());
|
||||
sounds.removal.push_back(AudioPath::fromJson(node));
|
||||
|
||||
if(input["aiValue"].isNull())
|
||||
aiValue = std::nullopt;
|
||||
|
||||
@@ -9,13 +9,15 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../filesystem/ResourcePath.h"
|
||||
|
||||
VCMI_LIB_NAMESPACE_BEGIN
|
||||
|
||||
struct SObjectSounds
|
||||
{
|
||||
std::vector<std::string> ambient;
|
||||
std::vector<std::string> visit;
|
||||
std::vector<std::string> removal;
|
||||
std::vector<AudioPath> ambient;
|
||||
std::vector<AudioPath> visit;
|
||||
std::vector<AudioPath> removal;
|
||||
|
||||
template <typename Handler> void serialize(Handler &h, const int version)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user