1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 21:13:05 +01:00

List available staff costumes dynamically

This commit is contained in:
Aaron van Geffen
2024-12-05 17:39:10 +01:00
parent 3cc8aec6b9
commit cfdfd1a234
14 changed files with 142 additions and 203 deletions

View File

@@ -60,6 +60,9 @@ void PeepAnimationsObject::ReadJson(IReadObjectContext* context, json_t& root)
Guard::Assert(root["peepType"].is_string(), "PeepAnimationsObject::ReadJson expects peepType to be a string");
_peepType = animationPeepTypeMap[Json::GetString(root["peepType"])];
Guard::Assert(root["isSlowWalking"].is_boolean(), "PeepAnimationsObject::ReadJson expects isSlowWalking to be a boolean");
_slowWalking = Json::GetBoolean(root["isSlowWalking"]);
auto& requiredAnimationMap = getAnimationsByPeepType(_peepType);
_animationGroups.clear();
@@ -105,6 +108,11 @@ void PeepAnimationsObject::ReadJson(IReadObjectContext* context, json_t& root)
}
}
std::string PeepAnimationsObject::GetCostumeName() const
{
return GetStringTable().GetString(ObjectStringID::NAME);
}
ImageIndex PeepAnimationsObject::GetInlineImageId() const
{
return _imageOffsetId;