Merge branch 'master' into jgrpp

# Conflicts:
#	src/console_cmds.cpp
#	src/date.cpp
#	src/economy.cpp
#	src/misc.cpp
#	src/newgrf_house.cpp
This commit is contained in:
Jonathan G Rennison
2020-01-29 19:32:06 +00:00
52 changed files with 787 additions and 84 deletions

View File

@@ -1263,15 +1263,14 @@ void CargoPayment::PayFinalDelivery(CargoPacket *cp, uint count)
*/
Money CargoPayment::PayTransfer(CargoPacket *cp, uint count)
{
Money profit = GetTransportedGoodsIncome(
Money profit = -cp->FeederShare(count) + GetTransportedGoodsIncome(
count,
/* pay transfer vehicle for only the part of transfer it has done: ie. cargo_loaded_at_xy to here */
DistanceManhattan(_settings_game.economy.feeder_payment_src_station ? cp->SourceStationXY() : cp->LoadedAtXY(), Station::Get(this->current_station)->xy),
/* pay transfer vehicle the difference between the payment for the journey from
* the source to the current point, and the sum of the previous transfer payments */
DistanceManhattan(cp->SourceStationXY(), Station::Get(this->current_station)->xy),
cp->DaysInTransit(),
this->ct);
if (_settings_game.economy.feeder_payment_src_station) profit -= cp->FeederShare(count);
profit = profit * _settings_game.economy.feeder_payment_share / 100;
/* For Infrastructure patch. Handling transfers between other companies */