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

Function GetMapInfo

plugins/remotefortressreader/remotefortressreader.cpp:1882–1900  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1880}
1881
1882static command_result GetMapInfo(color_ostream &stream, const EmptyMessage *in, MapInfo *out)
1883{
1884 if (!Maps::IsValid())
1885 return CR_FAILURE;
1886 uint32_t size_x, size_y, size_z;
1887 int32_t pos_x, pos_y, pos_z;
1888 Maps::getSize(size_x, size_y, size_z);
1889 Maps::getPosition(pos_x, pos_y, pos_z);
1890 out->set_block_size_x(size_x);
1891 out->set_block_size_y(size_y);
1892 out->set_block_size_z(size_z);
1893 out->set_block_pos_x(pos_x);
1894 out->set_block_pos_y(pos_y);
1895 out->set_block_pos_z(pos_z);
1896 out->set_world_name(DF2UTF(Translation::translateName(&df::global::world->world_data->name, false)));
1897 out->set_world_name_english(DF2UTF(Translation::translateName(&df::global::world->world_data->name, true)));
1898 out->set_save_name(df::global::world->cur_savegame.save_dir);
1899 return CR_OK;
1900}
1901
1902DFCoord GetMapCenter()
1903{

Callers

nothing calls this directly

Calls 1

DF2UTFFunction · 0.85

Tested by

no test coverage detected