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

Function get_first_tile

plugins/blueprint.cpp:1187–1199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1185}
1186
1187static df::coord get_first_tile(df::building *bld) {
1188 df::coord first_pos;
1189 cuboid bld_area(bld->x1, bld->y1, bld->z, bld->x2, bld->y2, bld->z);
1190 bld_area.forCoord([&](const df::coord &pos) {
1191 if (Buildings::containsTile(bld, pos)) {
1192 first_pos = pos;
1193 return false;
1194 }
1195 return true;
1196 }, true);
1197
1198 return first_pos;
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);

Callers 2

get_tile_placeFunction · 0.85
get_tile_zoneFunction · 0.85

Calls 1

forCoordMethod · 0.80

Tested by

no test coverage detected