1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

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
2025-07-16 13:20:14 +02:00
committed by GitHub
3 changed files with 4 additions and 6 deletions

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)
------------------------------------------------------------------------

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);
}

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);
}