MCPcopy Create free account
hub / github.com/DFHack/dfhack / do_reveal_adventure

Function do_reveal_adventure

plugins/reveal.cpp:193–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193static void do_reveal_adventure(color_ostream &out, bool no_hell, bool incremental = false) {
194 df::coord pos;
195 if (auto unit = World::getAdventurer())
196 pos = Units::getPosition(unit);
197 for (auto & block : world->map.map_blocks) {
198 if (incremental && !is_vision_block(pos, block->map_pos))
199 continue;
200 if (no_hell && !isSafe(block->map_pos))
201 continue;
202 designations40d & designations = block->designation;
203 for (uint32_t x = 0; x < 16; x++) for (uint32_t y = 0; y < 16; y++) {
204 designations[x][y].bits.hidden = 0;
205 // set "lit" property (named "pile" because of how it is used in fort mode)
206 designations[x][y].bits.pile = 1;
207 }
208 }
209}
210
211static void do_reveal_fort(color_ostream &out, bool no_hell) {
212 hidesaved.reserve(world->map.map_blocks.size());

Callers 2

revealFunction · 0.85

Calls 2

is_vision_blockFunction · 0.85
isSafeFunction · 0.85

Tested by

no test coverage detected