summaryrefslogtreecommitdiff
path: root/src/command.cpp
AgeCommit message (Collapse)Author
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 DoCommandP 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: 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: Use wrapper struct to automatically manage command depth tracking.Michael Lutz
2021-12-16Codechange: Use lambdas instead of CommandContainer to manage station picker ↵Michael Lutz
commands.
2021-12-16Change: [Network] Transfer command data as serialized byte stream without ↵Michael Lutz
fixed structure. The data will be transmitted as the length followed by the serialized data. This allows the command data to be different for every command type in the future.
2021-12-16Codechange: Align parameter order of command callbacks to command handlers.Michael Lutz
2021-12-16Codechange: Move flags in CommandProc in front of the command arguments.Michael Lutz
2021-12-16Codechange: Let the compile generate the master command table out of ↵Michael Lutz
templated command traits. This is using a non-intrusive type-traits like templated system, which allows compile-time validation that the command table and the command enum match up.
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-09-25Add: allow gamescripts to build neutral objects (#9568)dP
2021-06-13Codechange: convert printf DEBUG statements to fmt Debug statementsrubidium42
2021-05-29Codechange: move from C-string to std::string for DoCommandrubidium42
2021-04-22Codechange: Replace CMD_SET_GROUP_REPLACE_PROTECTION with generic ↵peter1138
CMD_SET_GROUP_FLAG.
2021-01-22Feature: Allow GameScripts to add additional text to Industry view windowdP
2020-12-27Codechange: Replace assert_compile macro with static_assertCharles Pigott
2020-12-22Feature: Influence industry production changes from GS (#7912)Niels Martin Hansen
2020-06-18Change: Allow command cost-estimation while paused.frosch
2020-05-22Feature: Push-buttons on storybook pages (#7896)Niels Martin Hansen
Allow more direct player-initiated interaction for Game Scripts, by letting the GS put push-buttons on storybook pages. These buttons can either trigger an immediate event, or require the player to first select a tile on the map, or a vehicle. Additionally this reworks how the storybook pages are layouted and rendered, to allow for slightly more complex layouts, and maybe speeding drawing up a bit.
2020-01-15Feature: GS method to control engine availability for a specific company (#7791)Pavel Stupnikov
* Feature: GS method to allow company to use an engine before its introduction date * Feature: GS method to retire an engine early for a specific company
2020-01-04Feature: Script API to change town rating of companiesNiels Martin Hansen
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-09-29Fix: Some typos found using codespellJMcKiern
2019-09-08Add: Allow GameScript to demolish without a companyMax Maton
This allows GameScripts to shrink towns as well as grow them.
2019-09-07Fix #7188: check the validity of command callback for scripts (#7701)glx22
2019-05-01Feature: Add NotRoadTypes (NRT)peter1138
2019-04-29Codechange: Remove Company/OwnerByte typesCharles Pigott
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-03-26Codechange: Replace SmallVector::Clear() with std::vector::clear()Henry Wilson
2019-03-20Remove: ENABLE_NETWORK switchPatric Stout
This switch has been a pain for years. Often disabling broke compilation, as no developer compiles OpenTTD without, neither do any of our official binaries. Additionaly, it has grown so hugely in our codebase, that it clearly shows that the current solution was a poor one. 350+ instances of "#ifdef ENABLE_NETWORK" were in the code, of which only ~30 in the networking code itself. The rest were all around the code to do the right thing, from GUI to NewGRF. A more proper solution would be to stub all the functions, and make sure the rest of the code can simply assume network is available. This was also partially done, and most variables were correct if networking was disabled. Despite that, often the #ifdefs were still used. With the recent removal of DOS, there is also no platform anymore which we support where networking isn't working out-of-the-box. All in all, it is time to remove the ENABLE_NETWORK switch. No replacement is planned, but if you feel we really need this option, we welcome any Pull Request which implements this in a way that doesn't crawl through the code like this diff shows we used to.
2019-02-05Fix #7151: Hang when concurrently starting AIs in multiplayer, or with shift ↵Peter Nelson
pressed.
2019-01-31Feature: Group liveries, and livery window usability enhancements. (#7108)PeterN
* Change: Replace checkbox in livery selection window with Default option in drop down selection. This reduces clutter in the UI and allows for primary/secondary colours to independently follow the default scheme if desired. * Feature: Add vehicle group liveries.
2018-10-31Doc: Lots and lots of doxymentation fixesCharles Pigott
2018-04-24Feature: GS methods to scroll viewport for players (#6745)Pavel Stupnikov
2014-09-07(svn r26802) -Add: Command to set visibility of an engine for a company ↵alberth
(based on patch by Juanjo).
2014-08-03(svn r26716) -Fix: CMD_CLEAR_ORDER_BACKUP should not be suppressed by pause ↵frosch
modes.
2014-04-23(svn r26482) -Codechange: add an include that allows us to undefine/redefine ↵rubidium
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2014-04-08(svn r26450) -Feature: Hierarchical vehicle subgroups.peter1138
2014-02-23(svn r26371) -Fix [FS#5831]: Calling DoCommandP during the gameloop cleared ↵frosch
pending persistent storage changes.
2014-02-06(svn r26306) -Add: [nogo] More story APIs: RemovePageElement, GetCompany, ↵zuu
GetDate, SetDate
2014-02-06(svn r26299) -Fix: [nogo] CmdRemoveStoryPage does not use the string parameterzuu
2014-01-12(svn r26241) -Codechange: Remember the GRFFile which filled the TextRefStack ↵frosch
in the TextRefStack.
2013-12-23(svn r26174) -Codechange: Rename BaseStorageArray to BasePersistentStorageArrayfrosch
2013-11-24(svn r26092) -Fix [FS#5818]: prevent scripts from crashing OpenTTD when they ↵rubidium
send text with command codes to user editable texts such as sign and station names
2013-09-21(svn r25788) -Feature: [Script] Game Scripts can now charge fees and give ↵zuu
money to companies
2013-09-19(svn r25785) -Feature: [Script] Allow AIs and GS to found towns. Allow GS to ↵zuu
rename towns
2013-06-27(svn r25487) -Fix: do not allow control codes in names of things (signs, ↵rubidium
vehicles, towns, stations, etc), so they have a known maximum fixed size and are, by definition, the same for everyone