mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-13 11:40:38 +02:00
Tweaks
This commit is contained in:
parent
64cb0267a3
commit
ac281f3fec
@ -141,7 +141,6 @@ CGObjectInstance::~CGObjectInstance()
|
||||
|
||||
const std::string & CGObjectInstance::getStringId() const
|
||||
{
|
||||
//todo: getStringId use real object type
|
||||
if(stringId == "")
|
||||
{
|
||||
boost::format fmt("%s_%d");
|
||||
|
@ -186,7 +186,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
///Entry point of Json serialization
|
||||
///Entry point of Json (de-)serialization
|
||||
void serializeJson(JsonSerializeFormat & handler);
|
||||
|
||||
protected:
|
||||
|
@ -762,7 +762,7 @@ void CMapLoaderJson::MapObjectLoader::construct()
|
||||
if(typeName.empty())
|
||||
{
|
||||
logGlobal->errorStream() << "Object type missing";
|
||||
logGlobal->traceStream() << configuration;
|
||||
logGlobal->debugStream() << configuration;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -780,7 +780,7 @@ void CMapLoaderJson::MapObjectLoader::construct()
|
||||
else if(subTypeName.empty())
|
||||
{
|
||||
logGlobal->errorStream() << "Object subType missing";
|
||||
logGlobal->traceStream() << configuration;
|
||||
logGlobal->debugStream() << configuration;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -861,6 +861,11 @@ void CMapLoaderJson::readObjects()
|
||||
//configure objects after all objects are constructed so we may resolve internal IDs even to actual pointers OTF
|
||||
for(auto & ptr : loaders)
|
||||
ptr->configure();
|
||||
|
||||
std::sort(map->heroesOnMap.begin(), map->heroesOnMap.end(), [](const ConstTransitivePtr<CGHeroInstance> & a, const ConstTransitivePtr<CGHeroInstance> & b)
|
||||
{
|
||||
return a->subID < b->subID;
|
||||
});
|
||||
}
|
||||
|
||||
///CMapSaverJson
|
||||
|
Loading…
x
Reference in New Issue
Block a user