equal
deleted
inserted
replaced
960 SlObject(&_subsidies[index], _subsidies_desc); |
960 SlObject(&_subsidies[index], _subsidies_desc); |
961 } |
961 } |
962 |
962 |
963 int32 GetTransportedGoodsIncome(uint num_pieces, uint dist, byte transit_days, CargoID cargo_type) |
963 int32 GetTransportedGoodsIncome(uint num_pieces, uint dist, byte transit_days, CargoID cargo_type) |
964 { |
964 { |
965 CargoID cargo = cargo_type; |
|
966 const CargoSpec *cs = GetCargo(cargo_type); |
965 const CargoSpec *cs = GetCargo(cargo_type); |
967 byte f; |
966 byte f; |
968 |
967 |
969 /* zero the distance if it's the bank and very short transport. */ |
968 /* zero the distance if it's the bank and very short transport. */ |
970 if (_opt.landscape == LT_TEMPERATE && cs->label == 'VALU' && dist < 10) |
969 if (_opt.landscape == LT_TEMPERATE && cs->label == 'VALU' && dist < 10) |
985 } |
984 } |
986 } |
985 } |
987 } |
986 } |
988 if (f < 31) f = 31; |
987 if (f < 31) f = 31; |
989 |
988 |
990 return BIGMULSS(dist * f * num_pieces, _cargo_payment_rates[cargo], 21); |
989 return BIGMULSS(dist * f * num_pieces, _cargo_payment_rates[cargo_type], 21); |
991 } |
990 } |
992 |
991 |
993 static void DeliverGoodsToIndustry(TileIndex xy, CargoID cargo_type, int num_pieces) |
992 static void DeliverGoodsToIndustry(TileIndex xy, CargoID cargo_type, int num_pieces) |
994 { |
993 { |
995 Industry* best = NULL; |
994 Industry* best = NULL; |