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

Function get_tile_place

plugins/blueprint.cpp:1201–1222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1199}
1200
1201static const char * get_tile_place(color_ostream &out, const df::coord &pos, const tile_context &ctx) {
1202 df::building_stockpilest* sp = virtual_cast<df::building_stockpilest>(ctx.b);
1203
1204 if (!sp || sp->getType() != building_type::Stockpile)
1205 return NULL;
1206
1207 bool rectangular = is_rectangular(sp);
1208 bool is_first_tile = pos == get_first_tile(sp);
1209 ostringstream keys;
1210
1211 if (!rectangular){
1212 get_place_keys(out, keys, sp, true, is_first_tile);
1213 return cache(quotify_outer(keys));
1214 }
1215
1216 if (!is_first_tile)
1217 return if_pretty(ctx, "`");
1218
1219 get_place_keys(out, keys, sp, false, true);
1220 add_expansion_syntax(sp, keys);
1221 return cache(quotify_outer(keys));
1222}
1223
1224static string get_reservation(color_ostream &out, df::building_civzonest *zone) {
1225 string res;

Callers

nothing calls this directly

Calls 8

is_rectangularFunction · 0.85
get_first_tileFunction · 0.85
get_place_keysFunction · 0.85
cacheFunction · 0.85
quotify_outerFunction · 0.85
if_prettyFunction · 0.85
add_expansion_syntaxFunction · 0.85
getTypeMethod · 0.80

Tested by

no test coverage detected