Commit Graph
1115 Commits
Author SHA1 Message Date
Artin AlaviandGitHub cbac243216 Feature: [UI] Split AI/Game Script configuration windows and add them to world gen window (#10058) 2022-11-10 21:39:09 +01:00
Didac Perez PareraandGitHub 019dcb7b7b Change: Let AI developers edit non-editable AI/Game Script Parameters (#8895) 2022-11-08 18:23:34 +00:00
Rubidiumandrubidium42 d5aafaee15 Codechange: rename and move some strings to make them more consistent with the rest of the strings 2022-11-02 17:58:44 +01:00
Peter NelsonandPeterN edbf99ed17 Change: Use standard sizing for AI competitor limit buttons. 2022-10-11 08:36:59 +01:00
Charles Pigott 9059215b3b Fix #10073: Stop truncating output of list_ai and friends commands 2022-10-10 13:42: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 13528bfcd0 Codechange: Un-bitstuff all remaining commands. 2021-12-16 22:28:32 +01:00
Michael Lutz 4f3ea3907e Codechange: Un-bitstuff commands taking a ClientID (i.e. CMD_CLIENT_ID). 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 0f64ee5ce1 Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
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
Michael Lutz 549caca39c Codechange: Move command arguments to the back of the networked command function calls. 2021-12-16 22:28:32 +01:00
Patric StoutandGitHub 394c749b6b Change: Heading for 13 now (#9573) 2021-09-25 13:48:03 +02:00
Patric StoutandPatric Stout eca73a810c Change: rebrand 1.12.0 to 12.0
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-15 12:28:51 +02:00
Rubidiumandrubidium42 3237e97b35 Cleanup: [Script] Use nullptr instead of 0 or NULL 2021-06-17 16:18:30 +02:00
rubidium42andrubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
glx22andLoïc Guilloux 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 2021-05-29 21:08:25 +02:00
glx22andLoïc Guilloux 994bf19aef Fix f6d5c01: Delay deletion when closing windows 2021-05-29 21:08:25 +02:00
Peter NelsonandMichael Lutz 2a0365b3d9 Cleanup: Remove unnecessary parameter of GetScrolledRowFromWidget()
Line height defaults to the resize height of the relevant widget, which is
set in all cases. Therefore it is not necessary to specify this value every time.

Additionally fixes scrolled padding for the framerate window.
2021-04-21 23:12:10 +02:00
PeterNandGitHub 195cf31cb9 Fix: Inconsistent button sizing on AI/GS setting window depending on scale settings. (#9044) 2021-04-17 19:20:22 +01:00
Patric StoutandGitHub 9bfa7198fd Change: Heading for 1.12 now (#8862) 2021-03-14 20:47:31 +01:00
Tyler TrahanandGitHub de891238d6 Change: Recolour graph windows to brown (#8700) 2021-03-11 15:30:29 +01:00
glx22andLoïc Guilloux 07385c3662 Fix: Use the same safety checks as 'stop_ai' for 'reload_ai' 2021-01-22 22:19:55 +01:00
Charles PigottandGitHub 9b800a96ed Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
SamuXarickandGitHub dc5b8020cc Fix #6452: Reset only editable and visible settings from GUI (#7890)
Also enables the Reset button while in-game for AI configs.
2020-12-27 15:05:47 +01:00
Michael Lutz b408fe77f7 Codechange: Use std::string in file scanners. 2020-12-27 13:19:25 +01:00
Patric StoutandCharles Pigott 8fa2a67f6b Fix f66baa44: for-loop is no longer increasing "i"
During conversion it was overlooked that the for-loop used to do
this. Oops.
2020-12-26 13:32:25 +00:00
Patric StoutandGitHub e6e91a345c Fix f66baa44: index was off by one (#8433)
i++ in the 3rd part of a for() is post, not pre. Oops.
2020-12-25 19:57:13 +01:00
Patric StoutandGitHub f66baa444f Codechange: use C++11 constructs for for-each loops (#8432) 2020-12-25 19:38:18 +01:00
Patric StoutandPatric Stout 4319d31036 Fix #6468: don't store version of AIs-started-via-console in name
You can do: "startai myai.3", which starts version 3 of "myai".
This is very useful for testing save/load code between different
versions of your AI.

However, when using this syntax, the AI got saved as "myai.3" as
name of the AI, instead of "myai". This caused several problems,
like indicating to the user the AI could not be found, but still
load the AI. But in all cases, the AI never got the chance to
load the saved data, making the whole reason this exists pointless.

By splitting the name and version already in the console command,
the code becomes simpler and AIs started this way now follow the
normal flow after initialization.
2020-12-25 17:03:44 +01:00
glxandglx22 4079c47b6c Change: rewrote squirrel_export in CMake 2020-07-16 00:53:26 +02:00
Patric Stoutandglx22 56d54cf60e Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.

Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.

This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.

Addtiionally, this heavily improves our detection of libraries, etc.
2020-06-05 19:36:05 +02:00
Michael Lutz 1c0ba07c3c Add: [Script] Native priority queue; useful e.g. for pathfinders. 2020-06-01 21:35:13 +02:00
Quipyowert2andNiels Martin Hansen 4552b17691 Codechange: Avoid copying function parameters by using const references 2020-02-17 09:15:28 +01:00
glxandglx22 47790b09a4 Codechange: Simplify CheckAPIVersion() 2020-02-14 21:43:21 +01:00
glxandglx22 2f264f2c92 Change: Heading for 1.11 now 2020-02-08 23:38:49 +01:00
SamuandCharles Pigott 3089c625e4 Fix #7088: close AI/GS textfile window when their data are invalid 2020-02-06 20:58:11 +00:00
glxandNiels Martin Hansen 3a14cea068 Codechange: Replace FOR_ALL_COMPANIES with range-based for loops 2019-12-21 20:13:03 +01:00
S. D. CloudtandCharles Pigott 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
glxandNiels Martin Hansen 12e43c697d Add: [Script] ScriptEventVehicleAutoReplaced. 2019-10-22 11:55:40 +02:00
glx22andCharles Pigott 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
peter1138andMichael Lutz 3293f08e0b Add: New RoadType API functions. 2019-05-01 21:36:27 +02:00
Charles PigottandPeterN 5b34c8019f Codechange: Remove Company/OwnerByte types 2019-04-29 17:40:22 +01:00
Henry WilsonandMichael Lutz 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Michael Lutz c7b9987d08 Codechange: Switch DropDownList to directly use std::vector, thus making AutoDeleteSmallVector obsolete.
DropDownListItem are strongly managed using std::unique_ptr to ensure leak-free handling. Appropriate use
of move-semantics make intent a lot clearer than parameter comments and allows the compiler to generate
copy-free code for most situations.
2019-04-09 22:45:15 +02:00
glx22andGitHub a1e492d0d8 Fix #7439: don't overwrite CompanyRemoveReason with ClientID (#7465) 2019-04-05 15:11:52 +02:00
Henry WilsonandPeterN a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 2019-03-26 20:15:57 +00:00