| 414 | creature.pushAction(Utils::make_unique<CreatureActionUseRoom>(creature, *this, true)); |
| 415 | } |
| 416 | void RoomTorture::exportToStream(std::ostream& os) const |
| 417 | { |
| 418 | Room::exportToStream(os); |
| 419 | |
| 420 | std::vector<Creature*> creatures; |
| 421 | for(Tile* tile : mCoveredTiles) |
| 422 | { |
| 423 | for(GameEntity* entity : tile->getEntitiesInTile()) |
| 424 | { |
| 425 | if(entity->getObjectType() != GameEntityType::creature) |
| 426 | continue; |
| 427 | |
| 428 | Creature* creature = static_cast<Creature*>(entity); |
| 429 | if(creature->getSeatPrison() != getSeat()) |
| 430 | continue; |
| 431 | |
| 432 | creatures.push_back(creature); |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | uint32_t nb = creatures.size(); |
| 437 | os << nb; |
| 438 | for(Creature* creature : creatures) |
| 439 | { |
| 440 | os << "\t" << creature->getName(); |
| 441 | } |
| 442 | os << "\n"; |
| 443 | } |
| 444 | |
| 445 | bool RoomTorture::importFromStream(std::istream& is) |
| 446 | { |
nothing calls this directly
no test coverage detected