mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 14:02:59 +01:00
Add checks to ensure an animation object is selected for each peep type
This commit is contained in:
@@ -687,6 +687,23 @@ bool EditorCheckObjectGroupAtLeastOneSelected(ObjectType checkObjectType)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditorCheckObjectGroupAtLeastOneOfPeepTypeSelected(uint8_t peepType)
|
||||
{
|
||||
auto numObjects = std::min(ObjectRepositoryGetItemsCount(), _objectSelectionFlags.size());
|
||||
const ObjectRepositoryItem* items = ObjectRepositoryGetItems();
|
||||
|
||||
for (size_t i = 0; i < numObjects; i++)
|
||||
{
|
||||
const auto isAnimObjectType = items[i].Type == ObjectType::PeepAnimations;
|
||||
const bool isSelected = _objectSelectionFlags[i] & ObjectSelectionFlags::Selected;
|
||||
if (isAnimObjectType && isSelected && items[i].PeepAnimationsInfo.PeepType == peepType)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EditorCheckObjectGroupAtLeastOneSurfaceSelected(bool queue)
|
||||
{
|
||||
auto numObjects = std::min(ObjectRepositoryGetItemsCount(), _objectSelectionFlags.size());
|
||||
|
||||
Reference in New Issue
Block a user