[GS] GetTownPickupAmount not work with all cargo types

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Post Reply
idioty
Engineer
Engineer
Posts: 59
Joined: 21 Jun 2010 11:54

[GS] GetTownPickupAmount not work with all cargo types

Post by idioty »

I created a script, when I need to monitor all company's picked up cargos. I tried with IORE. The town delivery is work, but the town pickup does'nt work in same town. I know that pickup is working after delivery.

local townpickup = GSCargoMonitor.GetTownPickupAmount(subscriber.company_id, subscriber.cargo_id, town_id, true);
local towndelivery = GSCargoMonitor.GetTownDeliveryAmount(subscriber.company_id, subscriber.cargo_id, town_id, true);

The townpickup variable remaining 0, while the towndelivery showed the correct result.

I tried with passengers and worked it in same town.
I tried with IORE transport to other city and does'nt worked.

So, the delivery is working with all cargo types but the pickup is only with TownEffect cargo types?
The TownEffect is not included in the documentation of GSCargoMonitor.GetTownPickupAmount.
I also tried with nightly and stable 1.3.2 version.
Sorry my bad english, I don't speak english!
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 28 guests