From d0ce29fb2870b65ffe9d62c459ce477eb1faeda2 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Fri, 24 Oct 2025 20:34:35 +0100 Subject: [PATCH] Fix: Do not pre-fill industry production history for unused production slots (#14730) --- src/industry_cmd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 5e6ba2f754..6b737e9e33 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1841,13 +1841,13 @@ static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type, if (indspec->callback_mask.Test(IndustryCallbackMask::Production256Ticks)) { IndustryProductionCallback(i, 1); for (auto &p : i->produced) { - p.history[LAST_MONTH].production = ScaleByCargoScale(p.waiting * 8, false); + if (IsValidCargoType(p.cargo)) p.history[LAST_MONTH].production = ScaleByCargoScale(p.waiting * 8, false); p.waiting = 0; } } for (auto &p : i->produced) { - p.history[LAST_MONTH].production += ScaleByCargoScale(p.rate * 8, false); + if (IsValidCargoType(p.cargo)) p.history[LAST_MONTH].production += ScaleByCargoScale(p.rate * 8, false); } UpdateValidHistory(i->valid_history, HISTORY_YEAR, TimerGameEconomy::month);