From 469f894701b602ee3bba77b63c791d7b28200330 Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Wed, 29 Jul 2020 00:08:16 +0200 Subject: [PATCH] Fix #12505: Stores can only have the first product advertised --- distribution/changelog.txt | 1 + src/openrct2-ui/windows/NewCampaign.cpp | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 2ea9434546..f3e4dd625d 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -54,6 +54,7 @@ - Fix: [#12297] OpenGL renderer causing artifacts. - Fix: [#12312] Softlock when loading save file via command line fails. - Fix: [#12486] `set-rct2` has a broken g1.dat check. +- Fix: [#12505] Stores selling multiple items can only have the first product advertised. - Fix: 'j' character has broken kerning (original bug). - Fix: RCT1 scenarios have more items in the object list than are present in the park or the research list. - Improved: [#6530] Allow water and land height changes on park borders. diff --git a/src/openrct2-ui/windows/NewCampaign.cpp b/src/openrct2-ui/windows/NewCampaign.cpp index 20fd3bf44e..4feb7b294a 100644 --- a/src/openrct2-ui/windows/NewCampaign.cpp +++ b/src/openrct2-ui/windows/NewCampaign.cpp @@ -172,10 +172,12 @@ static void window_new_campaign_get_shop_items() auto rideEntry = ride.GetRideEntry(); if (rideEntry != nullptr) { - auto itemType = rideEntry->shop_item[0]; - if (itemType != SHOP_ITEM_NONE && ShopItems[itemType].IsFoodOrDrink()) + for (const auto itemType : rideEntry->shop_item) { - items |= 1ULL << itemType; + if (itemType != SHOP_ITEM_NONE && ShopItems[itemType].IsFoodOrDrink()) + { + items |= 1ULL << itemType; + } } } }