MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / getCostRepair

Method getCostRepair

source/rooms/Room.cpp:634–649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

632}
633
634int Room::getCostRepair()
635{
636 if(!canBeRepaired())
637 return 0;
638
639 int nbTiles = 0;
640 for(Tile* tile : mCoveredTilesDestroyed)
641 {
642 // We check if the tiles can be repaired
643 if(!tile->isBuildableUpon(getSeat()))
644 continue;
645
646 ++nbTiles;
647 }
648 return nbTiles * RoomManager::costPerTile(getType());
649}
650
651void Room::repairRoom()
652{

Callers 1

repairRoomsMethod · 0.80

Calls 1

isBuildableUponMethod · 0.80

Tested by

no test coverage detected