1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

More fixes for stacks, some basic macro-based logging for bonus graph operations.

This commit is contained in:
Michał W. Urbańczyk
2010-12-11 23:11:26 +00:00
parent e677cd5b07
commit fc6d6e02a3
17 changed files with 143 additions and 69 deletions

View File

@@ -7,6 +7,7 @@
#include "IGameCallback.h"
#include "CGameState.h"
#include "../hch/CGeneralTextHandler.h"
#include <sstream>
const CStackInstance &CCreatureSet::operator[](TSlot slot) const
{
@@ -465,6 +466,20 @@ CStackInstance::~CStackInstance()
}
std::string CStackInstance::nodeName() const
{
std::ostringstream oss;
oss << "Stack of " << count << " creatures of ";
if(type)
oss << type->namePl;
else if(idRand)
oss << "[no type, idRand=" << idRand << "]";
else
oss << "[UNDEFINED TYPE]";
return oss.str();
}
CStackBasicDescriptor::CStackBasicDescriptor()
{
type = NULL;