1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

- Added basic mock/test generation - Added stub for terrain editing

This commit is contained in:
beegee1
2013-01-06 19:30:12 +00:00
parent d4c30667b8
commit 0311e5e6f5
28 changed files with 2096 additions and 239 deletions

View File

@@ -9,6 +9,7 @@
#include "CSpellHandler.h"
#include "CObjectHandler.h"
#include "NetPacks.h"
#include "GameConstants.h"
using namespace boost::assign;
@@ -776,14 +777,23 @@ void CArtHandler::initAllowedArtifactsList(const std::vector<ui8> &allowed)
allowedArtifacts.push_back(artifacts[i]);
else //check if active modules allow artifact to be every used
{
if (artifacts[i]->possibleSlots[ArtBearer::COMMANDER].size() && VLC->modh->modules.COMMANDERS ||
artifacts[i]->possibleSlots[ArtBearer::CREATURE].size() && VLC->modh->modules.STACK_ARTIFACT)
if ((artifacts[i]->possibleSlots[ArtBearer::COMMANDER].size() && VLC->modh->modules.COMMANDERS) ||
(artifacts[i]->possibleSlots[ArtBearer::CREATURE].size() && VLC->modh->modules.STACK_ARTIFACT))
allowedArtifacts.push_back(artifacts[i]);
//keep im mind that artifact can be worn by more than one type of bearer
}
}
}
std::vector<ui8> CArtHandler::getDefaultAllowedArtifacts() const
{
std::vector<ui8> allowedArtifacts;
allowedArtifacts.resize(127, 1);
allowedArtifacts.resize(141, 0);
allowedArtifacts.resize(GameConstants::ARTIFACTS_QUANTITY, 1);
return allowedArtifacts;
}
CArtifactInstance::CArtifactInstance()
{
init();