1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

introduce toResourceType

This commit is contained in:
Laserlicht
2025-09-15 00:08:18 +02:00
parent acd067e587
commit d808bd6412
34 changed files with 160 additions and 102 deletions

View File

@@ -51,7 +51,7 @@ GameResID CGResource::resourceID() const
std::string CGResource::getHoverText(PlayerColor player) const
{
return MetaString::createFromTextID(LIBRARY->resourceTypeHandler->getById(resourceID())->getNameTextID()).toString();
return MetaString::createFromTextID(resourceID().toResource()->getNameTextID()).toString();
}
void CGResource::pickRandomObject(IGameRandomizer & gameRandomizer)