summaryrefslogtreecommitdiff
path: root/src/script/api
AgeCommit message (Collapse)Author
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-06-17Cleanup: simplify some boolean expressionsRubidium
2021-06-17Cleanup: [Script] Use nullptr instead of 0 or NULLRubidium
2021-06-13Codechange: convert printf DEBUG statements to fmt Debug statementsrubidium42
2021-06-13Codechange: make the name of SettingDesc a std::stringrubidium42
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-06Codechange: merge guiflags and flags in settings .ini filesPatric Stout
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.
2021-05-31Codechange: use AsIntSetting()->Read() wrapper if possible (#9324)Patric Stout
2021-05-30Codechange: [Network] Let admin-game script use std::stringrubidium42
2021-05-30Codechange: [Game] Pass the length instead of '\0' terminating (and undoing ↵rubidium42
that) in the middle of a C-string
2021-05-29Codechange: use setting name instead of index for CmdChange(Company)Setting ↵Patric Stout
(#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.
2021-05-29Codechange: Rename window related DeleteXXX to match new behaviourglx22
2021-05-29Codechange: move from C-string to std::string for DoCommandrubidium42
2021-05-29Codechange: move casting a "const char *" to "char *" to the callerPatric Stout
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.
2021-05-29Fix: ScriptObject::DoCommand could modify "text" while defined "const"Patric Stout
This could have unwanted side-effects, as it could change the source for ever and ever.
2021-05-29Codechange: rename str_validate to StrMakeValid(InPlace) (#9304)Patric Stout
This to be more explicit the function changes the value, and not returns yes/no.
2021-05-27Codechange: remove SettingDescType in lieu of the actual classesrubidium42
2021-05-27Codechange: let SettingDesc extend SettingDescBaserubidium42
2021-05-27Codechange: just pass the SettingDesc to SetSettingValue and remove ↵rubidium42
distinction between (non)company
2021-05-16Codechange: [Network] Let NetworkClientInfo use std::stringrubidium42
2021-05-15Change: Use gender-neutral pronounsrubidium42
2021-05-13Codechange: clean up C-string support from settingsrubidium42
2021-05-13Codechange: Replace TILE_AREA_LOOP with range-based for loopsglx22
2021-05-08Change: Use gender-neutral pronouns in console command messages (and ↵William Davis
comments) (#9203)
2021-04-29Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loopsglx22
2021-04-29Fix: [MinGW] Set minimum OS version to Windows XP (#9135)Loïc Guilloux
2021-04-22Codechange: Replace CMD_SET_GROUP_REPLACE_PROTECTION with generic ↵peter1138
CMD_SET_GROUP_FLAG.
2021-04-22Codechange: Replace Group::replace_protection with Group::flagspeter1138
2021-03-14Change: Heading for 1.12 now (#8862)Patric Stout
2021-02-26Fix 02e770ff: allow estimating CloneVehicle if short on money (#8748)Patric Stout
CheckCompanyHasMoney() was also executed when not using DC_EXEC, resulting in an error about shortage of money instead of the estimation. This mostly is a problem for AI players, as they will have no way to know how much it would have cost.
2021-02-14Feature: [GS] Allow non-question type windows to have no buttonsdP
2021-01-22Feature: Allow GameScripts to add additional text to Industry view windowdP
2021-01-22Feature: Add tile parameter for GSCompany.ChangeBankBalance to show text ↵Pavel Stupnikov
effect if needed (#8573)
2021-01-10Fix 218f40e: Warning about 32-bit shift implicitly converted to 64 bitsSamuXarick
2021-01-09Add: [Script] ScriptCargo::GetName, to get the human readable name of a ↵Patric Stout
cargo (#8544) Of course this translates into AICargo.GetName() for AIs and GSCargo.GetName() for GameScripts.
2021-01-08Codechange: Remove min/max functions in favour of STL variants (#8502)Charles Pigott
2020-12-28Fix #8453: [Script] Don't truncate loan variation to 32bitglx22
2020-12-27Codechange: Replace FOR_VEHICLE_ORDERS with range-based for loopsglx22
2020-12-25Codechange: use C++11 constructs for for-each loops (#8432)Patric Stout