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

Function do_reveal_fort

plugins/reveal.cpp:211–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211static void do_reveal_fort(color_ostream &out, bool no_hell) {
212 hidesaved.reserve(world->map.map_blocks.size());
213 for (auto & block : world->map.map_blocks) {
214 if (no_hell && !isSafe(block->map_pos))
215 continue;
216 hidesaved.emplace_back();
217 hideblock *hb = &hidesaved.back();
218 hb->c = block->map_pos;
219 designations40d & designations = block->designation;
220 for (uint32_t x = 0; x < 16; x++) for (uint32_t y = 0; y < 16; y++) {
221 // save state of tile and set to revealed
222 hb->hiddens[x][y] = designations[x][y].bits.hidden;
223 designations[x][y].bits.hidden = 0;
224 }
225 }
226 update_minimap();
227}
228
229command_result reveal(color_ostream &out, vector<string> & params) {
230 bool no_hell = true;

Callers 1

revealFunction · 0.85

Calls 4

isSafeFunction · 0.85
update_minimapFunction · 0.85
reserveMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected