Autoreplace: Add support for multi-cargo ships

This commit is contained in:
Jonathan G Rennison
2023-09-01 23:35:42 +01:00
parent 69b2ca9983
commit 7c28ee0213
7 changed files with 218 additions and 21 deletions

View File

@@ -495,7 +495,7 @@ static const uint MAX_REFIT_CYCLE = 256;
* @param dest_cargo_type Destination cargo type.
* @return the best sub type
*/
byte GetBestFittingSubType(Vehicle *v_from, Vehicle *v_for, CargoID dest_cargo_type)
byte GetBestFittingSubType(const Vehicle *v_from, Vehicle *v_for, CargoID dest_cargo_type)
{
v_from = v_from->GetFirstEnginePart();
v_for = v_for->GetFirstEnginePart();