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

Function decrement_flow

plugins/steam-engine.cpp:107–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107void decrement_flow(df::coord pos, int amount)
108{
109 auto pldes = Maps::getTileDesignation(pos);
110 if (!pldes) return;
111
112 int nsize = std::max(0, int(pldes->bits.flow_size - amount));
113 pldes->bits.flow_size = nsize;
114 pldes->bits.flow_forbid = (nsize > 3 || pldes->bits.liquid_type == tile_liquid::Magma);
115
116 enable_updates_at(pos, true, false);
117}
118
119void make_explosion(df::coord center, int power)
120{

Callers 1

absorb_unitMethod · 0.85

Calls 2

getTileDesignationFunction · 0.85
enable_updates_atFunction · 0.85

Tested by

no test coverage detected