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

Method enableBlockUpdates

library/modules/Maps.cpp:440–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438}
439
440void Maps::enableBlockUpdates(df::map_block *blk, bool flow, bool temperature)
441{
442 if (!blk || !(flow || temperature)) return;
443
444 if (temperature)
445 blk->flags.bits.update_temperature = true;
446
447 if (flow)
448 {
449 blk->flags.bits.update_liquid = true;
450 blk->flags.bits.update_liquid_twice = true;
451 }
452
453 auto z_flags = world->map_extras.z_level_flags;
454 int z_level = blk->map_pos.z;
455
456 if (z_flags && z_level >= 0 && z_level < world->map.z_count_block)
457 {
458 z_flags += z_level;
459 z_flags->bits.update = true;
460 z_flags->bits.update_twice = true;
461 }
462}
463
464df::flow_info *Maps::spawnFlow(df::coord pos, df::flow_type type, int mat_type, int mat_index, int density)
465{

Callers 3

df_liquids_executeFunction · 0.80
autocorrectAreaFunction · 0.80
paintTileFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected