Commit Graph

305 Commits

Author SHA1 Message Date
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
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
dP
3bef49da29 Fix #11: Queue outgoing commands and don't send more than 2 per frame 2021-10-29 02:55:07 +03:00
dP
239ff976da Merge remote-tracking branch 'upstream/master' 2021-09-27 19:53:01 +03:00
dP
4eb8b29dbf Update to 12.0-RC1 2021-09-26 20:30:12 +03:00
dP
39662aabef Add: allow gamescripts to build neutral objects (#9568) 2021-09-25 13:39:40 +02:00
dP
09123ac84f Merge branch 'master' into blueprints 2021-09-21 23:48:34 +03:00
dP
a38dc30bf6 Merge remote-tracking branch 'upstream/master' 2021-08-16 01:58:47 +03:00
dP
9df4f2c4fc Update to 12.0-beta1 2021-08-15 14:57:29 +03:00
rubidium42
55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
rubidium42
2e136285e1 Codechange: move from C-string to std::string for DoCommand 2021-05-29 19:02:18 +02:00
Pavel Stupnikov
6b30d9c457 Merge branch '1.11' into blueprints 2021-05-26 00:46:18 +03:00
peter1138
c56fce70b4 Codechange: Replace CMD_SET_GROUP_REPLACE_PROTECTION with generic CMD_SET_GROUP_FLAG. 2021-04-22 22:57:00 +02:00
dP
c47930887b Merge remote-tracking branch 'upstream/1.11' into 1.11 2021-01-25 22:53:44 +03:00
dP
5e4506f493 Update to 1.11.0-beta1 2021-01-23 17:31:11 +03:00
dP
bab7de6cf2 Feature: Allow GameScripts to add additional text to Industry view window 2021-01-22 09:50:53 +00:00
Charles Pigott
860c270c73 Codechange: Replace assert_compile macro with static_assert 2020-12-27 10:55:42 +00:00
Niels Martin Hansen
b7751c483e Feature: Influence industry production changes from GS (#7912) 2020-12-22 14:21:31 +01:00
dP
feebf5499a Initial version of blueprints (copy/paste) 2020-12-22 02:35:34 +03:00
dP
df12479252 Add APM counter to the status bar 2020-07-19 02:38:36 +03:00
dP
7441767ed8 Make modifier key functions configurable 2020-07-13 01:35:07 +03:00
frosch
d8182b7e15 Change: Allow command cost-estimation while paused. 2020-06-18 08:59:27 +01:00
Niels Martin Hansen
800ade7702 Feature: Push-buttons on storybook pages (#7896)
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-05-22 22:22:55 +02:00
dP
9b9a850d0b Merge 1.10.0-RC1 2020-02-18 20:56:38 +03:00
dP
d4ae6a1d91 Update to 1.10.0-RC1 2020-02-18 18:13:33 +03:00
Pavel Stupnikov
d7a928a08b Feature: GS method to control engine availability for a specific company (#7791)
* 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-15 18:46:26 +01:00
dP
47b70f6769 Change FOR_ALL_ cycles to ::Iterate 2020-01-06 20:45:47 +03:00
dP
1492a22027 Update to 1.10.0-beta2 2020-01-06 19:06:51 +03:00
dP
c7c3966eec Update to 1.10.0-beta2 2020-01-06 18:49:34 +03:00
Niels Martin Hansen
f401622149 Feature: Script API to change town rating of companies 2020-01-04 19:07:13 +01:00
S. D. Cloudt
13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
dP
ceea4c88be Merge 1.10.0-beta1 2019-11-01 16:08:44 +03:00
dP
599ccf0c2b Update to 1.10.0-beta1 2019-10-31 22:24:28 +03:00
dP
b84a475e14 Initialize with OpenTTD 1.9.3 2019-10-31 21:58:04 +03:00
JMcKiern
04f659e768 Fix: Some typos found using codespell 2019-09-29 21:27:32 +01:00
Max Maton
e4414471dd Add: Allow GameScript to demolish without a company
This allows GameScripts to shrink towns as well as grow them.
2019-09-08 10:09:19 +02:00
Pavel Stupnikov
95a6ff73cb Update to 1.9.3-RC1 2019-09-08 02:37:38 +03:00
Pavel Stupnikov
5131281a31 Update to 1.9.3-RC1
--HG--
branch : openttd
2019-09-08 02:22:38 +03:00
glx22
b3fd787959 Fix #7188: check the validity of command callback for scripts (#7701) 2019-09-07 17:37:01 +01:00
peter1138
c02ef3e456 Feature: Add NotRoadTypes (NRT) 2019-05-01 21:36:27 +02:00
Charles Pigott
5b34c8019f Codechange: Remove Company/OwnerByte types 2019-04-29 17:40:22 +01:00
Henry Wilson
7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Pavel Stupnikov
71dc188b27 Update to 1.9.0-RC2 2019-03-27 18:06:52 +03:00
Henry Wilson
bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 2019-03-26 20:15:57 +00:00
Pavel Stupnikov
fa72fd57a1 Update to 1.9.0-RC2
--HG--
branch : openttd
2019-03-26 14:17:10 +03:00
Patric Stout
e3c639a09f Remove: ENABLE_NETWORK switch
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-03-20 19:24:55 +01:00
Pavel Stupnikov
6e2a54355a Merge 1.9.0-beta2 2019-02-14 00:47:22 +03:00