1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

Merge pull request #1717 from SoundSSGood/backpack-limit-size

Introducing backpack size limit functionality
This commit is contained in:
Ivan Savenko
2023-03-27 17:17:49 +03:00
committed by GitHub
27 changed files with 438 additions and 314 deletions

View File

@@ -1023,11 +1023,6 @@ void CGHeroInstance::putArtifact(ArtifactPosition pos, CArtifactInstance *art)
art->putAt(ArtifactLocation(this, pos));
}
void CGHeroInstance::putInBackpack(CArtifactInstance *art)
{
putArtifact(art->firstBackpackSlot(this), art);
}
bool CGHeroInstance::hasSpellbook() const
{
return getArt(ArtifactPosition::SPELLBOOK);
@@ -1126,7 +1121,8 @@ EDiggingStatus CGHeroInstance::diggingStatus() const
{
if(static_cast<int>(movement) < maxMovePoints(true))
return EDiggingStatus::LACK_OF_MOVEMENT;
if(!VLC->arth->objects[ArtifactID::GRAIL]->canBePutAt(this))
return EDiggingStatus::BACKPACK_IS_FULL;
return cb->getTileDigStatus(visitablePos());
}