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

Function registerWarmDampBox

plugins/dig.cpp:2120–2137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2118}
2119
2120static int registerWarmDampBox(lua_State *L) {
2121 TRACE(log).print("entering registerWarmDampBox\n");
2122 df::coord pos_start, pos_end;
2123 if (!get_bounds(L, 1, pos_start, pos_end)) {
2124 luaL_argerror(L, 1, "invalid box bounds");
2125 return 0;
2126 }
2127
2128 std::unordered_map<df::coord, df::job *> dig_jobs;
2129 fill_dig_jobs(dig_jobs);
2130
2131 for (int32_t z = pos_start.z; z <= pos_end.z; ++z)
2132 for (int32_t y = pos_start.y; y <= pos_end.y; ++y)
2133 for (int32_t x = pos_start.x; x <= pos_end.x; ++x)
2134 update_tile_mask(df::coord(x, y, z), dig_jobs);
2135
2136 return 0;
2137}
2138
2139// re-composits layers using screentexpos layers unused for walls
2140static void bump_layers(const Screen::Pen &pen, int x, int y) {

Callers

nothing calls this directly

Calls 5

luaL_argerrorFunction · 0.85
fill_dig_jobsFunction · 0.85
update_tile_maskFunction · 0.85
get_boundsFunction · 0.70
printMethod · 0.45

Tested by

no test coverage detected