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.
This commit is contained in:
		@@ -3790,6 +3790,7 @@ static ChangeInfoResult IndustriesChangeInfo(uint indid, int numinfo, int prop,
 | 
				
			|||||||
					} else {
 | 
										} else {
 | 
				
			||||||
						indsp->produced_cargo[i] = INVALID_CARGO;
 | 
											indsp->produced_cargo[i] = INVALID_CARGO;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
										indsp->produced_cargo_label[i] = CT_INVALID;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
@@ -3808,6 +3809,7 @@ static ChangeInfoResult IndustriesChangeInfo(uint indid, int numinfo, int prop,
 | 
				
			|||||||
					} else {
 | 
										} else {
 | 
				
			||||||
						indsp->accepts_cargo[i] = INVALID_CARGO;
 | 
											indsp->accepts_cargo[i] = INVALID_CARGO;
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
										indsp->accepts_cargo_label[i] = CT_INVALID;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
				break;
 | 
									break;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user