1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-29 09:44:52 +01:00

Rename members of AnimationPeepType

This commit is contained in:
Gymnasiast
2025-10-05 01:10:06 +02:00
parent d8da02e7dd
commit ee67a827c0
16 changed files with 56 additions and 56 deletions

View File

@@ -848,7 +848,7 @@ namespace OpenRCT2::Scripting
std::vector<std::string> ScGuest::availableAnimations_get() const
{
std::vector<std::string> availableAnimations{};
for (auto& animation : getAnimationsByPeepType(AnimationPeepType::Guest))
for (auto& animation : getAnimationsByPeepType(AnimationPeepType::guest))
{
availableAnimations.push_back(std::string(animation.first));
}
@@ -859,7 +859,7 @@ namespace OpenRCT2::Scripting
{
std::vector<uint32_t> spriteIds{};
auto& availableGuestAnimations = getAnimationsByPeepType(AnimationPeepType::Guest);
auto& availableGuestAnimations = getAnimationsByPeepType(AnimationPeepType::guest);
auto animationType = availableGuestAnimations.TryGet(groupKey);
if (animationType == std::nullopt)
{
@@ -895,7 +895,7 @@ namespace OpenRCT2::Scripting
return nullptr;
}
auto& availableGuestAnimations = getAnimationsByPeepType(AnimationPeepType::Guest);
auto& availableGuestAnimations = getAnimationsByPeepType(AnimationPeepType::guest);
std::string_view action = availableGuestAnimations[peep->AnimationType];
// Special consideration for sitting peeps
@@ -910,7 +910,7 @@ namespace OpenRCT2::Scripting
{
ThrowIfGameStateNotMutable();
auto& availableGuestAnimations = getAnimationsByPeepType(AnimationPeepType::Guest);
auto& availableGuestAnimations = getAnimationsByPeepType(AnimationPeepType::guest);
auto newType = availableGuestAnimations.TryGet(groupKey);
if (newType == std::nullopt)
{

View File

@@ -78,25 +78,25 @@ namespace OpenRCT2::Scripting
if (value == "handyman" && peep->AssignedStaffType != StaffType::Handyman)
{
peep->AssignedStaffType = StaffType::Handyman;
peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::Handyman);
peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::handyman);
peep->AnimationGroup = PeepAnimationGroup::Normal;
}
else if (value == "mechanic" && !peep->IsMechanic())
{
peep->AssignedStaffType = StaffType::Mechanic;
peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::Mechanic);
peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::mechanic);
peep->AnimationGroup = PeepAnimationGroup::Normal;
}
else if (value == "security" && peep->AssignedStaffType != StaffType::Security)
{
peep->AssignedStaffType = StaffType::Security;
peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::Security);
peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::security);
peep->AnimationGroup = PeepAnimationGroup::Normal;
}
else if (value == "entertainer" && !peep->isEntertainer())
{
peep->AssignedStaffType = StaffType::Entertainer;
peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::Entertainer);
peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::entertainer);
peep->AnimationGroup = PeepAnimationGroup::Normal;
}
@@ -243,17 +243,17 @@ namespace OpenRCT2::Scripting
switch (staffType)
{
case StaffType::Handyman:
animPeepType = AnimationPeepType::Handyman;
animPeepType = AnimationPeepType::handyman;
break;
case StaffType::Mechanic:
animPeepType = AnimationPeepType::Mechanic;
animPeepType = AnimationPeepType::mechanic;
break;
case StaffType::Security:
animPeepType = AnimationPeepType::Security;
animPeepType = AnimationPeepType::security;
break;
case StaffType::Entertainer:
default:
animPeepType = AnimationPeepType::Entertainer;
animPeepType = AnimationPeepType::entertainer;
}
return getAnimationsByPeepType(animPeepType);
}