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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user