Commit Graph

53060 Commits

Author SHA1 Message Date
Michael Lutz
e67124e174 Change: [Admin] Bump admin port protocol due to command changes.
docs/admin_network.md promised that information in an admin packet
is never removed. It does allow the possibility of using a new packet type
for changed data in combination with a bump of the admin port version.

As the recent command handling changes modified the contents of
ADMIN_PACKET_SERVER_CMD_LOGGING, do exactly that.
2021-12-20 19:30:27 +01:00
Michael Lutz
3fede15940 Codechange: [Script] Prettify squirrel call helpers by using C++17. 2021-12-20 19:25:10 +01:00
Jonathan G Rennison
e08a6e2014 Fix #9735: Fix OrderBackup::Reset in non-GUI case 2021-12-19 16:53:10 +01:00
Joan Josep
e890e7db76
Cleanup #9725: Clean up Doxygen docs and fix typo. (#9753) 2021-12-19 16:51:45 +01:00
Jonathan G Rennison
66ce6c5090 Scheduled dispatch: Add clear schedule GUI function
Add management dropdown box to window
2021-12-18 12:46:25 +00:00
Jonathan G Rennison
7b0c083c11 Debug: Add vehicle cargo type, refit mask and age period to debug window 2021-12-18 11:49:31 +00:00
Michael Lutz
afc3d71fd0 Codechange: Don't generate CommandPacket unpack functions for invalid cmd/callback combinations.
If the arguments of the callback proc don't match with the command parameters,
we can't do the proper command execution anyway. As such, don't even generate
an unpack function in the first place, saving a bit of unnecessary code bloat.

Validate on receive that the cmd/callback combination is supported, rejecting
clients that try to send invalid values.
2021-12-16 22:28:32 +01:00
Michael Lutz
c521b965bd Codechange: Don't use a global for the terrforming error tile. 2021-12-16 22:28:32 +01:00
Michael Lutz
2e39637db2 Codechange: Don't use a global for the 'not enough cash' message. 2021-12-16 22:28:32 +01:00
Michael Lutz
41fa16f325 Codechange: Don't use globals for return values from vehicle command procs. 2021-12-16 22:28:32 +01:00
Michael Lutz
57b82e2e99 Codechange: Don't use globals for story/goal/sign/group command proc return values. 2021-12-16 22:28:32 +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
d85348b1d1 Codechange: Template the command callback function type to allow unpacked arguments. 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
58cff7b081 Codechange: Un-bitstuff the remaining on-map commands. 2021-12-16 22:28:32 +01:00
Michael Lutz
c6d7b98808 Codechange: Un-bitstuff landscape commands. 2021-12-16 22:28:32 +01:00
Michael Lutz
e6e69d5289 Codechange: Un-bitstuff goal and story page commands. 2021-12-16 22:28:32 +01:00
Michael Lutz
1a42a8a5d5 Codechange: Un-bitstuff town-related commands. 2021-12-16 22:28:32 +01:00
Michael Lutz
e08b3abe7f Codechange: Un-bitstuff group and autoreplace commands. 2021-12-16 22:28:32 +01:00
Michael Lutz
46bd2f1ced Codechange: Un-bitstuff remaining transport infrastructure commands. 2021-12-16 22:28:32 +01:00
Michael Lutz
55170ae703 Codechange: Un-bitstuff rail commands. 2021-12-16 22:28:32 +01:00
Michael Lutz
6fe445e6c0 Codechange: Un-bitstuff station/depot/waypoint commands. 2021-12-16 22:28:32 +01:00
Michael Lutz
21675ec7e2 Codechange: Un-bitstuff vehicle/engine commands. 2021-12-16 22:28:32 +01:00
Michael Lutz
2637c06f88 Codechange: Un-bitstuff timetable commands. 2021-12-16 22:28:32 +01:00
Michael Lutz
211c630cbe Codechange: Un-bitstuff order commands. 2021-12-16 22:28:32 +01:00
Michael Lutz
de45a8729c Codechange: Add DoCommand::Post specialization for commands that take no TileIndex.
This adds a new Post overloads that still take a TileIndex which
is used to place any error windows or text effects.
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
ccefa76a46 Codechange: Template DoCommandPInternal. 2021-12-16 22:28:32 +01:00
Michael Lutz
6691ee3b96 Codechange: Template script command calls. 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
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.
2021-12-16 22:28:32 +01:00
Michael Lutz
c88b104ec6 Codechange: Use wrapper struct to automatically manage command depth tracking. 2021-12-16 22:28:32 +01:00
Michael Lutz
996b16de70 Codechange: Use lambdas instead of CommandContainer to manage station picker commands. 2021-12-16 22:28:32 +01:00
Michael Lutz
a05fd7aa50 Change: [Network] Transfer command data as serialized byte stream without 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-16 22:28:32 +01:00
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.
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
123c7f99c3 Codechange: Move command callback declarations to the cmd header files. 2021-12-16 22:28:32 +01:00
Michael Lutz
7048e1522f Codechange: Move flags in CommandProc in front of the command arguments. 2021-12-16 22:28:32 +01:00
Michael Lutz
33ca4f2b99 Codechange: Let the compile generate the master command table out of 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-16 22:28:32 +01:00
Michael Lutz
5ddfdc8516 Codechange: Declare our custom enum operators as constexpr. 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
Michael Lutz
b6933a2ebd Codechange: Move command arguments to the back of the DoCommand function call. 2021-12-16 22:28:32 +01:00
Michael Lutz
39e8783f4b Fix: Template syntax error when using 'span' with a container type. 2021-12-16 22:28:32 +01:00
Jonathan G Rennison
17d949980f Fix assert fail when building virtual train from engine with invalid cargo 2021-12-15 17:50:40 +00:00
translators
0c90326ada Update: Translations from eints
swedish: 1 change by joeax910
chinese (traditional): 160 changes by Tetrapod1206
galician: 21 changes by pvillaverde
irish: 5 changes by temuchie
polish: 2 changes by pAter-exe
2021-12-14 18:49:17 +00:00
Jonathan G Rennison
7953a1f8d1 Allow setting autosave interval to a custom number of real-time minutes 2021-12-14 18:48:57 +00:00
Jonathan G Rennison
583663bca1 Allow setting autosave interval to a custom number of days 2021-12-14 18:08:06 +00:00