Commit Graph
63 Commits
Author SHA1 Message Date
Rubidiumandrubidium42 98c9297134 Add: scoped enum support for scripts 2026-05-19 16:14:40 +02:00
Rubidiumandrubidium42 6370859c7e Codechange: add missing documentation to destructors 2026-02-24 16:24:53 +01:00
Rubidiumandrubidium42 e0d2843fd7 Codechange: add parameter and return documentation the Squirrel wrappers 2026-02-21 15:03:20 +01:00
Jonathan G RennisonandPeter Nelson 33c967a558 Codechange: [Script] Add helpers for script memory allocation accounting 2025-12-23 20:52:24 +00:00
Rito12andrubidium42 859b56a066 Doc: Correct file descriptions to match coding style and doxygen. 2025-12-15 17:31:00 +01:00
glx22andLoïc Guilloux 81b4075095 Add: [Script] Framework to make selected native calls suspendable 2025-12-11 23:30:27 +01:00
Cyprian KlimaszewskiandGitHub 99f04f27de Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-07 11:25:08 +00:00
Michael Lutz 313c6c45aa Add: [Script] Function to get all rail types of an rail engine. 2025-09-14 17:11:26 +02:00
Rubidiumandrubidium42 0bc773215e Codechange: use std::optional<std::string_view> to make the intent of function clearer 2025-05-03 23:02:09 +02:00
Rubidiumandrubidium42 3020e615a9 Codechange: use std::string_view for squirrel compilation 2025-05-03 23:02:09 +02:00
Rubidiumandrubidium42 278aee2c19 Codechange: use std::string_view for sq_getstring 2025-05-03 14:24:28 +02:00
Rubidiumandrubidium42 af25eecc15 Codechange: use const for std::string_view where appropriate 2025-04-29 10:15:18 +02:00
Rubidiumandrubidium42 c7056866a3 Codechange: remove manual param count; in all cases strlen(params) == nparams 2025-04-27 17:57:53 +02:00
Rubidiumandrubidium42 b9667ec3d1 Codechange: use std::string_view for scripts 2025-04-27 17:00:25 +02:00
glx22andLoïc Guilloux d6a261439b Add: [Script] Framework for loading/saving selected ScriptObject 2025-03-02 13:41:12 +01:00
Loïc GuillouxandGitHub b2c5712319 Fix: [Script] Improve type checking of parameters (#13522) 2025-02-13 13:46:21 +01:00
Rubidiumandrubidium42 07dd5bf01d Codechange: support strongly typed pool element IDs in squirrel/saveload 2025-02-09 15:07:29 +01:00
Peter NelsonandGitHub afc0745aa2 Codechange: Specify underlying type for all enums excluding those exposed to scripts. (#13383) 2025-01-28 22:17:34 +00:00
Rubidiumandrubidium42 b1b578f988 Cleanup: stredup-ing string variant for calling scripts 2023-05-14 22:54:10 +02:00
Rubidiumandrubidium42 ab51175db2 Codechange: use std::string for script config 2023-05-14 22:54:10 +02:00
Rubidiumandrubidium42 e035705239 Codechange: introduce and use std::string variant of sq_throwerror 2023-05-14 22:54:10 +02:00
Rubidiumandrubidium42 a30f7c83bd Codechange: use std::string for script names to load 2023-05-14 22:54:10 +02:00
Rubidiumandrubidium42 9b0123ab66 Codechange: use std::string for script API versions 2023-05-14 22:54:10 +02:00
Rubidiumandrubidium42 3d8d99ba11 Add: method to call script functions with std::string 2023-05-14 22:54:10 +02:00
Rubidiumandrubidium42 8b93e45e22 Codechange: use string/fmt instead of printf for squirrel's PRINTFUNC 2023-04-24 17:51:25 +02:00
PeterNandGitHub e97bf271dc Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. (#10663)
This avoids a (soft) namespace conflict between the four ST_* enums.
2023-04-16 20:00:55 +01:00
Rubidiumandrubidium42 3237e97b35 Cleanup: [Script] Use nullptr instead of 0 or NULL 2021-06-17 16:18:30 +02:00
Charles Pigott 64b1c70fdd Codechange: Add WARN_FORMAT to vseprintf and fix the cascade of warnings that followed 2020-06-27 14:51:14 +01:00
S. D. CloudtandCharles Pigott 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00: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
Henry WilsonandMichael Lutz 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
rubidium 7c4e9dd71d (svn r26771) -Cleanup: remove OTTD2SQ and SQ2OTTD 2014-09-06 17:30:33 +00:00
rubidium a6b4e59963 (svn r26617) -Fix [FS#5973]: [Script] Loading/parsing of info .nuts was done in the same VM, causing e.g. constants to break the loading of info of other scripts 2014-05-25 19:53:46 +00:00
truebrain 12aa5b6a58 (svn r23604) -Add: initial support for GameScripts 2011-12-19 20:50:54 +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 e37149a1de (svn r23362) -Codechange: refactor AIScanner, splitting it in AIScannerInfo and AIScannerLibrary 2011-11-29 23:21:52 +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 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 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 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
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
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
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 b1bd106703 (svn r18862) -Fix [FS#3544]: don't pass AI strings through iconv 2010-01-18 15:41:38 +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