* Sets the tile's cache flag. - TODO: set this for each object separately? * @param flag true/false * @param part 0-2 westwall/northwall/content+floor */
| 367 | * @param part 0-2 westwall/northwall/content+floor |
| 368 | */ |
| 369 | void Tile::setDiscovered(bool flag, int part) |
| 370 | { |
| 371 | if (_discovered[part] != flag) |
| 372 | { |
| 373 | _discovered[part] = flag; |
| 374 | if (part == 2 && flag == true) |
| 375 | { |
| 376 | _discovered[0] = true; |
| 377 | _discovered[1] = true; |
| 378 | } |
| 379 | // if light on tile changes, units and objects on it change light too |
| 380 | if (_unit != 0) |
| 381 | { |
| 382 | _unit->setCache(0); |
| 383 | } |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | /** |
| 388 | * Get the black fog of war state of this tile. |
no test coverage detected