Commit Graph

470 Commits (a6cbf0d419569989d54f6df37232e9e771acafa8)

Author SHA1 Message Date
frosch 1e09854cb7 (svn r16679) -Codechange: Let GetCapacityOfArticulatedParts() return a CargoArray instead of a pointer to a static array. 15 years ago
frosch a288e4d82f (svn r16678) -Codechange: Turn CargoArray into a class, so one does not have to deal with sizeof() wrt. typedef-ed arrays. 15 years ago
frosch 812ad41f23 (svn r16676) -Codechange: Rename AcceptedCargo to CargoArray and its instances to more meaningful names. 15 years ago
yexo cc07a78577 (svn r16650) -Fix (r16649): missing () 15 years ago
yexo 2970b72e59 (svn r16649) -Fix: When the exact AI version a game was saved with is no longer available and the latest version of the AI can't load data from that AI version, use the latest available version of the AI that can load the data instead of the first found version that can load the data. 15 years ago
smatz 05c695a647 (svn r16646) -Codechange: rename GetDepotByTile() to Depot::GetByTile() 15 years ago
smatz 8343340acb (svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile() 15 years ago
smatz 0045096403 (svn r16640) -Codechange: move roadstop stuff to separate files 15 years ago
frosch b07ef35f44 (svn r16618) -Fix (r16614): Silence a warning. 16 years ago
yexo c7bd6c8d34 (svn r16614) -Codechange: Make the airport min/max available year a property of the Airport class.
-Change: rename station.always_small_airport to station.never_expire_airports to make it more future-proof
16 years ago
yexo d09d3566dd (svn r16585) -Add [NoAI]: AIBuoyList to get a list of all buoys 16 years ago
rubidium 512b021e26 (svn r16581) -Codechange: unify the access to Engine::lifelength. 16 years ago
yexo b3c3cf6e6d (svn r16563) -Fix [NoAI]: AIMarine::AreWaterTilesConnected didn't return true for bridge head<>neighbouring water tile 16 years ago
yexo f92feb2a95 (svn r16562) -Revert (r16561) 16 years ago
yexo 176e55a8a3 (svn r16561) -Fix [NoAI]: AIMarine::AreWaterTilesConnected didn't return true for bridge head<>neighbouring water tile 16 years ago
smatz bea3fe2b8b (svn r16559) -Codechange: introduce Company::IsValidAiID() and Company::IsValidHumanID(), don't use IsHumanCompany() where possible 16 years ago
smatz 8563b77fee (svn r16557) -Feature(tte) [NoAI][FS#2892]: mark dead AIs by red background in the AIDebug window 16 years ago
smatz 83e2df5b72 (svn r16556) -Codechange [NoAI]: use accessor for AIInstance::is_dead 16 years ago
yexo 726ba50868 (svn r16529) -Fix [NoAI]: StationIDs from oilrigs were not considered valid by the API. 16 years ago
smatz 0c10006907 (svn r16527) -Codechange: use static member functions instead of simple casts when converting Vehicle to specialised vehicle types. Includes safety check 16 years ago
rubidium ec3ef70adb (svn r16524) -Fix [FS#2963]: missing guards in the NoAI API making it possible to hit an assert in OpenTTD. 16 years ago
yexo 59ae226ab1 (svn r16522) -Fix [FS#2962]: possible assert in ai debug window when an AI was stopped an a human company took it's CompanyID 16 years ago
yexo ad5f018195 (svn r16520) -Fix [NoAI]: Make sure AIBridge::BuildBridge returns what the documentation says it does (r16244 for AIBridge) 16 years ago
rubidium caf98238e3 (svn r16510) -Doc: silence some (AI) doxygen warnings by adding comments about the appropriate things. 16 years ago
yexo 4ea3e511bd (svn r16502) -Fix [FS#2935]: when an AI was suspended while in a function called (indirectly) via call/acall/pcall OpenTTD crashed. Fix this by disallowing AIs to be suspended while called via call/acall/pcall.
IMPORTANT FOR AI WRITERS: AIs can no longer call any DoCommand functions (change anything, build vehicles, etc.) in a function called (indirectly) via call/acall/pcall. Where possible, please rewrite your code so it doesn't use call/acall/pcall
16 years ago
rubidium 765c65b738 (svn r16493) -Fix: missing/wrong @file doxygen 'headers' 16 years ago
alberth bab70a823d (svn r16491) -Codechange: Added parentheses around bitwise operators for code style. 16 years ago
smatz 7ee882d03f (svn r16441) -Codechange: new class SpecializedVehicle used as superclass for all vehicle types 16 years ago
yexo aa546e513f (svn r16440) -Fix [NoAI]: AIRail::GetRailStationDirection returned incorrect information 16 years ago
yexo 2a5a8f395c (svn r16433) -Codechange: Remove most of CmdSetAutoreplace and replace it with calls to CmdChangeCompanySetting 16 years ago
yexo 7425bf779d (svn r16425) -Change [FS#2869]: Stop an AI when it takes too long to initialize or load 16 years ago
rubidium 0d99b6c71c (svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it. 16 years ago
smatz b2aed51f8e (svn r16403) -Codechange: move code related to subsidies to separate file 16 years ago
yexo 0b243d25cb (svn r16400) -Add [NoAI]: add AISignList that can be used to get a list of valid signs. This makes AISign::GetMaxSignID obsolete. 16 years ago
rubidium 86710c5185 (svn r16397) -Codechange: move GetVehicleOrder/GetLastVehicleOrder into Vehicle 16 years ago
smatz b270ca84ba (svn r16395) -Fix (r16379): max sign ID can be higher than total number of signs 16 years ago
rubidium 6237fe1462 (svn r16394) -Codechange: move (NewGRF) cache variables into a separate struct so (some vehicle related) NewGRF cache 'desyncs' can be tested easier. 16 years ago
rubidium da5661a0c8 (svn r16393) -Codechange: move VehicleRail to Train. 16 years ago
rubidium 80e94b9bb1 (svn r16391) -Codechange: use Train instead of Vehicle where appropriate. 16 years ago
rubidium 7a37220881 (svn r16390) -Codechange: move u.road to RoadVehicle. 16 years ago
smatz 10d1ef5447 (svn r16379) -Codechange: remove GetNumTowns(), GetNumIndustries() and GetActiveCompanyCount(), use PoolItem::GetNumItems() instead 16 years ago
smatz 70aab8bf04 (svn r16354) -Codechange: use 'new' pool accessors and methods for Engine too 16 years ago
smatz 8808f3beea (svn r16352) -Codechange: use PoolItem::GetIfValid() instead of PoolItem::IsValidID() and PoolItem::Get() 16 years ago
smatz 0af27062c4 (svn r16349) -Codechange: rename IsPlainRailTile() to IsPlainRail(), introduce shiny new IsPlainRailTile() 16 years ago
rubidium e7dedf4e1b (svn r16332) -Codechange: replace some -1 + 1 with 'nothing' or <= .. - 1 with < .. - 1 (both caused due to wrapper functions) 16 years ago
smatz 871107f529 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 16 years ago
smatz ed1e54bd84 (svn r16326) -Codechange: replace GetPoolItemPoolSize() by PoolItem::GetPoolSize() 16 years ago
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 16 years ago
yexo 31eff1d4c3 (svn r16315) -Codechange: move the autorenew settings to a new CompanySettings struct 16 years ago
frosch 8ffb93c358 (svn r16311) -Fix: (Get|Set)TrackBits() is only valid for RAIL_TILE_NORMAL and _SIGNALS. 16 years ago
frosch bdf0b9491d (svn r16267) -Documentation: [NoAI] Explain how to deal with IDs of various objects. 16 years ago
frosch c6f08e1247 (svn r16266) -Documentation: [NoAI] Add details to AITile::(Raise|Lower)Tile wrt. modifiing multiple corners at once. 16 years ago
frosch 96dace426b (svn r16264) -Change/Fix (r16262): [NoAI] Change SLOPE_INVALID to 0xFFFF so that SLOPE_INVALID != (SLOPE_ELEVATED | SLOPE_STEEP | SLOPE_HALFTILE_MASK). 16 years ago
yexo 8d22e4bec3 (svn r16262) -Fix [NoAI]: Check slopes passed to the API better for validity 16 years ago
yexo a00b22b1cd (svn r16253) -Add [NoAI]: AIController::GetVersion, this returns the newgrf-version of OpenTTD 16 years ago
yexo 9b4a32deb4 (svn r16252) -Add [NoAI]: AIAirport::GetPrice, returning the building cost of an airport 16 years ago
yexo 73e1d18871 (svn r16249) -Fix [NoAI]: Enable parameter checking for AIController::* functions again 16 years ago
yexo afc5c66386 (svn r16244) -Fix [NoAI]: Make sure AITunnel::BuildTunnel returns what the documentation says it does 16 years ago
yexo ca435fcece (svn r16243) -Fix [FS#2875]: CmdBuildTunnel could be called with invalid parameters from the api code, causing crashes later 16 years ago
yexo fe5defbacc (svn r16239) -Fix (r16199): Use the stop/non-stop intermediate orderflags AIs can give for goto-depot orders 16 years ago
frosch d518b3d0ac (svn r16199) -Codechange: Pass OrderNonStopFlags also to MakeGoToDepotOrder().
-Fix: 'Go non-stop to nearest depot'-orders did not work wrt. the 'non-stop' part.
-Fix: Adding 'Go to nearest depot'-orders did not respect the default setting for 'non-stop'.
16 years ago
yexo bc8f31da4e (svn r16174) -Fix (r16093) [FS#2863]: crash when starting a game/loading a game with no AIs available. 16 years ago
yexo d63f01d78b (svn r16172) -Fix (r16171): typo (thanks SmatZ) 16 years ago
yexo 3578f4408c (svn r16171) -Add [NoAI]: two new error codes to AITile: ERR_AREA_ALREADY_FLAT and ERR_ESCAVATION_WOULD_DAMAGE. 16 years ago
frosch e04ddbe0ac (svn r16166) -Add [NoAI]: AITile::Get(Min|Max|Corner)Height 16 years ago
yexo 9101de49d8 (svn r16165) -Add [FS#2801] [NoAI]: several functions to AIOrder to check the what kind of order an order is.
-Fix: AIOrder::GetOrderDestination and AIOrder::GetOrderFlags didn't work on ORDER_CURRENT when the vehicle was loading/leaving in a station.
16 years ago
rubidium 7dd677ced2 (svn r16162) -Codechange: remove needless TC_ colours from DrawString when they are part of strings and add some colours to a few strings. 16 years ago
rubidium 53887e07bb (svn r16160) -Codechange: remove the need for explicit TC_FROMSTRING for DrawString. 16 years ago
yexo f0bc464b18 (svn r16158) -Codechange: fix the string alignment in all .hpp.sq files 16 years ago
yexo 660f90d37b (svn r16151) -Codechange: move some includes around to prevent including half the AI api in non-noai related code. 16 years ago
yexo 486e5b4bfe (svn r16150) -Fix [NoAI]: Change WAYPOINT_INVALID to 0xFFFF from -1 as that's the value the AIs got (due to casting).
Clarify some api documentation.
16 years ago
rubidium d8bc98d5de (svn r16149) -Fix [FS#2860]: when there's no AI and an AI is started... *boom* 16 years ago
rubidium 59d45a04d6 (svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible. 16 years ago
rubidium 2ec09d95a1 (svn r16114) -Cleanup: unify some more strings and remove some more unused strings 16 years ago
yexo 3949050714 (svn r16113) -Feature [NoAI]: Add UseAsRandomAI as function in info.nut. When an AI returns false, it'll never be chosen as random AI. 16 years ago
yexo 10c98f7e0e (svn r16109) -Fix [NoAI]: Make sure AIOrder::GetDestination always returns a tile belonging to the station 16 years ago
yexo 63db874050 (svn r16108) -Fix [NoAI]: When giving an aircraft a goto-hangar order don't let it be a normal goto-station order.
Note to AI writers: AIOrder.AppendOrder(vehicle_id, AIStation.GetLocation(station_id)) will give a goto-hangar order for helistations (assuming the station sign is at it's default location).
16 years ago
yexo 61d883e7e5 (svn r16107) -Add [NoAI]: AIOF_STOP_IN_DEPOT to the orderflags in AIOrder to allow stop-in-depot orders 16 years ago
yexo a664a2668c (svn r16106) -Fix [NoAI]: AIOrder::SetOrderFlags always removed "Service if needed" from goto-depot orders. 16 years ago
frosch 90ebf211dc (svn r16094) -Fix: AIDebug window profiled the blitters by invalidating itself unconditionally on repaint. OTOH it was not invalidated in other cases when needed. 16 years ago
yexo a91ff2d5e8 (svn r16093) -Feature [FS#2808]: Add GetURL() as possible function to info.nut. If AIs implement it, that url is shown when the AI crashes and also in the AI selection window. 16 years ago
yexo 3e2e5b097c (svn r16091) -Change [FS#2778]: Reverse the order of the lines in the AI debug window 16 years ago
frosch eb7414ea9e (svn r16062) -Fix (r16037): AIOrder::InsertOrder was broken. Default all AI orders to 'stop at far end'. 16 years ago
rubidium bee930f9b3 (svn r16024) -Codechange: harden string copying on places where it's possible 16 years ago
yexo 57dab45e75 (svn r15910) -Fix [FS#2777]: Clarify that TILE_INVALID is part of AIMap make doxygen output some documentation for it. 16 years ago
frosch f55be81e3c (svn r15901) -Add: AIIndustryType::IsBuiltOnWater(), HasHeliport() and HasDock(). Just like AIIndustry. 16 years ago
alberth 9d2738b9c4 (svn r15885) -Codechange: Removed new_size parameter of Window::OnResize() callback 16 years ago
yexo 50a6e589ed (svn r15881) -Fix (r15875): add an explicit cast so some compilers stop complaining. 16 years ago
yexo 400208ee0a (svn r15875) -Add: AIBridge::GetBridgeID() so AIs can get the type of bridge that are already build. 16 years ago
frosch 44351cdc57 (svn r15860) -Add: AIRoad::GetRoadVehicleTypeForCargo() to tell whether a certain cargo needs a bus- or a truckstop. 16 years ago
frosch 19b47c1e89 (svn r15859) -Documentation: Meaning of AICargo::CC_PASSENGERS wrt. bus- and truckstops, and meaning of AICargo::IsFreight() wrt. freight train weight multiplier. 16 years ago
yexo 809e4f398c (svn r15852) -Codechange: New widgets for the AI windows. 16 years ago
rubidium 3e93f8adda (svn r15844) -Codechange: allow text alignment to be forced so the console and ai debug output don't get swapped (those are untranslateable anyways) 16 years ago
yexo 84fb615344 (svn r15835) -Codechange: Prevent using the return value of DrawString as much as possible. 16 years ago
rubidium 22d4270ea8 (svn r15811) -Fix: left != right and as a result of that the ai debug window was kinda empty. 16 years ago
rubidium ead0a6a6e5 (svn r15806) -Codechange: pass both left and right to the vehicle details drawing functions instead of only the left. 16 years ago
rubidium d837fc4d03 (svn r15797) -Codechange: make users of the old DrawStringMultiLine use the new one. 16 years ago
frosch d452a0a0ec (svn r15789) -Codechange: Add DiagdirBetweenTiles() and use it. 16 years ago
rubidium 45f189fdca (svn r15785) -Codechange: remove the *Truncated part of the old text drawing API. 16 years ago
yexo 971ed8d2a3 (svn r15781) -Fix [NoAI]: Missing "AIs" in the information the debug AI prints. 16 years ago