mirror of
https://github.com/vcmi/vcmi.git
synced 2026-06-19 22:57:37 +02:00
introduce getModScope into AObjectTypeHandler
This commit is contained in:
@@ -29,6 +29,11 @@ std::string AObjectTypeHandler::getJsonKey() const
|
|||||||
return modScope + ':' + subTypeName;
|
return modScope + ':' + subTypeName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string AObjectTypeHandler::getModScope() const
|
||||||
|
{
|
||||||
|
return modScope;
|
||||||
|
}
|
||||||
|
|
||||||
si32 AObjectTypeHandler::getIndex() const
|
si32 AObjectTypeHandler::getIndex() const
|
||||||
{
|
{
|
||||||
return type;
|
return type;
|
||||||
|
|||||||
@@ -74,6 +74,8 @@ public:
|
|||||||
/// returns full form of identifier of this object in form of modName:objectName
|
/// returns full form of identifier of this object in form of modName:objectName
|
||||||
std::string getJsonKey() const;
|
std::string getJsonKey() const;
|
||||||
|
|
||||||
|
std::string getModScope() const;
|
||||||
|
|
||||||
/// Returns object-specific name, if set
|
/// Returns object-specific name, if set
|
||||||
SObjectSounds getSounds() const;
|
SObjectSounds getSounds() const;
|
||||||
|
|
||||||
|
|||||||
@@ -624,7 +624,7 @@ ModCompatibilityInfo MapController::modAssessmentMap(const CMap & map)
|
|||||||
for(auto obj : map.objects)
|
for(auto obj : map.objects)
|
||||||
{
|
{
|
||||||
auto handler = obj->getObjectHandler();
|
auto handler = obj->getObjectHandler();
|
||||||
auto modScope = QString::fromStdString(handler->getJsonKey()).split(":").at(0).toStdString();
|
auto modScope = handler->getModScope();
|
||||||
if(modScope != "core")
|
if(modScope != "core")
|
||||||
result[modScope] = VLC->modh->getModInfo(modScope).getVerificationInfo();
|
result[modScope] = VLC->modh->getModInfo(modScope).getVerificationInfo();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user