* Gets a mapblock with a given name. * @param name The name of the mapblock. * @return Pointer to mapblock. */
| 153 | * @return Pointer to mapblock. |
| 154 | */ |
| 155 | MapBlock* RuleTerrain::getMapBlock(const std::string &name) |
| 156 | { |
| 157 | for (std::vector<MapBlock*>::const_iterator i = _mapBlocks.begin(); i != _mapBlocks.end(); ++i) |
| 158 | { |
| 159 | if((*i)->getName() == name) |
| 160 | return (*i); |
| 161 | } |
| 162 | return 0; |
| 163 | } |
| 164 | |
| 165 | /** |
| 166 | * Gets a mapdata object. |