1
0
Fork 0

Fix #12052: NewGRFs clearing industry cargo slots could fallback to default instead of empty.

Ensure the default label is cleared when NewGRF sets a produced/accepted cargo slot, so that default fallback isn't used.
pull/12053/head
Peter Nelson 2024-02-10 23:29:42 +00:00
parent 7b32d9cff5
commit ad3c9ae1f1
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
1 changed files with 2 additions and 0 deletions

View File

@ -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;
} }