| 265 | } |
| 266 | |
| 267 | void Seat::notifyTileClaimedByEnemy(Tile* tile) |
| 268 | { |
| 269 | if(mPlayer == nullptr) |
| 270 | return; |
| 271 | if(!mPlayer->getIsHuman()) |
| 272 | return; |
| 273 | |
| 274 | if(tile->getX() >= static_cast<int>(mTilesStates.size())) |
| 275 | { |
| 276 | OD_LOG_ERR("Tile=" + Tile::displayAsString(tile)); |
| 277 | return; |
| 278 | } |
| 279 | if(tile->getY() >= static_cast<int>(mTilesStates[tile->getX()].size())) |
| 280 | { |
| 281 | OD_LOG_ERR("Tile=" + Tile::displayAsString(tile)); |
| 282 | return; |
| 283 | } |
| 284 | |
| 285 | TileStateNotified& tileState = mTilesStates[tile->getX()][tile->getY()]; |
| 286 | |
| 287 | // By default, we set the tile like if it was not claimed anymore |
| 288 | tileState.mSeatIdOwner = -1; |
| 289 | tileState.mTileVisual = TileVisual::dirtGround; |
| 290 | tileState.mVisionTurnCurrent = true; |
| 291 | } |
| 292 | |
| 293 | const std::string Seat::getFactionFromLine(const std::string& line) |
| 294 | { |
no test coverage detected