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

Method GodMenuEntry

crawl-ref/source/god-menu.cc:18–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16#include "tileview.h"
17
18GodMenuEntry::GodMenuEntry(god_type god_, bool long_name) :
19 MenuEntry(god_name(god_, long_name), MEL_ITEM, 1, 0),
20 god(god_)
21{
22 if (god == GOD_SHINING_ONE)
23 hotkeys.push_back('1');
24 else
25 {
26 hotkeys.push_back(text.at(0));
27 hotkeys.push_back(toalower(text.at(0)));
28 }
29 int c = god_message_altar_colour(god);
30 colour_text = colour_to_str(c);
31 data = &text;
32
33 const dungeon_feature_type feat = altar_for_god(god_);
34 if (feat)
35 {
36 const tileidx_t idx = tileidx_feature_base(feat);
37 add_tile(tile_def(pick_dngn_tile(idx, ui_random(INT_MAX))));
38 }
39}
40
41string GodMenuEntry::_get_text_preface() const
42{

Callers

nothing calls this directly

Calls 10

god_nameFunction · 0.85
god_message_altar_colourFunction · 0.85
colour_to_strFunction · 0.85
altar_for_godFunction · 0.85
tileidx_feature_baseFunction · 0.85
tile_defClass · 0.85
pick_dngn_tileFunction · 0.85
ui_randomFunction · 0.85
toalowerFunction · 0.70
push_backMethod · 0.45

Tested by

no test coverage detected