OpenTTD

Tasklist

FS#6633 - cargomonitor industry delivery

Attached to Project: OpenTTD
Opened by Ricardo (Samu) - Wednesday, 01 November 2017, 00:51 GMT
Type Bug
Category Core
Status New
Assigned To No-one
Operating System Windows
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

In the screenshot BusyBee tells me to deliver wood to the Sawmill to the left.
I built a Sawmill next to it, to the right, then sent a train delivering wood to both Sawmills.

The station is closest to the Sawmill to the right, and when inspecting both Sawmill, I see it being to the Sawmill on the right.
BusyBee, however, progresses my goal, believing I delivered wood to the Sawmill on the left.

I believe the bug is in cargomonitor.cpp. AddCargoMonitor / industry delivery

I attached my proposal for a fix.
This task depends upon

Comment by Ricardo (Samu) - Wednesday, 01 November 2017, 14:04 GMT
My fix is bugged, just noticed. Plz don't use.
Comment by Ricardo (Samu) - Wednesday, 01 November 2017, 16:27 GMT
savegame is 1.7.1
Comment by Ricardo (Samu) - Wednesday, 01 November 2017, 21:17 GMT
Second attempt, but I'm unsure if it's correct to get the amount from (*ip)incoming_cargo_waiting[cargo_index]

EDIT: Sorry, it's still bugged, don't use.
Comment by Ricardo (Samu) - Sunday, 05 November 2017, 13:17 GMT
Third attempt, a more elaborate fix. It may call AddCargoDelivery directly from DeliverGoodsToIndustry, if an industry accepts it. And if it's not, or part of it is not, the remaining part will call AddCargoDelivery a second time, from DeliverGoods instead.

Loading...