Commit Graph

121 Commits

Author SHA1 Message Date
dP c73b88ddca
Fix: Don't send unused tile field over the network (#10507) 2023-02-24 22:50:11 +01:00
glx22 b080f24bd8 Codechange: move windows common to AI and GS out of ai_gui 2023-02-05 19:27:25 +01:00
Rubidium 4e65ec1dc4 Codechange: do not declare functions in blocks 2023-01-29 20:28:45 +01:00
Loïc Guilloux 2848483810
Fix #10206: Disable scripts in intro game (#10241) 2022-12-15 21:43:07 +01:00
Michael Lutz 3e85e833a7 Codechange: Add support for additional command result values. 2021-12-16 22:28:32 +01:00
Michael Lutz 8503854655 Codechange: Pass unpacked command arguments to command callbacks (except Script). 2021-12-16 22:28:32 +01:00
Michael Lutz eab18f06a4 Codechange: Pass additional data as byte stream to command callbacks. 2021-12-16 22:28:32 +01:00
Michael Lutz 4fc055d6e9 Codechange: Align parameter order of command callbacks to command handlers. 2021-12-16 22:28:32 +01:00
Michael Lutz a38bbefe1b Codechange: Untangle command code, flags and error string for DoCommand*. 2021-12-16 22:28:32 +01:00
glx 4079c47b6c Change: rewrote squirrel_export in CMake 2020-07-16 00:53:26 +02:00
Michael Lutz 1c0ba07c3c Add: [Script] Native priority queue; useful e.g. for pathfinders. 2020-06-01 21:35:13 +02:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
glx 12e43c697d Add: [Script] ScriptEventVehicleAutoReplaced. 2019-10-22 11:55:40 +02:00
glx22 b3fd787959 Fix #7188: check the validity of command callback for scripts (#7701) 2019-09-07 17:37:01 +01:00
Niels Martin Hansen 140a96b3a0 Change: Limit memory allocations for each Squirrel instance
This can avoid out-of-memory situations due to single scripts using up the entire address space.
Instead, scripts that go above the maximum are killed.
The maximum is default 1 GB per script, but can be configured by a setting.
2019-05-11 15:34:33 +02:00
peter1138 3293f08e0b Add: New RoadType API functions. 2019-05-01 21:36:27 +02:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
fonsinchen 2128f1e929 (svn r26893) -Feature: ScriptStationList_Cargo for sorting cargo by from and via 2014-09-21 16:20:48 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
rubidium 001fdc3682 (svn r25236) -Fix [FS#5547]: crash when AI is executing a command as it is bankrupted (removed from the game)
The command is placed in a queue for processing before it is bankrupted, after that the command
is executed. This command yields a failure because the company does not exist, but then it still
needs to call the callback. This callback tries to access the AI's virtual machine without any
checks, so it starts to read a just freed pointer and segfaults.
2013-05-12 13:12:55 +00:00
yexo 54aa43c81b (svn r24468) -Add [FS#5219]: API compatibility scripts for Goal Scripts (Hirundo) 2012-08-13 19:22:26 +00:00
frosch 95d3d6fdef (svn r24291) -Add: [Script] ScriptEventRoadReconstruction. 2012-05-26 14:16:45 +00:00
frosch 8dc553a039 (svn r24290) -Add: [Script] ScriptEventExclusiveTransportRights. 2012-05-26 14:16:38 +00:00
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 d7d89bc806 (svn r24108) -Fix [FS#5142]: When starting GS or AI, always use the settings of the game, not the new-game settings. 2012-04-09 12:35:01 +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 ac306fc138 (svn r23652) -Fix: don't include/document ScriptText for AIs. It is not usable 2011-12-21 15:06:00 +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 cc3f42794d (svn r23632) -Add: GSCompanyMode, to change company in GameScripts 2011-12-19 21:05:25 +00:00
michi_cc a085ea9e4b (svn r23506) -Add: [NoAI] Support for dealing with aircraft range. 2011-12-13 00:43:59 +00:00
rubidium 58423b26d1 (svn r23474) -Codechange: move the declaration error related functions to error.h 2011-12-10 13:54:10 +00:00
michi_cc 0e5e8fff12 (svn r23416) -Add: [NoAI] API for querying infrastructure costs. 2011-12-03 23:40:57 +00:00
truebrain a8b22e5292 (svn r23386) -Fix: debug script related events to 'script' (removes 'ai') 2011-12-01 12:04:10 +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 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 34d7f01ccc (svn r23364) -Codechange: refactor AIConfig, moving it mostly to Scriptconfig 2011-11-29 23:26:35 +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 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 ef02931a32 (svn r23302) -Add: [NoAI] AITown::GetCargoGoal and AITown::GetGrowthRate to query statistics about a town regarding its growing 2011-11-23 16:09:46 +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 e9dfd7a897 (svn r23262) -Fix: one annoying typo in a squirrel_export marker line 2011-11-19 15:42:40 +00:00
truebrain b7a655bf4c (svn r23209) -Codechange: track the current active script instance directly, instead of assuming the current company points you to the right one. 2011-11-13 20:43:48 +00:00
rubidium c9a7f572ec (svn r23195) -Codechange: if we really need to cast away constness, use const_cast 2011-11-12 08:37:12 +00:00