Is possible to add some functions to the api?
1. In GSRoad is missing function IsOneway(), so I cannot check if the road on tile is one way or not.
2. How to get list of all companies, there is not GSCompayList()
3. Missing sign events, GSEventSignCreated and GSEventSignRenamed or GSEventSignChanged
Better NOGO NOAI api
Moderator: OpenTTD Developers
Re: Better NOGO NOAI api
#1 It looks like GSRoad.AreRoadTilesConnected() take into account one-way roads.
#2 can be solved by looping over all possible company numbers and checking if they are valid/existing. Loop from GSCompany.COMPANY_FIRST to GSCompany.COMPANY_LAST, and then you can use GSCompany.ResolveCompanyID and check the result for GSCompany.COMPANY_INVALID.
#2 can be solved by looping over all possible company numbers and checking if they are valid/existing. Loop from GSCompany.COMPANY_FIRST to GSCompany.COMPANY_LAST, and then you can use GSCompany.ResolveCompanyID and check the result for GSCompany.COMPANY_INVALID.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Who is online
Users browsing this forum: No registered users and 28 guests