| 496 | } |
| 497 | |
| 498 | void Room::exportTileDataToStream(std::ostream& os, Tile* tile, TileData* tileData) const |
| 499 | { |
| 500 | if(getGameMap()->isInEditorMode()) |
| 501 | return; |
| 502 | |
| 503 | os << "\t" << tileData->mHP; |
| 504 | |
| 505 | // We only save enemy seats that have vision on the building |
| 506 | std::vector<Seat*> seatsToSave; |
| 507 | for(Seat* seat : tileData->mSeatsVision) |
| 508 | { |
| 509 | if(getSeat()->isAlliedSeat(seat)) |
| 510 | continue; |
| 511 | |
| 512 | seatsToSave.push_back(seat); |
| 513 | } |
| 514 | uint32_t nbSeatsVision = seatsToSave.size(); |
| 515 | os << "\t" << nbSeatsVision; |
| 516 | for(Seat* seat : seatsToSave) |
| 517 | os << "\t" << seat->getId(); |
| 518 | } |
| 519 | |
| 520 | bool Room::importTileDataFromStream(std::istream& is, Tile* tile, TileData* tileData) |
| 521 | { |
nothing calls this directly
no test coverage detected