Commit Graph

502 Commits (6fe445e6c0fa3163aba48b1ec6d810b6594777bd)

Author SHA1 Message Date
Michael Lutz 6fe445e6c0 Codechange: Un-bitstuff station/depot/waypoint commands. 3 years ago
Michael Lutz 21675ec7e2 Codechange: Un-bitstuff vehicle/engine commands. 3 years ago
Michael Lutz 211c630cbe Codechange: Un-bitstuff order commands. 3 years ago
Michael Lutz 4f3ea3907e Codechange: Un-bitstuff commands taking a ClientID (i.e. CMD_CLIENT_ID). 3 years ago
Michael Lutz ccefa76a46 Codechange: Template DoCommandPInternal. 3 years ago
Michael Lutz 6691ee3b96 Codechange: Template script command calls. 3 years ago
Michael Lutz eab18f06a4 Codechange: Pass additional data as byte stream to command callbacks. 3 years ago
Michael Lutz e740c24eb7 Codechange: Template DoCommand 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.
3 years ago
Michael Lutz b0990fcff7 Codechange: Make TileIndex a "strong" typedef to give it a distinct type.
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.
3 years ago
Michael Lutz a38bbefe1b Codechange: Untangle command code, flags and error string for DoCommand*. 3 years ago
Michael Lutz 549caca39c Codechange: Move command arguments to the back of the networked command function calls. 3 years ago
Michael Lutz b6933a2ebd Codechange: Move command arguments to the back of the DoCommand function call. 3 years ago
Patric Stout 394c749b6b
Change: Heading for 13 now (#9573) 3 years ago
dP 39662aabef
Add: allow gamescripts to build neutral objects (#9568) 3 years ago
SamuXarick 37de878129
Feature: [AI/GS] Missing water related functions and objects (#8390) 3 years ago
Patric 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.
3 years ago
SamuXarick 120d216b0b
Add: [AI] Get the number of vehicles in a given group (#9462) 3 years ago
Michael Lutz b14681891d Fix 8706dcd9: [Script] Byte-swap grfids to match normal expectations. 3 years ago
Loïc Guilloux 4eb368c786
Fix 14f197c: [Script] int64 values don't fit into int (#9465) 3 years ago
Michael Lutz 8706dcd9c1
Add: [Script] Basic information about loaded NewGRFs for scripts. (#9464)
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.
3 years ago
Charles Pigott 549a58731f Codechange: Remove (unused) ability to specify min/max of OverflowSafeInt 3 years ago
Rubidium 01139d3368 Codechange: access the name of a setting via an accessor function 3 years ago
Loïc Guilloux ddafc0de05
Fix 39e90ec: Integers for scripts are 64bit, but saved as 32bit (#9415) 3 years ago
Rubidium 281a65b3e1 Cleanup: simplify some boolean expressions 3 years ago
Rubidium 3237e97b35 Cleanup: [Script] Use nullptr instead of 0 or NULL 3 years ago
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 3 years ago
rubidium42 bf500c39c9 Codechange: make the name of SettingDesc a std::string 3 years ago
Loïc Guilloux 16ebf7861f
Fix 4079c47: Missed a file when removing generated .sq files from the repo (#9350) 3 years ago
Loïc Guilloux ee5f23382d
Fix: [Script] doxygen_filter is very strict about DOXYGEN_API usage (#9351) 3 years ago
Patric Stout 648ee88a02 Codechange: merge guiflags and flags in settings .ini files
It was rather confusing which one was for what, especially as some
SaveLoad flags were settings-only. Clean up this mess a bit by
having only Setting flags.
3 years ago
Patric Stout 921ab68a48
Codechange: use AsIntSetting()->Read() wrapper if possible (#9324) 3 years ago
rubidium42 e58581f1f8 Codechange: [Network] Let admin-game script use std::string 3 years ago
rubidium42 29f2bd27c4 Codechange: [Game] Pass the length instead of '\0' terminating (and undoing that) in the middle of a C-string 3 years ago
Patric Stout d70fb74ac6
Codechange: use setting name instead of index for CmdChange(Company)Setting (#9306)
This is mostly done as there are now constraints on settings.ini you might not
expected. For example, conditional settings always have to come last, as otherwise
they would influence the index.
3 years ago
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 3 years ago
rubidium42 2e136285e1 Codechange: move from C-string to std::string for DoCommand 3 years ago
Patric Stout 7713c3e3cc Codechange: move casting a "const char *" to "char *" to the caller
It is not nice to have your definition say you won't change a value
while in fact the whole reason for your existance is to change it.
3 years ago
Patric Stout 665e3c1f45 Fix: ScriptObject::DoCommand could modify "text" while defined "const"
This could have unwanted side-effects, as it could change the
source for ever and ever.
3 years ago
Patric Stout ca9a7df752
Codechange: rename str_validate to StrMakeValid(InPlace) (#9304)
This to be more explicit the function changes the value, and not
returns yes/no.
3 years ago
rubidium42 86c9ef8134 Codechange: remove SettingDescType in lieu of the actual classes 3 years ago
rubidium42 425d50372f Codechange: let SettingDesc extend SettingDescBase 3 years ago
rubidium42 8ffb4122df Codechange: just pass the SettingDesc to SetSettingValue and remove distinction between (non)company 3 years ago
rubidium42 4d246cda73 Codechange: [Network] Let NetworkClientInfo use std::string 3 years ago
rubidium42 44ca7d9377 Change: Use gender-neutral pronouns 3 years ago
rubidium42 0f062b3882 Codechange: clean up C-string support from settings 3 years ago
glx22 38c97e1492 Codechange: Replace TILE_AREA_LOOP with range-based for loops 3 years ago
William Davis 881e1da51d
Change: Use gender-neutral pronouns in console command messages (and comments) (#9203) 3 years ago
glx22 9a8756d7ed Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loops 3 years ago
Loïc Guilloux 356bbbb90a
Fix: [MinGW] Set minimum OS version to Windows XP (#9135) 3 years ago
peter1138 c56fce70b4 Codechange: Replace CMD_SET_GROUP_REPLACE_PROTECTION with generic CMD_SET_GROUP_FLAG. 3 years ago