MCPcopy Create free account
hub / github.com/crawl/crawl / update

Method update

crawl-ref/source/tilereg-cmd.cc:199–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199void CommandRegion::update()
200{
201 m_items.clear();
202 m_dirty = true;
203
204 if (mx * my == 0)
205 return;
206
207 const bool safe = i_feel_safe(false);
208
209 for (int idx = 0; idx < n_common_commands; ++idx)
210 {
211 command_type cmd = _common_commands[idx];
212
213 // hackily toggle between display map and exit map display depending
214 // on whether we are in map mode
215 if (cmd == CMD_DISPLAY_MAP && tiles.get_map_display())
216 cmd = CMD_MAP_EXIT_MAP;
217
218 InventoryTile desc;
219 desc.tile = tileidx_command(cmd);
220 desc.idx = cmd;
221
222 // Auto-explore while monsters around etc.
223 if (tile_command_not_applicable(cmd, safe))
224 desc.flag |= TILEI_FLAG_INVALID;
225
226 m_items.push_back(desc);
227 }
228}
229
230#endif

Callers

nothing calls this directly

Calls 6

i_feel_safeFunction · 0.85
tileidx_commandFunction · 0.85
get_map_displayMethod · 0.80
clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected