How do I get a list of cargoes a station is willing to accept?
I'm trying to learn how to write an AI by starting with a helper AI that prints messages for stations which have a surplus of waiting goods and a deficit of deliveries. This is a first step towards an AI to help with routing in this thread:
http://www.tt-forums.net/viewtopic.php?f=32&t=70188
In the AI API docs for stations I don't see a way to get a list of what cargo the station is currently accepting:
http://noai.openttd.org/api/1.3.3/classAIStation.html
I'm digging through the AdmiralAI but it seems to establish the routes between industries and find/create stations as a secondary step. I'm still getting acquainted with it though.
Thanks
API for cargo the station accepts?
Moderator: OpenTTD Developers
Re: API for cargo the station accepts?
Use AICargoList_StationAccepting:
http://noai.openttd.org/docs/trunk/clas ... pting.html
http://noai.openttd.org/docs/trunk/clas ... pting.html
Re: API for cargo the station accepts?
Thanks! That should do the trick.
I was about to reply to my own post after finding the API request here:
http://wiki.openttd.org/AI:APISuggestions
I was about to reply to my own post after finding the API request here:
http://wiki.openttd.org/AI:APISuggestions
Who is online
Users browsing this forum: No registered users and 11 guests