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

resource translation

This commit is contained in:
Laserlicht
2025-09-14 16:17:55 +02:00
parent 75f965c93a
commit 40062d7755
10 changed files with 54 additions and 29 deletions

View File

@@ -21,6 +21,7 @@
#include "../gameState/CGameState.h"
#include "../serializer/JsonSerializeFormat.h"
#include "../CSoundBase.h"
#include "../entities/ResourceTypeHandler.h"
#include <vstd/RNG.h>
@@ -50,7 +51,7 @@ GameResID CGResource::resourceID() const
std::string CGResource::getHoverText(PlayerColor player) const
{
return LIBRARY->generaltexth->restypes[resourceID().getNum()];
return MetaString::createFromTextID(LIBRARY->resourceTypeHandler->getById(resourceID())->getNameTextID()).toString();
}
void CGResource::pickRandomObject(IGameRandomizer & gameRandomizer)