Changeset - r28731:377f4b908032
[Not reviewed]
master
0 1 0
Peter Nelson - 10 months ago 2024-02-11 00:43:13
peter1138@openttd.org
Fix #12052: NewGRFs clearing industry cargo slots could fallback to default instead of empty. (#12053)

Ensure the default label is cleared when NewGRF sets a produced/accepted cargo slot, so that default fallback isn't used.
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/newgrf.cpp
Show inline comments
 
@@ -3790,6 +3790,7 @@ static ChangeInfoResult IndustriesChange
 
					} else {
 
						indsp->produced_cargo[i] = INVALID_CARGO;
 
					}
 
					indsp->produced_cargo_label[i] = CT_INVALID;
 
				}
 
				break;
 
			}
 
@@ -3808,6 +3809,7 @@ static ChangeInfoResult IndustriesChange
 
					} else {
 
						indsp->accepts_cargo[i] = INVALID_CARGO;
 
					}
 
					indsp->accepts_cargo_label[i] = CT_INVALID;
 
				}
 
				break;
 
			}
0 comments (0 inline, 0 general)