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

Function add_expansion_syntax

plugins/blueprint.cpp:1041–1049  ·  view source on GitHub ↗

returns "~" if keys is NULL; otherwise returns the keys with the building dimensions in the expansion syntax

Source from the content-addressed store, hash-verified

1039// returns "~" if keys is NULL; otherwise returns the keys with the building
1040// dimensions in the expansion syntax
1041static const char * add_expansion_syntax(const df::building *bld,
1042 const char *keys) {
1043 if (!keys)
1044 return "~";
1045 ostringstream s;
1046 pair<uint32_t, uint32_t> size = get_building_size(bld);
1047 s << keys << "(" << size.first << "x" << size.second << ")";
1048 return cache(s);
1049}
1050
1051static void add_expansion_syntax(const df::building *bld, ostringstream &keys) {
1052 if (keys.str().empty())

Callers 3

get_tile_buildFunction · 0.85
get_tile_placeFunction · 0.85
get_tile_zoneFunction · 0.85

Calls 4

get_building_sizeFunction · 0.85
cacheFunction · 0.85
emptyMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected