summaryrefslogtreecommitdiff
path: root/src/script
AgeCommit message (Collapse)Author
2021-12-16Codechange: Don't use globals for return values from vehicle command procs.Michael Lutz
2021-12-16Codechange: Don't use globals for story/goal/sign/group command proc return ↵Michael Lutz
values.
2021-12-16Codechange: Add support for additional command result values.Michael Lutz
2021-12-16Codechange: Pass unpacked command arguments to command callbacks (except ↵Michael Lutz
Script).
2021-12-16Codechange: Un-bitstuff all remaining commands.Michael Lutz
2021-12-16Codechange: Un-bitstuff the remaining on-map commands.Michael Lutz
2021-12-16Codechange: Un-bitstuff landscape commands.Michael Lutz
2021-12-16Codechange: Un-bitstuff goal and story page commands.Michael Lutz
2021-12-16Codechange: Un-bitstuff town-related commands.Michael Lutz
2021-12-16Codechange: Un-bitstuff group and autoreplace commands.Michael Lutz
2021-12-16Codechange: Un-bitstuff remaining transport infrastructure commands.Michael Lutz
2021-12-16Codechange: Un-bitstuff rail commands.Michael Lutz
2021-12-16Codechange: Un-bitstuff station/depot/waypoint commands.Michael Lutz
2021-12-16Codechange: Un-bitstuff vehicle/engine commands.Michael Lutz
2021-12-16Codechange: Un-bitstuff order commands.Michael Lutz
2021-12-16Codechange: Un-bitstuff commands taking a ClientID (i.e. CMD_CLIENT_ID).Michael Lutz
2021-12-16Codechange: Template DoCommandPInternal.Michael Lutz
2021-12-16Codechange: Template script command calls.Michael Lutz
2021-12-16Codechange: Pass additional data as byte stream to command callbacks.Michael Lutz
2021-12-16Codechange: Template DoCommand to automagically reflect the parameters of ↵Michael Lutz
the command proc. When finished, this will allow each command handler to take individually different parameters, obliviating the need for bit-packing.
2021-12-16Codechange: Make TileIndex a "strong" typedef to give it a distinct type.Michael Lutz
This is accomplished by changing it to a single member struct with the appropriate operator overloads to make it all work with not too much source modifications.
2021-12-16Codechange: Move command callback declarations to the cmd header files.Michael Lutz
2021-12-16Codechange: Untangle command code, flags and error string for DoCommand*.Michael Lutz
2021-12-16Codechange: Move command arguments to the back of the networked command ↵Michael Lutz
function calls.
2021-12-16Codechange: Move command arguments to the back of the DoCommand function call.Michael Lutz
2021-10-20Fix #9626, ddafc0d: Incorrect loading of script saved data (#9629)Loïc Guilloux
2021-10-02Fix #9548, e5fedcd: [Squirrel] Crash during engine cleanup after reaching ↵Loïc Guilloux
memory limit on realloc (#9592)
2021-10-02Fix #9588, 140a96b: [Squirrel] Reaching memory limit during script ↵Loïc Guilloux
registration could prevent further script detections (#9589) Also the memory allocation triggering the limit was never freed. And if the exception was thrown in a constructor using placement new, the pre-allocated memory was not freed either.
2021-09-25Change: Heading for 13 now (#9573)Patric Stout
2021-09-25Add: allow gamescripts to build neutral objects (#9568)dP
2021-09-14Feature: [AI/GS] Missing water related functions and objects (#8390)SamuXarick
2021-08-15Change: rebrand 1.12.0 to 12.0Patric Stout
One question that keeps popping up: "when do we release 2.0?". NewGRF will force that at least 1.16 will be 2.0, but to not wait for this, let's drop the "1." and be for ever done with that conversation. We are following in the footstep of giants here.
2021-08-12Add: [AI] Get the number of vehicles in a given group (#9462)SamuXarick
2021-08-10Fix 8706dcd9: [Script] Byte-swap grfids to match normal expectations.Michael Lutz
2021-08-10Fix 14f197c: [Script] int64 values don't fit into int (#9465)Loïc Guilloux
2021-08-09Add: [Script] Basic information about loaded NewGRFs for scripts. (#9464)Michael Lutz
Currently, scripts use various heuristics to detect loaded NewGRFs that are inherently unreliable. The list of loaded NewGRFs is easily accessible to a human player, and thus giving scripts the same information is consistent with the current approach to not give scripts more information than a human player.
2021-07-20Codechange: Remove (unused) ability to specify min/max of OverflowSafeIntCharles Pigott
2021-07-09Codechange: access the name of a setting via an accessor functionRubidium
2021-07-06Fix 39e90ec: Integers for scripts are 64bit, but saved as 32bit (#9415)Loïc Guilloux
2021-07-02Feature: framework to make savegames self-descriptivePatric Stout
We won't be able to make it fully self-descriptive (looking at you MAP-chunks), but anything else can. With this framework, we can add headers for each chunk explaining how each chunk looks like in detail. They also will all be tables, making it a lot easier to read in external tooling, and opening the way to consider a database (like SQLite) to use as savegame format. Lastly, with the headers in the savegame, you can freely add fields without needing a savegame version bump; older versions of OpenTTD will simply ignore the new field. This also means we can remove all the SLE_CONDNULL, as they are irrelevant. The next few commits will start using this framework.
2021-06-17Cleanup: simplify some boolean expressionsRubidium
2021-06-17Cleanup: [Script] Use nullptr instead of 0 or NULLRubidium
2021-06-15Change: prefix SL_ARR with the length of the arrayPatric Stout
This means that during loading we can validate that what is saved is also that what is expected. Additionally, this makes all list types similar to how they are stored on disk: First a gamma to indicate length, followed by the data. The size still depends on the type.
2021-06-15Cleanup: remove some unneeded c_str() callsRubidium
2021-06-13Codechange: convert printf DEBUG statements to fmt Debug statementsrubidium42
2021-06-13Codechange: make the name of SettingDesc a std::stringrubidium42
2021-06-12Fix #9353: [Script] Garbage collecting on priority queues could crash the gamerubidium42
2021-06-11Fix 4079c47: Missed a file when removing generated .sq files from the repo ↵Loïc Guilloux
(#9350)
2021-06-11Fix: [Script] doxygen_filter is very strict about DOXYGEN_API usage (#9351)Loïc Guilloux
2021-06-10Fix: [Script] Ensure the saved script strings are properly validated and ↵rubidium42
terminated when being read from the savegame