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

Reduce non-const access to gamestate on server

This commit is contained in:
Ivan Savenko
2025-05-20 20:38:13 +03:00
parent 8255a4b9ae
commit af20b39fe6
13 changed files with 32 additions and 32 deletions

View File

@@ -574,7 +574,7 @@ EDiggingStatus CGameInfoCallback::getTileDigStatus(int3 tile, bool verbose) cons
return getTile(tile)->getDiggingStatus();
}
EBuildingState CGameInfoCallback::canBuildStructure( const CGTownInstance *t, BuildingID ID )
EBuildingState CGameInfoCallback::canBuildStructure( const CGTownInstance *t, BuildingID ID ) const
{
ERROR_RET_VAL_IF(!canGetFullInfo(t), "Town is not owned!", EBuildingState::TOWN_NOT_OWNED);
@@ -947,7 +947,7 @@ void CGameInfoCallback::getAllTiles(std::unordered_set<int3> & tiles, std::optio
}
}
void CGameInfoCallback::getAllowedSpells(std::vector<SpellID> & out, std::optional<ui16> level)
void CGameInfoCallback::getAllowedSpells(std::vector<SpellID> & out, std::optional<ui16> level) const
{
for (auto const & spellID : gameState().getMap().allowedSpells)
{