1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Update JsonDetail.cpp

Added video file existence check
This commit is contained in:
Macron1Robot
2014-04-29 21:53:50 +04:00
parent fd1640f931
commit 9494c6d335

View File

@@ -949,6 +949,12 @@ namespace
{
return testAnimation(node.String(), node.meta);
}
std::string videoFile(const JsonNode & node)
{
TEST_FILE(node.meta, "Video/", node.String(), EResType::VIDEO);
return "Video file \"" + node.String() + "\" was not found";
}
std::string imageFile(const JsonNode & node)
{
@@ -1040,6 +1046,7 @@ namespace
ret["soundFile"] = Formats::soundFile;
ret["defFile"] = Formats::defFile;
ret["animationFile"] = Formats::animationFile;
ret["videoFile"] = Formats::videoFile;
ret["imageFile"] = Formats::imageFile;
return ret;