* Get a map value from the world. * Unlike the simulator world, this method takes modifications made * previously by (other) tools into account. * @param pos Position of queried map value. Position must be on-map. * @return Map value of the queried position. */
| 159 | * @return Map value of the queried position. |
| 160 | */ |
| 161 | MapValue ToolEffects::getMapValue(const Position &pos) const |
| 162 | { |
| 163 | WorldModificationsMap::const_iterator iter; |
| 164 | |
| 165 | iter = this->modifications.find(pos); |
| 166 | if (iter == this->modifications.end()) { |
| 167 | return this->sim->map[pos.posX][pos.posY]; |
| 168 | } |
| 169 | |
| 170 | return (*iter).second; |
| 171 | } |
| 172 | |
| 173 | /** |
| 174 | * Set a new map value. |
no outgoing calls
no test coverage detected