ai_changelog.hpp File Reference
Lists all changes / additions to the API. More...
Lists all changes / additions to the API.
Only new / renamed / deleted api functions will be listed here. A list of bug fixes can be found in the normal changelog. Note that removed API functions may still be available if you return an older API version in GetAPIVersion() in info.nut.
- HasNext for all lists.
- AIAbstractList, use AIList instead.
- AIList::ChangeItem, use AIList::SetValue instead.
- AIRail::ERR_NONUNIFORM_STATIONS_DISABLED, that error is never returned anymore.
- AIBridge::GetPrice now returns the price of the bridge without the cost for the rail or road.
- AIOrder::ChangeOrder, use AIOrder::SetOrderFlags instead
- AIRail::RemoveRailStationTileRect, use AIRail::RemoveRailStationTileRectangle instead
- AIRail::RemoveRailWaypoint, use AIRail::RemoveRailWaypointTileRectangle instead
- AISign::GetMaxSignID, use AISignList instead
- AIStation::ERR_STATION_TOO_LARGE, use AIError::ERR_STATION_TOO_SPREAD_OUT instead
- AISubsidy::SourceIsTown, use AISubsidy::GetSourceType instead
- AISubsidy::GetSource, use AISubsidy::GetSourceIndex instead
- AISubsidy::DestinationIsTown, use AISubsidy::GetDestinationType instead
- AISubsidy::GetDestination, use AISubsidy::GetDestinationIndex instead
- AITile::GetHeight, use AITile::GetMinHeight/GetMaxHeight/GetCornerHeight instead
- AITown::GetMaxProduction, use AITown::GetLastMonthProduction instead
- AIVehicle::SkipToVehicleOrder, use AIOrder::SkipToOrder instead
- AIWaypoint::WAYPOINT_INVALID, use AIBaseStation::STATION_INVALID instead
- The GetName / SetName / GetLocation functions were moved from AIStation and AIWaypoint to AIBaseStation, but you can still use AIStation.GetName as before
- The GetConstructionDate function was moved from AIStation to AIBaseStation, but can still be used as AIStation.GetConstructionDate
- WaypointID was replaced by StationID. All WaypointIDs from previous savegames are invalid. Use STATION_INVALID instead of WAYPOINT_INVALID
- AIWaypointList constructor now needs a WaypointType similiar to AIStationList, it can also handle buoys.
- AIVehicleList_Station now also works for waypoints
- Stations can be build over rail without signals that is in the right direction for the to-be built station. It will also convert the rail if the station's rail type supports the old type.
- GetAPIVersion() was added as function to info.nut. If it does not exist API version 0.7 is assumed. This function should return the major and minor number of the stable version of the API the AI is written against. For 0.7.2 that would be 0.7, for 1.1.3 it would be 1.1, etc.
- The subsidy logic has changed. Subsidy is now awarded when cargo originating from subsidy source is delivered to station that has subsidy destination it its catchment area. One industry tile or one town house is enough as long as station accepts the cargo. Awarded subsidies are no longer bound to stations used for first delivery, any station can be used for loading and unloading as long as cargo is transfered from source to destination.
- Make AIEngine:CanRefitCargo() not report refittability to mail by default for aircraft. It is not necessarily true. This means that even if the aircraft can carry mail (as secondary cargo) it does not return true if the aircraft cannot carry it as its only cargo.
- Improve behaviour of (AIEngine|AIEventEnginePreview)GetCargoType() and AIEngine::CanRefitCargo() for articulated vehicles. For CanRefitCargo true is returned if at least one part can be refitted. For GetCargoType the first most used cargo type is returned.
- AIIndustryType::GetConstructionCost() now returns -1 if the industry is neither buildable nor prospectable.
- AIEngine::IsValidEngine will now return true if you have at least one vehicle of that type in your company, regardless if it's still buildable or not. AIEngine::IsBuildable returns only true when you can actually build an engine.
- AITile::GetCargoProduction will now return the number of producers, including houses instead the number of producing tiles. This means that also industries that do not have a tile within the radius, but where the search bounding box and the industry's bounding box intersect, are counted. Previously these industries (and their cargos), although they produced cargo for a station at the given location, were not returned.
- AIRail::BuildRail will now fail completely if there is an obstacle between the begin and end, instead of building up to the obstacle and returning that everything went okay.
- Orders for buoys are now waypoint orders, i.e. instead of using the station orders for buoys one has to use waypoint orders.
- Autoreplaces can now also be set for the default group via AIGroup.
- AIs are now killed when they execute a DoCommand or Sleep at a time they are not allowed to do so.
- When the API requests a string as parameter you can give every squirrel type and it will be converted to a string
- AIs can create subclasses of API classes and use API constants as part of their own constants
- DoCommands and sleeps in call, acall, pcall and valuators are disallowed
- GetURL() was added as optional function to info.nut
- UseAsRandomAI() was added as optional function to info.nut
- A limit was introduced on the time the AI spends in the constructor and Load function
- First stable release with the NoAI framework.