mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
Info map for terrain type. Fixes bug 5.
This commit is contained in:
@ -568,8 +568,18 @@ void CTerrainRect::clickRight(tribool down, bool previousState)
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::vector < const CGObjectInstance * > objs = LOCPLINT->cb->getBlockingObjs(mp);
|
std::vector < const CGObjectInstance * > objs = LOCPLINT->cb->getBlockingObjs(mp);
|
||||||
if(!objs.size())
|
if(!objs.size()) {
|
||||||
|
// Bare or undiscovered terrain
|
||||||
|
if (down) {
|
||||||
|
const TerrainTile * tile = LOCPLINT->cb->getTileInfo(mp);
|
||||||
|
if (tile) {
|
||||||
|
CSimpleWindow * temp = CMessage::genWindow(VLC->generaltexth->terrainNames[tile->tertype],LOCPLINT->playerID,true);
|
||||||
|
CRClickPopupInt *rcpi = new CRClickPopupInt(temp,true);
|
||||||
|
GH.pushInt(rcpi);
|
||||||
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const CGObjectInstance * obj = objs.back();
|
const CGObjectInstance * obj = objs.back();
|
||||||
switch(obj->ID)
|
switch(obj->ID)
|
||||||
|
@ -285,7 +285,16 @@ void CGeneralTextHandler::load()
|
|||||||
{
|
{
|
||||||
loadToIt(temp,buf,it,3);
|
loadToIt(temp,buf,it,3);
|
||||||
restypes.push_back(temp);
|
restypes.push_back(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tlog5 << "\t\tReading TERRNAME \n";
|
||||||
|
buf = bitmaph->getTextFile("TERRNAME.TXT");
|
||||||
|
it=0;
|
||||||
|
while (it<buf.length()-1)
|
||||||
|
{
|
||||||
|
loadToIt(temp,buf,it,3);
|
||||||
|
terrainNames.push_back(temp);
|
||||||
|
}
|
||||||
|
|
||||||
tlog5 << "\t\tReading RANDSIGN \n";
|
tlog5 << "\t\tReading RANDSIGN \n";
|
||||||
buf = bitmaph->getTextFile("RANDSIGN.TXT");
|
buf = bitmaph->getTextFile("RANDSIGN.TXT");
|
||||||
@ -439,4 +448,4 @@ std::string CGeneralTextHandler::getDescr(std::string text)
|
|||||||
CGeneralTextHandler::CGeneralTextHandler()
|
CGeneralTextHandler::CGeneralTextHandler()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -57,6 +57,7 @@ public:
|
|||||||
std::vector<std::string> advobtxt;
|
std::vector<std::string> advobtxt;
|
||||||
std::vector<std::string> xtrainfo;
|
std::vector<std::string> xtrainfo;
|
||||||
std::vector<std::string> restypes;
|
std::vector<std::string> restypes;
|
||||||
|
std::vector<std::string> terrainNames;
|
||||||
std::vector<std::string> randsign;
|
std::vector<std::string> randsign;
|
||||||
std::vector<std::pair<std::string,std::string> > mines; //first - name; second - event description
|
std::vector<std::pair<std::string,std::string> > mines; //first - name; second - event description
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user