mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Minor fixes, no more missing objects & templates
This commit is contained in:
@@ -660,6 +660,9 @@ void CArtHandler::afterLoadFinalization()
|
||||
// Necessary for objects added via mods that don't have any templates in H3
|
||||
VLC->objtypeh->getHandlerFor(Obj::ARTIFACT, art->id)->addTemplate(templ);
|
||||
}
|
||||
// object does not have any templates - this is not usable object (e.g. pseudo-art like lock)
|
||||
if (VLC->objtypeh->getHandlerFor(Obj::ARTIFACT, art->id)->getTemplates().empty())
|
||||
VLC->objtypeh->eraseObject(Obj::ARTIFACT, art->id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user