MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / setObjectIsRequiredByAnother

Function setObjectIsRequiredByAnother

src/OpenLoco/src/Objects/ObjectIndex.cpp:641–655  ·  view source on GitHub ↗

0x0047400C

Source from the content-addressed store, hash-verified

639
640 // 0x0047400C
641 static void setObjectIsRequiredByAnother(std::span<SelectedObjectsFlags> objectFlags, const ObjectHeader& objHeader)
642 {
643 const auto res = internalFindObjectInIndex(objHeader);
644 if (!res.has_value())
645 {
646 return;
647 }
648 auto& [index, entry] = *res;
649 objectFlags[index] |= SelectedObjectsFlags::requiredByAnother;
650
651 for (auto& objHeader2 : entry._requiredObjects)
652 {
653 setObjectIsRequiredByAnother(objectFlags, objHeader2);
654 }
655 }
656
657 // 0x004740CF
658 static void refreshRequiredByAnother(std::span<SelectedObjectsFlags> objectFlags)

Callers 1

refreshRequiredByAnotherFunction · 0.85

Calls 1

Tested by

no test coverage detected