mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-19 05:52:27 +01:00
* Use stored values of customers to adjust income from on-ride photos Use stored values of photos sold and total customers to calculate ratio and use that to predict income per hour for rides that include on-ride-photo sections. * Get rid of float * Fix formatting * Fix formatting - again * Review changes * Fix formatting * Use new method of checking on-ride photo * Use constants * Add a changelog and contributors entry
This commit is contained in:
@@ -147,6 +147,7 @@ The following people are not part of the development team, but have been contrib
|
|||||||
* Michael Coates (outerwear)
|
* Michael Coates (outerwear)
|
||||||
* Reid Baris (Rdbaris)
|
* Reid Baris (Rdbaris)
|
||||||
* Deanna Baris (dbaris)
|
* Deanna Baris (dbaris)
|
||||||
|
* Chaitanya Thengdi (chaitanyathengdi)
|
||||||
|
|
||||||
## Toolchain
|
## Toolchain
|
||||||
* (Balletie) - macOS
|
* (Balletie) - macOS
|
||||||
|
|||||||
@@ -48,6 +48,7 @@
|
|||||||
- Fix: [#12123] Long server descriptions are not cut off properly.
|
- Fix: [#12123] Long server descriptions are not cut off properly.
|
||||||
- Fix: [#12211] Map Generator shows incorrect map sizes (e.g. "150 x 0").
|
- Fix: [#12211] Map Generator shows incorrect map sizes (e.g. "150 x 0").
|
||||||
- Fix: [#12221] Map Generation tool doesn't place any trees.
|
- Fix: [#12221] Map Generation tool doesn't place any trees.
|
||||||
|
- Fix: [#12285] On-ride photo profit assumes every guest buys one.
|
||||||
- Fix: [#12312] Softlock when loading save file via command line fails.
|
- Fix: [#12312] Softlock when loading save file via command line fails.
|
||||||
- Fix: RCT1 scenarios have more items in the object list than are present in the park or the research list.
|
- 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.
|
- Improved: [#6530] Allow water and land height changes on park borders.
|
||||||
|
|||||||
@@ -396,8 +396,24 @@ money32 Ride::CalculateIncomePerHour() const
|
|||||||
|
|
||||||
if (currentShopItem != SHOP_ITEM_NONE)
|
if (currentShopItem != SHOP_ITEM_NONE)
|
||||||
{
|
{
|
||||||
priceMinusCost += price[1];
|
const money16 shopItemProfit = price[1] - ShopItems[currentShopItem].Cost;
|
||||||
priceMinusCost -= ShopItems[currentShopItem].Cost;
|
|
||||||
|
if (ShopItems[currentShopItem].IsPhoto())
|
||||||
|
{
|
||||||
|
const int32_t rideTicketsSold = total_customers - no_secondary_items_sold;
|
||||||
|
|
||||||
|
// Use the ratio between photo sold and total admissions to approximate the photo income(as not every guest will buy
|
||||||
|
// one).
|
||||||
|
// TODO: use data from the last 5 minutes instead of all-time values for a more accurate calculation
|
||||||
|
if (rideTicketsSold > 0)
|
||||||
|
{
|
||||||
|
priceMinusCost += ((no_secondary_items_sold * shopItemProfit) / rideTicketsSold);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
priceMinusCost += shopItemProfit;
|
||||||
|
}
|
||||||
|
|
||||||
if (entry->shop_item[0] != SHOP_ITEM_NONE)
|
if (entry->shop_item[0] != SHOP_ITEM_NONE)
|
||||||
priceMinusCost /= 2;
|
priceMinusCost /= 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user