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

Function IsBuildingChanged

plugins/remotefortressreader/remotefortressreader.cpp:688–703  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

686std::map<DFCoord, uint8_t> buildingHashes;
687
688bool IsBuildingChanged(DFCoord pos)
689{
690 df::map_block * block = Maps::getBlock(pos);
691 bool changed = false;
692 for (int x = 0; x < 16; x++)
693 for (int y = 0; y < 16; y++)
694 {
695 auto bld = block->occupancy[x][y].bits.building;
696 if (buildingHashes[pos] != bld)
697 {
698 buildingHashes[pos] = bld;
699 changed = true;
700 }
701 }
702 return changed;
703}
704
705std::map<DFCoord, uint16_t> spatterHashes;
706

Callers

nothing calls this directly

Calls 1

getBlockFunction · 0.85

Tested by

no test coverage detected