Commit Graph

131 Commits (97e6f3062e800afcff3ce3098e295059419052ae)

Author SHA1 Message Date
truebrain 75c4bd280a (svn r23359) -Codechange: move AI_VMSuspend to Script_Suspend (and to its own file) 13 years ago
truebrain bbd9facb44 (svn r23358) -Codechange: move AI_FatalError to Script_FatalError (and to its own file) 13 years ago
truebrain 99cb93ef6f (svn r23357) -Codechange: move AIStorage to ScriptStorage 13 years ago
truebrain 98103121d4 (svn r23355) -Codechange: rename all AI* to Script* (Rubidium) 13 years ago
truebrain 00877dd6d3 (svn r23352) -Add: support dynamically adding an API prefix when returning a C++ class to Squirrel 13 years ago
truebrain ef02931a32 (svn r23302) -Add: [NoAI] AITown::GetCargoGoal and AITown::GetGrowthRate to query statistics about a town regarding its growing 13 years ago
truebrain d03bbdd4ac (svn r23295) -Codechange: put ImportLibrary in AIController (and document the parameters for NoAI docs) 13 years ago
truebrain e9dfd7a897 (svn r23262) -Fix: one annoying typo in a squirrel_export marker line 13 years ago
truebrain b7a655bf4c (svn r23209) -Codechange: track the current active script instance directly, instead of assuming the current company points you to the right one. 13 years ago
rubidium c9a7f572ec (svn r23195) -Codechange: if we really need to cast away constness, use const_cast 13 years ago
yexo baf11cf401 (svn r23134) -Add [FS#3799]: [NoAI] AICargoList_StationAccepting 13 years ago
rubidium 65d0d19b16 (svn r23118) -Feature: [NoAI] Allow AIs to query the amount of remaining operations for the current tick 13 years ago
rubidium 7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 14 years ago
yexo 703ff560c1 (svn r21664) -Add: [NoAI] AIEventTownFounded 14 years ago
rubidium 090d6fb8b7 (svn r21311) -Fix [FS#4260]: AIs in an infinite loop in e.g. autosave, but also getting settings and such from info.nut, would not be interrupted after a while causing OpenTTD to seem to not respond 14 years ago
rubidium 30f2afac9b (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 14 years ago
yexo dc303e550b (svn r20563) -Change: [NoAI] rename AIAbstractList to AIList 14 years ago
yexo 6c7384cabd (svn r20562) -Change: [NoAI] Move all functions from AIList to AIAbstractList 14 years ago
yexo 613b273f36 (svn r20285) -Codechange: use ///< for single-line doxygen comments in the AI code 14 years ago
yexo 6d4900ed7c (svn r20271) -Doc: add doxygen comments to several items under src/ai/ 14 years ago
rubidium 062dd0e24c (svn r19814) -Codechange: give some more unnamed enums a name, in case they consisted of unrelated values use static const (u)int 14 years ago
smatz 3f961ca671 (svn r19775) -Fix: improper use of 'then' in few comments (ln) 14 years ago
yexo 8165737939 (svn r19544) -Feature [FS#3496]: add an input box to the AI Debug window where you can input a break string (patch by Zuu) 14 years ago
smatz f051066bc4 (svn r19224) -Codechange: change parameters passed to ShowErrorMessage() a bit 15 years ago
rubidium b1bd106703 (svn r18862) -Fix [FS#3544]: don't pass AI strings through iconv 15 years ago
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
rubidium 0e404038f2 (svn r18747) -Codechange: add some constness to the AI code 15 years ago
frosch 1ed599f5cf (svn r18725) -Add: [NoAI] AIWaypoint::WaypointType and AIWaypoint::HasWaypointType().
-Change: [NoAI] Constructor of AIWaypoint now takes a WaypointType to also handle buoys.
-Remove: [NoAI] AIBuoyList.
15 years ago
smatz a608fbaf7f (svn r18557) -Fix: (most of) gcc errors when using lto caused by some structs having different definition in different object files 15 years ago
alberth 44aacfc59f (svn r17928) -Codechange: ShowErrorMessage() now takes the summary string before the details string.
Gentlemen, swap your string parameters.
15 years ago
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 15 years ago
rubidium f2487381ce (svn r17545) -Fix [FS#3202]: [NoAI] AIs had 'infinite' time when running code from the global scope 15 years ago
rubidium 227824f753 (svn r17544) -Fix [FS#3202]: [NoAI] Crash when doing commands in the 'global' scope 15 years ago
rubidium f3f6eaa6dc (svn r17486) -Add [NoAI]: a vehicle list for all vehicle that are ordered to a specific depot 15 years ago
rubidium 4c84db1636 (svn r17345) -Fix [FS#2769]: one wasn't offered to take over bankrupt companies anymore; caused by the introduction NoAI, although NewAI had the same problem too. 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
yexo b71de3a377 (svn r17233) -Fix (r17232): typo 15 years ago
yexo 8839bdbefd (svn r17232) -Fix (r17223): Kill an AI when it tries to Sleep / execute a DoCommand during Save() instead of failing to save 15 years ago
yexo 0cb004e1d2 (svn r17231) -Fix [FS#3134]: AIs that crashed during Save() weren't killed as they should 15 years ago
yexo 14b5862c22 (svn r17230) -Fix (r15027): don't assert when an AI uses AI*Mode objects incorrectly but crash the AI instead 15 years ago
yexo a4afa140f3 (svn r17223) -Change [NoAI] [FS#2980]: Crash an AI when it uses a DoCommand / Sleep instead of just printing an error message in the AI Debug Window 15 years ago
yexo 67106dc063 (svn r17214) -Add [NoAI]: GetAPIVersion() as optional function in info.nut. Return "0.7" to get an api compatible (as much as possible) with the 0.7 api or "0.8" to get the latest api.
-Change [NoAI]: move all deprecated functions to a separate squirrel script that is only loaded if an AI requests an old API version.
15 years ago
yexo 5d0ae8ad47 (svn r17125) -Cleanup: remove an unused variable 15 years ago
rubidium 1fe3ad3288 (svn r17075) -Codechange: rename ~750 strings to be more uniform with their relatives 15 years ago
yexo 8c2709d97f (svn r17043) -Change [NoAI]: Load the API before compiling an AI script so AIs can subclass API classes and use API constants as part of their own constants 15 years ago
yexo 8c05194c02 (svn r17011) -Change [NoAI]: Add AIBaseStation as a parentclass for AIStation and AIWaypoint, and move GetName, SetName and GetLocation to AIBaseStation
Remove (nearly) all references to WaypointID and replace them with StationID
15 years ago
yexo f085d7775b (svn r16834) -Fix [FS#3034]: call the AI Save() function only once so AIs can't crash OpenTTD 15 years ago
yexo d09d3566dd (svn r16585) -Add [NoAI]: AIBuoyList to get a list of all buoys 15 years ago
smatz bea3fe2b8b (svn r16559) -Codechange: introduce Company::IsValidAiID() and Company::IsValidHumanID(), don't use IsHumanCompany() where possible 15 years ago
smatz 83e2df5b72 (svn r16556) -Codechange [NoAI]: use accessor for AIInstance::is_dead 15 years ago
yexo 7425bf779d (svn r16425) -Change [FS#2869]: Stop an AI when it takes too long to initialize or load 15 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. 15 years ago
smatz 871107f529 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 15 years ago
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 15 years ago
yexo bc8f31da4e (svn r16174) -Fix (r16093) [FS#2863]: crash when starting a game/loading a game with no AIs available. 15 years ago
rubidium d8bc98d5de (svn r16149) -Fix [FS#2860]: when there's no AI and an AI is started... *boom* 15 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. 15 years ago
yexo d2dae07595 (svn r15774) -Fix (r15708): Don't show the message about reporting an AI crash for the dummy AI. 15 years ago
yexo 2e6e2457f1 (svn r15708) -Feature [FS#2728]: Pop up the AI Debug Window if one of the AIs crashed and show a message that the user should report the crash. 15 years ago
yexo 13fb01d07d (svn r15668) -Fix: a few typos. 16 years ago
yexo ffe2caf20f (svn r15614) -Add [NoAI]: AIVehicleList_Group(group_id) and AIVehicleList_DefaultGroup(vehicle_type). 16 years ago
glx ab3fc1d437 (svn r15535) -Fix (r15460, pre noai merge): use '.' as 'any' for squirrel calls typechecking as stated in squirrel docs 16 years ago
yexo 07a37af14c (svn r15530) -Fix (r15519): The AIWaypoint classes were not exported to squirrel. 16 years ago
yexo c0e7ddeb9e (svn r15519) -Add [NoAI]: support for waypoints by adding AIRail::Build/Remove RailWaypoint, AIWaypoint and AIWaypointList. 16 years ago
yexo 8e14d77d05 (svn r15467) -Fix [NoAI]: AIs with an error in their info.nut are no longer available in-game. 16 years ago
yexo 1eeb0f6748 (svn r15440) -Fix: Backup AIObject::GetAllowDoCommand and restore the old value so AIs can't work around it. 16 years ago
frosch cb049e4e58 (svn r15359) -Add [NoAI]: AIEventVehicleCrashed::CRASH_RV_UFO, AIEventDisasterZeppelinerCrashed and AIEventDisasterZeppelinerCleared as aliens accepted NoAIs as competing life-form. 16 years ago
frosch 7f198507f7 (svn r15358) -Add [NoAI]: AIEventVehicleCrashed::GetCrashReason() 16 years ago
rubidium 1c30c8c801 (svn r15330) -Fix [FS#2597]: leaking of Squirrel when using circular references (by enabling the GC). 16 years ago
Yexo 101f55e65c (svn r15328) -Fix (r15327): Load(data, version) was called instead of Load(version, data). 16 years ago
Yexo 1892c34ac6 (svn r15327) -Fix (r15027): AIs could access the map and other data in their constructor and Load() function while the savegame was not completely loaded. 16 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
Yexo ea01534e6d (svn r15284) -Fix [FS#2582] (r15045): Parameters were popped from the squirrel stack twice. 16 years ago
glx 062f32a186 (svn r15270) -Change [API CHANGE]: remove AIEventTest 16 years ago
peter1138 dba9d60d3a (svn r15133) -Fix: Crash if no NoAIs are present. 16 years ago
truebrain 4bc7afae41 (svn r15124) -Fix: last memory leak related to NoAI 16 years ago
truebrain 94dd36d1ec (svn r15101) -Change [API CHANGE]: more consistant naming for consts:
INVALID_TOWN_RATING        -> TOWN_RATING_INVALID
   INVALID_TRANSPORT          -> TRANSPORT_INVALID
   INVALID_ORDER              -> ORDER_INVALID
   INVALID_GROUP              -> GROUP_INVALID
   GROUP_ALL/DEFAULT          -> ALL/DEFAULT_GROUP
   VEHICLE_RAIL/ROAD/..       -> VT_RAIL/ROAD/..
   MY_COMPANY                 -> COMPANY_SELF
   FIRST/LAST/INVALID_COMPANY -> COMPANY_FIRST/LAST/INVALID
16 years ago
truebrain 5119132dda (svn r15100) -Add [NoAI]: introduce TILE_INVALID as const 16 years ago
truebrain ef62688522 (svn r15095) -Add [NoAI]: allow AI Libraries to be in .tar files (subdir required, as with AIs
-Add [NoAI]: allow multiple versions of the same AI co-exist
-Change [NoAI]: updated the whole method of AI (Library) finding and loading; it is now much more clear and transparent
-Change [NoAI]: the name of the AI is now the name used by CreateInstance()
-Change [NoAI]: make the AI finder a bit more clever, mostly related to version finding
16 years ago
truebrain bcbbf2c366 (svn r15045) -Add [NoAI API CHANGE]: in info.nut you can now have (optional) a CanLoadFromVersion(version), which should return true/false, to indicate if you can load a savegame made with your AI of version 'version'
-Add [NoAI API CHANGE]: in main.nut the Load() function now should be Load(version, data), where 'version' is the version of your AI which made the savegame
-Codechange [NoAI]: various of function renames to make things more sane
-Add [NoAI]: push the 'version' of the AI through various of layers
-Codechange [NoAI]: various of code cleanups
-Add [NoAI]: store the version of the AI in the savegame too
16 years ago
truebrain a3dd7506d3 (svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
NoAI is an API (a framework) to build your own AIs in. See:
   http://wiki.openttd.org/wiki/index.php/AI:Main_Page
 With many thanks to:
  - glx and Rubidium for their syncing, feedback and hard work
  - Yexo for his feedback, patches, and AIs which tested the system very deep
  - Morloth for his feedback and patches
  - TJIP for hosting a challenge which kept NoAI on track
  - All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
16 years ago