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

Function clean_mud_safely

plugins/cleaners.cpp:28–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26REQUIRE_GLOBAL(cursor);
27
28static void clean_mud_safely(df::block_square_event_material_spatterst *spatter,
29 const df::coord &block_pos, const df::coord &offset)
30{
31 df::coord pos = block_pos + offset;
32 auto bld = Buildings::findAtTile(pos);
33 if (!bld || bld->getType() != building_type::FarmPlot)
34 spatter->amount[offset.x][offset.y] = 0;
35}
36
37command_result cleanmap (color_ostream &out, bool snow, bool mud, bool item_spatter)
38{

Callers 2

cleanmapFunction · 0.85
spotcleanFunction · 0.85

Calls 1

getTypeMethod · 0.80

Tested by

no test coverage detected