Merge pull request #24775 from mixiate/fix-scenery-and-new-ride-window-filters

Fix scenery and new ride window non legacy object filters
This commit is contained in:
Aaron van Geffen authored and GitHub committed 2025-07-16 13:20:14 +02:00
commit 3d74a68576
3 files changed
+4 -6

No files matched your search

+1
View File
@@ -5,6 +5,7 @@
- Change: [#24730] Security guards now only walk slowly in crowded areas.
- Fix: [#24598] Cannot load .park files that use official legacy footpaths by accident.
- Fix: [#24773] The new ride window debug authors does not show the correct authors for non legacy ride objects.
- Fix: [#24775] The scenery and new ride windows do not filter by file name or identifier correctly for non legacy objects.
0.4.24 (2025-07-05)
------------------------------------------------------------------------
+2 -5
View File
@@ -786,15 +786,12 @@ namespace OpenRCT2::Ui::Windows
bool IsFilterInIdentifier(const RideObject& rideObject)
{
auto objectName = rideObject.GetObjectEntry().GetName();
return String::contains(objectName, _filter, true);
return String::contains(rideObject.GetIdentifier(), _filter, true);
}
bool IsFilterInFilename(const RideObject& rideObject)
{
auto repoItem = ObjectRepositoryFindObjectByEntry(&(rideObject.GetObjectEntry()));
const auto* const repoItem = OpenRCT2::GetContext()->GetObjectRepository().FindObject(rideObject.GetIdentifier());
return String::contains(repoItem->Path, _filter, true);
}
+1 -1
View File
@@ -1366,7 +1366,7 @@ namespace OpenRCT2::Ui::Windows
bool IsFilterInFilename(const Object& object)
{
auto repoItem = ObjectRepositoryFindObjectByEntry(&(object.GetObjectEntry()));
const auto* const repoItem = OpenRCT2::GetContext()->GetObjectRepository().FindObject(object.GetIdentifier());
return String::contains(repoItem->Path, _filteredSceneryTab.Filter, true);
}