Commit Graph

137 Commits

Author SHA1 Message Date
Peter Nelson
afc0745aa2
Codechange: Specify underlying type for all enums excluding those exposed to scripts. (#13383) 2025-01-28 22:17:34 +00:00
Peter Nelson
b653f875b0
Codechange: Space between template and < (#13278)
Make it all consistent so it matches CODINGSTYLE.
2025-01-04 17:56:14 +00:00
Peter Nelson
ec1dc434ac
Codechange: Shuffle CommandCost members to reduce size. (#13087)
Prefer member initialisation as well.
2024-11-16 21:49:49 +00:00
Jonathan G Rennison
9c84e5df3f Add: Road waypoint functionality 2024-06-24 22:12:08 +02:00
Rubidium
fea9ffa808 Codechange: also allow removing clients from the company allow lists 2024-05-22 22:20:10 +02:00
Peter Nelson
d99c1337a2 Add: Command to build an individual house on a specific tile. 2024-05-14 21:11:48 +01:00
Rubidium
66354ab9eb Codechange: introduce allow list infrastructure for companies 2024-05-07 00:03:15 +02:00
Patric Stout
a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
dP
897b59c158
Add: [GS] Allow to set max loan for each company separately (#11224) 2024-01-30 19:15:19 +01:00
dP
acaceb45ba
Codechange: Make command constant names consistent with command proc (#11920) 2024-01-29 13:41:36 +01:00
Michael Lutz
1c56991213 Add: [Script] Game script control of industry production level. 2023-09-02 16:20:59 +02:00
Rubidium
eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
mrmbernardi
35ef6c1723
Feature: [GS] Goal destination can be updated (#10817) 2023-06-08 18:00:31 +01:00
Rubidium
68ff3fd062 Change: include fmt.h C++ headers in stdafx.h
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
2023-05-08 16:49:23 +02:00
Patric Stout
36a0818bc5
Remove: buying/selling/owning company shares (#10709) 2023-04-29 10:16:49 +02:00
Tyler Trahan
44848f4edf Add: CommandCost supports an optional second error string 2023-03-03 17:11:14 -05:00
dP
c73b88ddca
Fix: Don't send unused tile field over the network (#10507) 2023-02-24 22:50:11 +01:00
dP
fe2c8a1240
Codechange: Decouple INDUSTRY_CTRL into separate commands (#10475) 2023-02-14 11:29:11 +01:00
Rubidium
6dfd2cad69 Fix: comparison result is always the same warnings 2023-01-15 00:24:20 +01:00
Tyler Trahan
8063fcb6e0
Feature: Ctrl-click to bulk edit timetable speeds/waiting times (#10265) 2022-12-25 13:20:31 -05:00
dP
5e14a20b3b
Feature: [GS] Scriptable league tables (#10001) 2022-11-26 18:03:03 +01:00
Tyler Trahan
3d45bc4abe Feature: Build objects by area 2022-10-16 18:28:08 +02:00
Michael Lutz
b11bd185e3 Fix #9756: Network command unpack proc was not generated in all cases.
The case where the callback proc takes all command results but not any of
the command parameters was not handled properly.
2021-12-20 23:32:23 +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
13528bfcd0 Codechange: Un-bitstuff all remaining commands. 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
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
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
4fc055d6e9 Codechange: Align parameter order of command callbacks to command handlers. 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
a38bbefe1b Codechange: Untangle command code, flags and error string for DoCommand*. 2021-12-16 22:28:32 +01:00
rubidium42
ef991b1772 Codechange: [Network] Use std::string in CommandPacket 2021-05-29 19:02:18 +02:00
rubidium42
2e136285e1 Codechange: move from C-string to std::string for DoCommand 2021-05-29 19:02:18 +02:00
peter1138
c56fce70b4 Codechange: Replace CMD_SET_GROUP_REPLACE_PROTECTION with generic CMD_SET_GROUP_FLAG. 2021-04-22 22:57:00 +02:00
Patric Stout
bb28ff7226
Codechange: DC_NO_RAIL_OVERLAP is a remnant of the OldAI. (#8496)
The OldAI was removed in 2009. Pretty sure we can remove this flag
now too.
2021-01-05 12:36:57 +01:00
Niels Martin Hansen
b7751c483e
Feature: Influence industry production changes from GS (#7912) 2020-12-22 14:21:31 +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
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
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
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
Henry Wilson
7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Peter Nelson
b1e40b6b56 Fix #7151: Hang when concurrently starting AIs in multiplayer, or with shift pressed. 2019-02-05 14:49:04 +01:00
PeterN
23960d0f2c Feature: Group liveries, and livery window usability enhancements. (#7108)
* 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.
2019-01-31 14:57:44 +01:00
Pavel Stupnikov
8e4bce58ea Feature: GS methods to scroll viewport for players (#6745) 2018-04-24 19:19:00 +02:00
alberth
f72ad87540 (svn r26802) -Add: Command to set visibility of an engine for a company (based on patch by Juanjo). 2014-09-07 16:12:58 +00:00