mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-12 02:22:26 +01:00
Fix new ride window authors (#24773)
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
- Feature: [#24702] [Plugin] Add bindings for missing cheats (forcedParkRating, ignoreRidePrice, makeAllDestructible).
|
- Feature: [#24702] [Plugin] Add bindings for missing cheats (forcedParkRating, ignoreRidePrice, makeAllDestructible).
|
||||||
- Change: [#24730] Security guards now only walk slowly in crowded areas.
|
- 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: [#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.
|
||||||
|
|
||||||
0.4.24 (2025-07-05)
|
0.4.24 (2025-07-05)
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -980,14 +980,12 @@ namespace OpenRCT2::Ui::Windows
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Draw object author(s) if debugging tools are active
|
// Draw object author(s) if debugging tools are active
|
||||||
if (Config::Get().general.DebuggingTools)
|
if (Config::Get().general.DebuggingTools && !rideObj->GetAuthors().empty())
|
||||||
{
|
{
|
||||||
auto repoItem = ObjectRepositoryFindObjectByEntry(&(rideObj->GetObjectEntry()));
|
const auto& authors = rideObj->GetAuthors();
|
||||||
|
|
||||||
StringId authorStringId = repoItem->Authors.size() > 1 ? STR_AUTHORS_STRING : STR_AUTHOR_STRING;
|
|
||||||
|
|
||||||
std::string authorsString;
|
std::string authorsString;
|
||||||
for (auto& author : repoItem->Authors)
|
for (auto& author : authors)
|
||||||
{
|
{
|
||||||
if (!authorsString.empty())
|
if (!authorsString.empty())
|
||||||
authorsString.append(", ");
|
authorsString.append(", ");
|
||||||
@@ -996,7 +994,7 @@ namespace OpenRCT2::Ui::Windows
|
|||||||
}
|
}
|
||||||
|
|
||||||
ft = Formatter();
|
ft = Formatter();
|
||||||
ft.Add<StringId>(authorStringId);
|
ft.Add<StringId>(authors.size() > 1 ? STR_AUTHORS_STRING : STR_AUTHOR_STRING);
|
||||||
ft.Add<const char*>(authorsString.c_str());
|
ft.Add<const char*>(authorsString.c_str());
|
||||||
|
|
||||||
DrawTextEllipsised(
|
DrawTextEllipsised(
|
||||||
|
|||||||
Reference in New Issue
Block a user