Fix f7248539: Cargo reserved count not set in station goods entry save

This commit is contained in:
Jonathan G Rennison 2024-08-05 19:15:59 +01:00
parent 8450747010
commit 56fc3ec6ce

View File

@ -629,6 +629,11 @@ struct StationGoodsStructHandler final : public TypedSaveLoadStructHandler<Stati
SlSetStructListLength(NUM_CARGO);
for (GoodsEntry &ge : st->goods) {
if (ge.data != nullptr) {
_cargo_reserved_count = ge.data->cargo.ReservedCount();
} else {
_cargo_reserved_count = 0;
}
SlObjectSaveFiltered(&ge, this->GetLoadDescription());
}
}