mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
introduce modScope into ObstacleInfo
This commit is contained in:
@@ -28,12 +28,12 @@ int32_t ObstacleInfo::getIconIndex() const
|
||||
|
||||
std::string ObstacleInfo::getJsonKey() const
|
||||
{
|
||||
return identifier;
|
||||
return modScope + ':' + identifier;
|
||||
}
|
||||
|
||||
std::string ObstacleInfo::getModScope() const
|
||||
{
|
||||
return "core";
|
||||
return modScope;
|
||||
}
|
||||
|
||||
std::string ObstacleInfo::getNameTranslated() const
|
||||
@@ -96,6 +96,7 @@ std::shared_ptr<ObstacleInfo> ObstacleHandler::loadFromJson(const std::string &
|
||||
|
||||
auto info = std::make_shared<ObstacleInfo>(Obstacle(index), identifier);
|
||||
|
||||
info->modScope = scope;
|
||||
info->animation = AnimationPath::fromJson(json["animation"]);
|
||||
info->width = json["width"].Integer();
|
||||
info->height = json["height"].Integer();
|
||||
|
||||
Reference in New Issue
Block a user