MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / ceaseSupportProvision

Method ceaseSupportProvision

game/state/battle/battlemappart.cpp:1080–1096  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1078}
1079
1080void BattleMapPart::ceaseSupportProvision()
1081{
1082 providesHardSupport = false;
1083 attemptReLinkSupports(getSupportedParts());
1084 supportedParts.clear();
1085 if (supportedItems)
1086 {
1087 for (auto &obj : this->tileObject->getOwningTile()->ownedObjects)
1088 {
1089 if (obj->getType() == TileObject::Type::Item)
1090 {
1091 std::static_pointer_cast<TileObjectBattleItem>(obj)->getItem()->tryCollapse();
1092 }
1093 }
1094 supportedItems = false;
1095 }
1096}
1097
1098void BattleMapPart::collapse(GameState &state)
1099{

Callers

nothing calls this directly

Calls 5

getOwningTileMethod · 0.80
tryCollapseMethod · 0.80
getItemMethod · 0.80
clearMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected