Commit Graph

382 Commits

Author SHA1 Message Date
frosch
66a37e28a6 (svn r24289) -Add: [Script] Base class for script events involving a company and a town. 2012-05-26 14:16:32 +00:00
frosch
9ad9d72c4a (svn r24288) -Fix: squirrel_export should match stuff like 'virtual', 'static' and 'const' only as whole words. 2012-05-26 14:16:27 +00:00
frosch
5187c2b721 (svn r24286) -Add: [GS] Some more GSNews::NewsItem::NewsTypes. 2012-05-26 14:16:12 +00:00
frosch
a8c88f43b6 (svn r24284) -Codechange: Remove NewsSubtypes and directly use NewsTypes and NewsFlag instead. 2012-05-26 14:16:03 +00:00
frosch
8bce6453d3 (svn r24279) -Fix: Someone forgot a call to squirrel_export somewhen. 2012-05-26 08:19:33 +00:00
alberth
0db235aa1d (svn r24237) -Feature: Descriptions explaining the meaning of advanced settings. 2012-05-12 10:13:03 +00:00
rubidium
41e5c839e0 (svn r24179) -Codechange: move some variables of Town to TownCache 2012-04-25 20:50:13 +00:00
frosch
cd50c86294 (svn r24178) -Fix [FS#5110]: The object name from property A was not displayed in the object GUI. 2012-04-24 20:01:34 +00:00
rubidium
8d56856791 (svn r24152) -Fix [FS#5157]: [NoAI] Do not return the last 'cached' speed of vehicles when they are stopped/crashed 2012-04-18 19:21:54 +00:00
rubidium
eeb781b429 (svn r24151) -Fix: typo in script documentation 2012-04-18 19:03:12 +00:00
michi_cc
aa47d6c7f2 (svn r24127) -Feature [FS#1497]: Allow closing airports for incoming aircraft. (Based on patch by cirdan) 2012-04-17 19:43:18 +00:00
rubidium
25987e2e8b (svn r24121) -Merge: documentation update from 1.2 2012-04-15 18:59:04 +00:00
yexo
1f0593e7ca (svn r24029) -Change: [NoAI] make AIEngine::IsArticulated return true if the articulated callback flag is set, don't try to run the callback. 2012-03-14 20:49:54 +00:00
rubidium
22637f139f (svn r24008) -Cleanup/doc: try not to mention (No)AI in script APIs 2012-03-04 16:54:12 +00:00
rubidium
e6a828def1 (svn r24006) -Fix [FS#5088]: AI used in names in API for GSOrder 2012-03-04 16:40:06 +00:00
rubidium
a5cb454e94 (svn r23969) -Codechange: trunk heads to 1.3 now 2012-02-19 19:14:17 +00:00
michi_cc
f2c694c8fb (svn r23947) -Feature: Timetabled maximum travel speeds for non-flying vehicles. 2012-02-14 17:04:06 +00:00
smatz
b5525fd33d (svn r23941) -Add: support for clang 2012-02-12 21:17:32 +00:00
smatz
f79c388a1c (svn r23938) -Codechange: declare ScriptScanner::Initialize() and make it abstract, make the other overloaded Initialize() protected 2012-02-12 17:29:58 +00:00
rubidium
6356178a25 (svn r23936) -Feature [FS#5047]: readme/licence/changelog viewer for AI and game scripts (LordAro) 2012-02-12 10:58:18 +00:00
rubidium
e8dbcf9043 (svn r23932) -Codechange: split the NewGRF text window into its own source files 2012-02-12 10:32:41 +00:00
michi_cc
0542e26460 (svn r23931) -Change: Scale infrastructure cost of rail tracks by the total number of all tracks and not independently for each rail type. 2012-02-11 22:43:39 +00:00
rubidium
0e925c9e5e (svn r23927) -Fix [FS#5056]: 32bpp animated blitter was optimised a bit too far regarding not needing to update the colour mapping when (re)initialising the palette 2012-02-11 20:08:31 +00:00
rubidium
390003aa2d (svn r23925) -Fix (r23924): remove some remnants from generated files as well 2012-02-11 19:44:02 +00:00
rubidium
5417153982 (svn r23924) -Fix [FS#5054]: [NoGo] "Some" news messages would cause an assertion to be triggered due to a missing proper location for the viewport of the news message, so only allow building when valid data for the viewport is provided or no viewport is used 2012-02-11 19:42:33 +00:00
rubidium
60678d9757 (svn r23837) -Feature [FS#4994]: [NoGo] Allow querying orders of vehicles 2012-01-22 17:42:03 +00:00
rubidium
9f162e7115 (svn r23827) -Feature [FS#4992]: [NoGo] Allow to chose the goal question window's title from a (small) set of options 2012-01-21 12:03:55 +00:00
rubidium
70c7fbd90e (svn r23826) -Fix [FS#4972]: the detailed performance rating window showed the cargo count of the current quarter instead of the last quarter like the tooltip says 2012-01-20 20:18:19 +00:00
yexo
f5b6a9db5c (svn r23801) -Fix: reading the utf-8 BOM from AI/GS files on big-endian machines failed 2012-01-15 11:31:34 +00:00
rubidium
df963509f6 (svn r23778) -Fix [FS#4957]: trim all control codes and the likes from strings being passed into the AI. If the AI would be displaying them later we would be showing those control codes as question marks. 2012-01-08 21:51:08 +00:00
rubidium
4479f90843 (svn r23777) -Codechange: refactor allocating memory and fetching strings into a single function for scripts 2012-01-08 21:48:05 +00:00
smatz
24bf6ea495 (svn r23770) -Fix: compilation with GCC 4.7 2012-01-07 18:37:22 +00:00
frosch
fa0949577e (svn r23760) -Feature: Allow readonly display of NewGRF parameters, if GRF list may not be edited. 2012-01-05 20:03:15 +00:00
rubidium
6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 2012-01-03 21:32:51 +00:00
truebrain
d880056415 (svn r23739) -Fix (r23738): owh vim, when can you learn to copy/paste tabs correctly? 2012-01-03 20:41:38 +00:00
truebrain
ecb725b34b (svn r23738) -Fix (r23731): forgot to sync the new window with the script API 2012-01-03 20:38:41 +00:00
rubidium
e40eb8177a (svn r23735) -Codechange: remove ~50 includes from headers that weren't needed 2012-01-03 20:26:05 +00:00
truebrain
34d90da509 (svn r23731) -Add: add GSGoal::Question(), to ask a question to a(ll) company(ies). It can contain random text, and at most 3 buttons from a collection of 17 2012-01-03 16:36:24 +00:00
truebrain
ac306fc138 (svn r23652) -Fix: don't include/document ScriptText for AIs. It is not usable 2011-12-21 15:06:00 +00:00
yexo
5988659eea (svn r23651) -Feature: [NoGo] GSText now accepts string arguments as parameters to the constructor 2011-12-21 14:55:28 +00:00
yexo
a55478aaa6 (svn r23650) -Fix: wrong functions were filtered for AI/GameScript doxygen documentation 2011-12-21 14:30:08 +00:00
truebrain
e1f04b89c3 (svn r23648) -Revert (r23646): partial revert; nobody has to know about my local changes and attempts 2011-12-21 12:28:02 +00:00
truebrain
da8777d4e5 (svn r23646) -Fix [FS#4901]: rescan the Game Scripts when done downloading one. 2011-12-21 12:25:10 +00:00
truebrain
1c9bec1999 (svn r23640) -Fix: stop using FORCEINLINE (1/3rd of the instances were, the others were still regular inline), but make sure inline is always a 'forced' inline (I am looking at you MSVC) 2011-12-20 17:57:56 +00:00
truebrain
102f811d02 (svn r23636) -Add: introduce ScriptText in parameters where it can be used 2011-12-19 21:06:06 +00:00
truebrain
b0ac529a6f (svn r23635) -Add: introduce GSText, to allow translating GameScript text, even over network 2011-12-19 21:05:57 +00:00
truebrain
9b6b2cabc1 (svn r23633) -Add: allow most build commands from GameScript given a CompanyMode is active in that scope 2011-12-19 21:05:36 +00:00
truebrain
cc3f42794d (svn r23632) -Add: GSCompanyMode, to change company in GameScripts 2011-12-19 21:05:25 +00:00
truebrain
403cd3acdb (svn r23631) -Add: ScriptWindow, to manipulate windows on the client (GameScript only) 2011-12-19 21:05:14 +00:00
truebrain
3ada3b9cc5 (svn r23630) -Add: a Goal GUI to show your current goals 2011-12-19 21:03:17 +00:00
truebrain
084f4e6aac (svn r23629) -Add: allow ScriptRoad::BuildRoad, ScriptBridge::BuildBridge (for roads) and ScriptTunnel:BuildTunnel (for roads) to work for GameScript 2011-12-19 21:02:33 +00:00
truebrain
5858c53420 (svn r23628) -Add: ScriptSubsidy::Create, to create subsidies (GameScript only) 2011-12-19 21:01:12 +00:00
truebrain
e0ffe4faf2 (svn r23627) -Add: ScriptNews::Create, to create custom news messages (GameScript only) 2011-12-19 21:01:03 +00:00
truebrain
ad48ab9237 (svn r23626) -Add: ScriptTown::SetText, which adds custom text to the Town GUI 2011-12-19 21:00:55 +00:00
truebrain
894216083d (svn r23625) -Add: ScriptViewport::ScrollTo, for SinglePlayer only (GameScript only) 2011-12-19 21:00:48 +00:00
truebrain
d85a628dde (svn r23624) -Add: ScriptVehicle/ScriptStation/ScriptSign::GetOwner, to get the owner of those objects (GameScript only) 2011-12-19 21:00:40 +00:00
truebrain
3a535690d4 (svn r23623) -Add: allow bi-directional communication with the AdminPort and GameScript 2011-12-19 21:00:32 +00:00
truebrain
77b7366c29 (svn r23622) -Add: a set of events to trigger in a GameScript 2011-12-19 20:59:36 +00:00
truebrain
e7cd301d3c (svn r23621) -Add: allow manipulation of signs via GameScripts 2011-12-19 20:59:29 +00:00
truebrain
afcf07ac8a (svn r23620) -Add: ScriptTown::SetCargoGoal and ScriptTown::SetGrowthRate (GameScript only) 2011-12-19 20:59:19 +00:00
truebrain
c7c1deaf41 (svn r23619) -Add: ScriptDate::GetSystemTime, to get the seconds since 1 Jan 1970 of the real system (GameScript only) 2011-12-19 20:59:12 +00:00
truebrain
55de5d336c (svn r23618) -Add: ScriptGame::Pause, ScriptGame::Unpause, and ScriptGame::GetLandscape (GameScript only) 2011-12-19 20:58:59 +00:00
truebrain
5ff98b45c1 (svn r23617) -Add: ScriptTown::ExpandTown, to grow a town (GameScript only) 2011-12-19 20:57:51 +00:00
truebrain
e53b2f2ab0 (svn r23616) -Add: ScriptGameSettings::SetValue, to set gamesettings (GameScript only) 2011-12-19 20:57:43 +00:00
truebrain
9359c6fc47 (svn r23615) -Add: more API functions exposed to NoGo (part 2) 2011-12-19 20:57:34 +00:00
truebrain
436cf09923 (svn r23614) -Add: more API functions exposed to NoGo (part 1) 2011-12-19 20:57:23 +00:00
truebrain
1616961ea2 (svn r23613) -Add: allow IsDeveloperOnly in info.nut, to indicate if you can select this GS via the GUI (optional, defaults to false) 2011-12-19 20:57:08 +00:00
truebrain
963802e9a7 (svn r23612) -Add: allow importing libraries in the same way as AI does, only with GS prefix (and in game/library) 2011-12-19 20:56:59 +00:00
truebrain
83f2785f54 (svn r23611) -Add: run the begin of the script already while generating, and don't sleep on DoCommand while doing so 2011-12-19 20:56:50 +00:00
truebrain
cbe43abe5d (svn r23610) -Add: Doxygen files for NoGo API (Yexo) 2011-12-19 20:56:42 +00:00
truebrain
b4f832f29f (svn r23605) -Add: GAME_DIR and CONTENT_TYPE_GAME, and read gamescript from that directory 2011-12-19 20:54:37 +00:00
truebrain
12aa5b6a58 (svn r23604) -Add: initial support for GameScripts 2011-12-19 20:50:54 +00:00
truebrain
e75153d8ac (svn r23597) -Codechange: fix up squirrel export script a bit 2011-12-19 20:44:31 +00:00
rubidium
3d88c74389 (svn r23526) -Codechange: unify cargos vs cargoes 2011-12-15 21:56:00 +00:00
rubidium
18d929aa21 (svn r23521) -Codechange: use the actual enum values from the 'core' in the API when they refer to the in-game values in the cases where that is possible and sensible 2011-12-15 18:40:15 +00:00
rubidium
bb564bc34d (svn r23520) -Fix-ish: wrong @param name causing missing documentation 2011-12-15 18:36:29 +00:00
rubidium
1eb17c8307 (svn r23519) -Change: do not export enum values in the AI documentation 2011-12-15 18:35:46 +00:00
frosch
dad042585c (svn r23516) -Fix [FS#4886]: ScriptSign::BuildSign() returned wrong result if the sign name was too long. 2011-12-14 20:26:54 +00:00
frosch
0a7b49e398 (svn r23515) -Cleanup: Remove unused ScriptObject::GetNewTunnelEndtile() and relatives. 2011-12-14 20:13:18 +00:00
frosch
7f3227cd5c (svn r23514) -Fix: squirrel_export.sh failed for svn working copies. 2011-12-14 19:59:49 +00:00
michi_cc
a085ea9e4b (svn r23506) -Add: [NoAI] Support for dealing with aircraft range. 2011-12-13 00:43:59 +00:00
truebrain
a8960f64be (svn r23486) -Fix (r22764): 3 for the price of 1: fix up ScriptTile::GetTownAuthority() (tnx to Torrasque for reporting) 2011-12-10 21:07:04 +00:00
yexo
c9be5d50da (svn r23461) -Fix: handle a missing airport newgrf as graceful as possible by not crashing when loading such savegame or when an airport is removed 2011-12-09 19:30:30 +00:00
yexo
b5d707b7a0 (svn r23453) -Add: [NoAI] AIStation.GetStationCoverageRadius(StationID) 2011-12-08 23:28:43 +00:00
yexo
ca57514b9f (svn r23452) -Codechange: document instead of writing to stderr that ScriptStation::GetCoverageRadius doesn't work for STATION_AIRPORT 2011-12-08 23:28:02 +00:00
rubidium
de46e9647b (svn r23441) -Fix [FS#4764]: some airport functions didn't take the layout into account resulting in wrong noise levels or nearests towns (patch by Zuu) 2011-12-06 21:02:57 +00:00
yexo
52c3e45cf1 (svn r23439) -Fix: Use the DEBUG macro to output the reason for a compile failure in info.nut instead of printing it directly to stderr 2011-12-06 15:09:02 +00:00
truebrain
4df85af950 (svn r23431) -Fix: typo in @param variable 2011-12-04 15:48:15 +00:00
michi_cc
0e5e8fff12 (svn r23416) -Add: [NoAI] API for querying infrastructure costs. 2011-12-03 23:40:57 +00:00
truebrain
13c3993e86 (svn r23397) -Change: remove the AI_ prefix from all AIEvent enums 2011-12-02 23:40:16 +00:00
truebrain
c3026bc601 (svn r23396) -Fix: squirrel export script did not ignore Doxygen blocks, causing funny results in some corner cases 2011-12-02 23:40:09 +00:00
yexo
1bc1a41937 (svn r23392) -Fix: [NoAI] assigning 'null' to an AIList element to remove it didn't work 2011-12-01 22:23:13 +00:00
truebrain
9dde1287aa (svn r23387) -Fix: move ai.script_max_opcode_till_suspend to script.script_max_opcode_till_suspend 2011-12-01 12:04:22 +00:00
truebrain
a8b22e5292 (svn r23386) -Fix: debug script related events to 'script' (removes 'ai') 2011-12-01 12:04:10 +00:00
truebrain
eab19b9ff3 (svn r23378) -Fix: set SVN properties correctly 2011-11-30 14:02:15 +00:00
truebrain
0f9954ec1b (svn r23374) -Add: Doxygen files for the NoAI API (Yexo) 2011-11-29 23:31:55 +00:00
truebrain
7158aaea31 (svn r23373) -Add: move the AI API to script/api/ai, and move the Squirrel C++ glue templates to script/api/template 2011-11-29 23:29:20 +00:00
truebrain
e60747a604 (svn r23372) -Move: move squirrel export script to script/api/ 2011-11-29 23:29:12 +00:00
truebrain
549e072041 (svn r23371) -Change: rename the DOXYGEN_AI_DOCS tag to DOXYGEN_API 2011-11-29 23:27:34 +00:00
truebrain
4d91f645c1 (svn r23370) -Add: support @api tag in API header files, to select which API should receive the defined classes and functions 2011-11-29 23:27:26 +00:00
truebrain
2c877b074e (svn r23369) -Codechange: use script includes when possible, not ai includes 2011-11-29 23:27:17 +00:00
truebrain
e0d4c75cf4 (svn r23368) -Codechange: move FindLibrary down a few layers, so there is no layer violation anymore 2011-11-29 23:27:08 +00:00
truebrain
880f377fa6 (svn r23367) -Codechange: refactor GetSetting to ScriptInstance, to avoid global variable in script_controller 2011-11-29 23:27:01 +00:00
truebrain
3e6d026129 (svn r23366) -Codechange: move most of the Dummy code to script/, unifying it 2011-11-29 23:26:52 +00:00
truebrain
4505edbd47 (svn r23365) -Codechange: move constants to a single place, to avoid duplication (and in time, different values) 2011-11-29 23:26:44 +00:00
truebrain
34d7f01ccc (svn r23364) -Codechange: refactor AIConfig, moving it mostly to Scriptconfig 2011-11-29 23:26:35 +00:00
truebrain
c38c16773c (svn r23363) -Documentation: document a tiny bit better what is in variables 2011-11-29 23:21:59 +00:00
truebrain
e37149a1de (svn r23362) -Codechange: refactor AIScanner, splitting it in AIScannerInfo and AIScannerLibrary 2011-11-29 23:21:52 +00:00
truebrain
ae8540f5e0 (svn r23361) -Codechange: move multiplayer DoCommand callback code so other script users can call their own 2011-11-29 23:21:42 +00:00
truebrain
3da8b5097a (svn r23360) -Codechange: move AIInstance to ScriptInstance, making it reusable by other script API instances 2011-11-29 23:21:33 +00:00
truebrain
75c4bd280a (svn r23359) -Codechange: move AI_VMSuspend to Script_Suspend (and to its own file) 2011-11-29 23:21:24 +00:00
truebrain
bbd9facb44 (svn r23358) -Codechange: move AI_FatalError to Script_FatalError (and to its own file) 2011-11-29 23:21:13 +00:00
truebrain
99cb93ef6f (svn r23357) -Codechange: move AIStorage to ScriptStorage 2011-11-29 23:21:04 +00:00
truebrain
98103121d4 (svn r23355) -Codechange: rename all AI* to Script* (Rubidium) 2011-11-29 23:15:35 +00:00
truebrain
afdb67a353 (svn r23354) -Codechange: move all src/ai/api/ai_*.[hc]pp files to src/script/api/script_* (Rubidium) 2011-11-29 23:07:38 +00:00
truebrain
00877dd6d3 (svn r23352) -Add: support dynamically adding an API prefix when returning a C++ class to Squirrel 2011-11-29 22:24:30 +00:00
truebrain
bff7c33aa9 (svn r23350) -Add: support different ScriptTypes in the helper functions for GetClassName (Rubidium) 2011-11-29 22:23:33 +00:00
truebrain
d03bbdd4ac (svn r23295) -Codechange: put ImportLibrary in AIController (and document the parameters for NoAI docs) 2011-11-23 13:39:36 +00:00
truebrain
492c96d214 (svn r23294) -Codechange: sq_pop in native callback is just a waste of CPU cycles, as the top is reset in all cases 2011-11-23 13:38:35 +00:00
truebrain
54ec3a2a3f (svn r23293) -Codechange: make LoadScript/LoadFile non-static 2011-11-23 13:37:48 +00:00
truebrain
32b28bb868 (svn r23264) -Fix (r23263): save before commit 2011-11-19 15:51:21 +00:00
truebrain
b927ae5be9 (svn r23263) -Documentation: stop naming AI in comments in script/ files; it makes no sense 2011-11-19 15:50:10 +00:00
rubidium
160294ff22 (svn r23216) -Codechange: introduce the concept of having different tar lists 2011-11-14 21:28:43 +00:00
rubidium
3f7eb71b17 (svn r23210) -Codechange: generate the GetClassName function for the AI classes programmatically 2011-11-13 20:52:39 +00:00
rubidium
7fd1e1df81 (svn r23198) -Codechange: introduce a free that takes const pointers so we don't need to cast to void/non-const before being able to free 2011-11-12 13:00:29 +00:00
rubidium
65d0d19b16 (svn r23118) -Feature: [NoAI] Allow AIs to query the amount of remaining operations for the current tick 2011-11-04 23:20:14 +00:00
yexo
02913f40b0 (svn r23117) -Fix: [NoAI] calling require() to include a file gave you 100.000 opcodes for free 2011-11-04 23:14:23 +00:00
rubidium
748bddb31a (svn r22906) -Fix (r22905): variable not properly cleared before use 2011-09-08 10:02:43 +00:00
rubidium
62777dbd84 (svn r22905) -Fix [FS#4753] (r22836): the name of the tar was removed from the AI filenames, so record it differently. Also removes some of the hackery to get the tar's filename 2011-09-08 09:55:04 +00:00
rubidium
414c397000 (svn r22904) -Codechange: add tar filename to file scanning 2011-09-08 09:48:52 +00:00
michi_cc
65637d8941 (svn r22874) -Fix [FS#4747]: Check size of various buffers before allocation. (monoid) 2011-09-02 20:16:41 +00:00
rubidium
d839aa0475 (svn r22836) -Codechange: simplify the scanning of (AI) scripts 2011-08-25 10:37:28 +00:00
rubidium
5a620d1c65 (svn r22406) -Document: some more "random-ish" tidbits 2011-05-01 19:51:52 +00:00
rubidium
e9fe58d7bf (svn r22120) -Change: [NoAI] Prevent AIs from getting consistently over their allowed amount of operations by subtracting the amount they went over "budget" from the budget for the next "tick". 2011-02-20 20:28:49 +00:00
alberth
7303f7d199 (svn r21595) -Codechange: Some header files had their name changed, update the ifndef/define/endif lines. 2010-12-22 11:46:41 +00:00
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 2010-11-24 17:00:37 +00:00
rubidium
30f2afac9b (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 2010-08-26 22:01:16 +00:00
rubidium
1fa98e1695 (svn r20574) -Codechange: a little over 1 million vehicles should be enough for the forseeable future 2010-08-19 20:58:30 +00:00
rubidium
8a2fecbff5 (svn r19776) -Change: don't scan for tars in the script scanner; it has already happened. 2010-05-10 09:35:25 +00:00
smatz
23041d9720 (svn r19509) -Codechange: remove superfluous semicolons after function definitions 2010-03-23 22:37:18 +00:00
rubidium
b1bd106703 (svn r18862) -Fix [FS#3544]: don't pass AI strings through iconv 2010-01-18 15:41:38 +00:00
rubidium
82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
rubidium
b2e9b5d612 (svn r18683) -Fix: it's not an other 2010-01-01 18:45:40 +00:00
smatz
061de2b2df (svn r18555) -Fix (r15027): fake definitions of squirrel types were wrong for eg. 64bit systems, don't use them 2009-12-19 23:46:15 +00:00
rubidium
73df2c7a25 (svn r18418) -Fix [FS#3298]: under some circumstances a pointer could be left untouched and then freed. Make sure this doesn't happen by ensuring it starts out as NULL instead of 'garbage'. 2009-12-06 20:22:21 +00:00
rubidium
6cfeb1920f (svn r18038) -Fix [FS#3290] (r17402): AIs failed to load their data from savegames by crashing them when they tried 2009-11-11 18:13:17 +00:00
rubidium
d79439fb3c (svn r17963) -Codechange: some documentation style 2009-11-03 17:30:08 +00:00
rubidium
d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
rubidium
e8ddf001c8 (svn r17570) -Fix: a number of Doxygen warnings about missing parameters, which were sometimes missing and sometimes just typos 2009-09-19 09:51:14 +00:00
rubidium
f2487381ce (svn r17545) -Fix [FS#3202]: [NoAI] AIs had 'infinite' time when running code from the global scope 2009-09-15 16:18:10 +00:00
yexo
ca6c4ee98a (svn r17498) -Add [NoAI]: Enable the squirrel std math library 2009-09-10 20:19:12 +00:00
Yexo
48e1a5a350 (svn r17402) -Fix (r16425): During every save a few slots on the squirrel stack were leaked 2009-09-03 11:32:16 +00:00
rubidium
7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
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 2009-08-19 16:14:15 +00:00
yexo
5a863925ee (svn r17221) -Change [NoAI] [FS#3101]: when the API requests a string as parameter allow every squirrel type and convert to a string 2009-08-19 14:54:52 +00:00
rubidium
5186d1d4f6 (svn r17013) -Fix [FS#3074]: concatenating strings in Squirrel when non-ASCII strings were received from OpenTTD failed. The number of bytes in an UTF-8 encoded string isn't always the same as the number of characters in the decoded (into wchars) string 2009-07-31 23:13:53 +00:00
yexo
c2ed884012 (svn r17005) -Add [NoAI]: AIAbstractList::SORT_ASCENDING / SORT_DESCENDING 2009-07-31 19:50:01 +00:00
yexo
f085d7775b (svn r16834) -Fix [FS#3034]: call the AI Save() function only once so AIs can't crash OpenTTD 2009-07-15 19:47:06 +00:00
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
2009-06-01 22:00:47 +00:00
rubidium
765c65b738 (svn r16493) -Fix: missing/wrong @file doxygen 'headers' 2009-06-01 12:56:18 +00:00
smatz
c03ce4b1c7 (svn r16492) -Remove: support for gcc2. It hasn't been able to compile OTTD for months. All attempts to do another workaround failed. 2009-06-01 11:49:46 +00:00
yexo
7425bf779d (svn r16425) -Change [FS#2869]: Stop an AI when it takes too long to initialize or load 2009-05-25 21:55:47 +00:00
rubidium
21f5f602f9 (svn r16222) -Fix: unneeded pointer dereferencing 2009-05-03 21:56:46 +00:00
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. 2009-04-21 19:13:32 +00:00
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. 2009-04-19 15:14:23 +00:00
yexo
384599ef2c (svn r15743) -Codechange: move the definitions of some fake squirrel types to their own file. 2009-03-16 17:30:49 +00:00
yexo
ce4744e1d6 (svn r15736) -Codechange: Split AIScanner/AIFileInfo to the more generic classes ScriptScanner/ScriptFileInfo. 2009-03-15 22:41:57 +00:00
yexo
13fb01d07d (svn r15668) -Fix: a few typos. 2009-03-11 07:32:31 +00:00
yexo
b520d73285 (svn r15629) -Fix (r15027): Validate strings that are passed from squirrel to the API, not strings passed from the API to squirrel. 2009-03-06 14:21:26 +00:00
yexo
cabfe35e54 (svn r15558) -Cleanup: Remove some unnecessary friend declarations. 2009-02-23 19:35:19 +00:00
glx
ab3fc1d437 (svn r15535) -Fix (r15460, pre noai merge): use '.' as 'any' for squirrel calls typechecking as stated in squirrel docs 2009-02-21 00:43:18 +00:00
yexo
7dc607b2d1 (svn r15531) -Fix (r15467): AIs were stopped at every error, whether they caught it or not. 2009-02-20 13:39:18 +00:00
yexo
8e14d77d05 (svn r15467) -Fix [NoAI]: AIs with an error in their info.nut are no longer available in-game. 2009-02-13 17:17:34 +00:00
rubidium
e1b1fd18b5 (svn r15406) -Fix: make Valuate actually cost a few opcodes to not make it a single opcode method of doing lots of the same thing. This should resolve most of the hiccups caused by AIs. 2009-02-08 01:51:48 +00:00
rubidium
1c30c8c801 (svn r15330) -Fix [FS#2597]: leaking of Squirrel when using circular references (by enabling the GC). 2009-02-03 22:42:42 +00:00
glx
6d6e2232ea (svn r15316) -Fix [NoAI]: ignore unprintable chars when returning a string to squirrel 2009-02-02 13:46:26 +00:00
Yexo
decd0c51e4 (svn r15222) -Fix: The squirrel stack was corrupted if an AI called any C++ function during Save(). 2009-01-23 10:30:50 +00:00
Yexo
0d52f3b417 (svn r15204) -Fix (r15167): The check was a bit too restrictive, the top of the stack needs to be resetted if another function is called while the AI is running but not suspended. 2009-01-22 02:01:07 +00:00
Yexo
eab990901b (svn r15167) -Fix [FS#2558]: The top of the stack was resetted after executing the first Ai tick causing random AI crashes. 2009-01-20 14:11:58 +00:00
smatz
7cea618fcc (svn r15061) -Fix (r15027): three files were missing the Id header 2009-01-13 15:49:32 +00:00
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
2009-01-13 01:46:46 +00:00
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
2009-01-12 17:11:45 +00:00