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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user