mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Implemented room description display (map/template name)
This commit is contained in:
@ -595,6 +595,24 @@ void CVCMIServer::updateStartInfoOnMapChange(std::shared_ptr<CMapInfo> mapInfo,
|
||||
else
|
||||
si->mapGenOptions.reset();
|
||||
}
|
||||
|
||||
if (lobbyProcessor)
|
||||
{
|
||||
std::string roomDescription;
|
||||
|
||||
if (si->mapGenOptions)
|
||||
{
|
||||
if (si->mapGenOptions->getMapTemplate())
|
||||
roomDescription = si->mapGenOptions->getMapTemplate()->getName();
|
||||
// else - no template selected.
|
||||
// TODO: handle this somehow?
|
||||
}
|
||||
else
|
||||
roomDescription = mi->getNameTranslated();
|
||||
|
||||
lobbyProcessor->sendChangeRoomDescription(roomDescription);
|
||||
}
|
||||
|
||||
si->mapname = mi->fileURI;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user