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

Function vault_main

crawl-ref/source/maps.cc:104–117  ·  view source on GitHub ↗

Make sure that vault_n, where n is a number, is a vault which can be put anywhere, while other vault names are for specific level ranges, etc.

Source from the content-addressed store, hash-verified

102// Make sure that vault_n, where n is a number, is a vault which can be put
103// anywhere, while other vault names are for specific level ranges, etc.
104map_section_type vault_main(vault_placement &place, const map_def *vault,
105 bool check_place)
106{
107#ifdef DEBUG_STATISTICS
108 if (crawl_state.map_stat_gen)
109 mapstat_report_map_try(*vault);
110#endif
111
112 // Return value of MAP_NONE forces dungeon.cc to regenerate the
113 // level, except for branch entry vaults where dungeon.cc just
114 // rejects the vault and places a vanilla entry.
115
116 return _write_vault(const_cast<map_def&>(*vault), place, check_place);
117}
118
119static map_section_type _write_vault(map_def &mdef,
120 vault_placement &place,

Callers 2

_build_vault_implFunction · 0.85
LUAFNFunction · 0.85

Calls 2

mapstat_report_map_tryFunction · 0.85
_write_vaultFunction · 0.85

Tested by

no test coverage detected