From 2212169a8c69392d491365e997d961efb782a68c 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 08dbdc4efc..565d86c374 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1835,13 +1835,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);