Patric Stout
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
Rubidium
27eadc13ec
Codechange: rename TILE_ADD(XY) to TileAdd(XY)
2024-03-10 15:50:24 +01:00
Rubidium
bab5a8a787
Codechange: use std::source_location over __FILE__ and __LINE__ for Backup
2024-03-10 10:14:20 +01:00
Michael Lutz
8dda387f82
Codechange: Use std::tuple for slope functions with two return values
2024-03-08 18:08:55 +01:00
Loïc Guilloux
b68d263d5f
Fix #12014 : Remove water when area clearing ship depot ( #12030 )
2024-02-09 18:17:08 +01:00
frosch
b1718478c8
Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
2024-02-02 22:29:28 +01:00
Loïc Guilloux
09b66751cf
Fix b38d3c2208: missing water regions invalidation when building locks ( #11879 )
2024-01-25 22:18:26 +00:00
Kuhnovic
b38d3c2208
Change: simplified water region evaluation, removed savegame data ( #11750 )
2024-01-21 20:56:50 +00:00
Kuhnovic
f1e999ec59
Feature: Region-based pathfinder for ships ( #10543 )
2024-01-08 20:29:05 +01:00
Peter Nelson
d4008850e3
Codechange: Ensure function opening `{` is on new line.
2023-11-09 20:15:38 +00:00
frosch
baf7cc858b
Codechange: Rename ship docking tile related functions.
2023-09-19 22:49:59 +02:00
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49: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
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
2023-04-24 15:56:01 +00:00
Jonathan G Rennison
bb988f940e
Fix #10638 : Incorrect water infra total when building canal over object
...
In the case where the object is on an unowned canal tile and
the new canal tile is owned
2023-04-13 21:34:36 +02:00
Rubidium
e8af8daa68
Codechange: pass "ground vehicle" to GetTileSlopeZ since for tunnel/bridges there are two states
...
Previously it checked the position in non-driving direction to "guess" whether
a ground vehicle was using the function, so on tunnels/bridges it could either
return the Z of the (virtual) ground compared to the Z of the path the vehicle
would take.
2023-04-09 19:00:26 +02:00
Rubidium
580d0a6343
Codechange: make use of Tile in for all direct map accesses
2023-02-28 07:11:48 +01:00
Jonathan G Rennison
b82bcac3cd
Fix #10419 : Water infrastructure accounting when building ship depots
2023-01-29 23:15:53 +01:00
rubidium42
6ba55e663e
Codechange: do not hide variables with other variables
2023-01-29 07:21:34 +01:00
SamuXarick
46dc6da270
Codechange: Make void tiles flood edge tiles, instead of edge tiles flooding themselves ( #8517 )
2023-01-26 21:57:25 +01:00
Rubidium
fe2bcd2a58
Codechange: migrate size related functions to Map structure
2023-01-21 17:11:40 +01:00
SamuXarick
96ec9908a0
Codechange: refactor removal of desert around river tiles
2023-01-15 00:43:41 +01:00
Rubidium
f667a831a5
Codechange: unify creation of diagonal/orthogonal iterator using smart pointers
2023-01-13 21:09:40 +01:00
Tyler Trahan
0fc7cdb1e4
Change: Allow building canal by area outside editor ( #10173 )
2022-11-23 17:48:19 -05:00
SamuXarick
c7505539af
Fix #9869 : remove docking tile when doing a clear square
...
Terraforming through objects placed on water didn't properly remove docking tiles as expected.
By moving some logic regarding removal of docking tiles into DoClearSquare, the issue is solved, while also simplifying code, avoiding repetition elsewhere.
2022-10-16 18:29:03 +02:00
Tyler Trahan
37d318c410
Fix #9870 : Don't update infrastructure totals when overbuilding object on canal
2022-05-14 16:54:36 +02:00
Tyler Trahan
89dba56782
Fix e740c24: Use correct command flag, not just DC_EXEC
2022-02-23 01:36:24 +01:00
J0anJosep
d9a37c915f
Cleanup #9725 : Replace cmd_helper related functions and remove cmd_helper.h.
2022-02-02 21:30:15 +01:00
Michael Lutz
c6d7b98808
Codechange: Un-bitstuff landscape 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
6fe445e6c0
Codechange: Un-bitstuff station/depot/waypoint commands.
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
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
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
b6933a2ebd
Codechange: Move command arguments to the back of the DoCommand function call.
2021-12-16 22:28:32 +01:00
SamuXarick
45edd9f326
Fix: Incorrect error messages on placing water on scenario editor ( #9560 )
...
Additionally changes the behaviour of placing sea on sea/river/canal and placing canal/river on canal to (over)build, instead of disallowing it
2021-09-19 23:14:07 +02:00
SamuXarick
b335b0501c
Fix: wrong error message when building canals over ship depots / locks
...
IsTileType() also considers ship depots and locks water. IsWaterTile() does the right thing.
2021-09-18 13:24:49 +02:00
SamuXarick
6ce74b2a1b
Fix: reduce cost of building canals over objects on sea
...
It is not like we will drain the sea first, to put water back in it after.
Besides, the cost for draining the sea isn't calculated for all other cases either.
2021-09-18 13:24:49 +02:00
glx22
89ab8b79a5
Codechange: Remove FOR_EACH_SET_BIT
2021-07-09 21:36:09 +02:00
rubidium42
2e136285e1
Codechange: move from C-string to std::string for DoCommand
2021-05-29 19:02:18 +02:00
rubidium42
b791ffc6de
Fix: do not hide parameter by local variable with the same name
2021-05-27 18:30:56 +02:00
glx22
38c97e1492
Codechange: Replace TILE_AREA_LOOP with range-based for loops
2021-05-13 00:13:54 +02:00
Tyler Trahan
adb9fa3b36
Feature: Press ctrl to build diagonal rivers in Scenario Editor ( #8880 )
2021-04-02 10:13:27 +02:00
Patric Stout
dff7ee8e1c
Fix #7611 : keeps news about accidents around after vehicle is cleaned up ( #8497 )
...
When a vehicle is cleaned up, all news that points to the news is
also removed. This was a bit evil, as it would also remove any
news related to crashed, acting like the crash never happened.
This left players a bit in the dark what was going on exactly.
2021-01-05 21:39:23 +01:00
SamuXarick
57553cd809
Fix #8020 : Add missing docking tiles around industry neutral stations
2020-03-30 08:21:40 +02:00
Samu
30fe0015e2
Fix #7944 : Demolishing locks built on rivers didn't always restore the river
2020-02-09 20:56:30 +01:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
peter1138
ec2656ab7e
Codechange: Restrict docking points of docks.
2019-06-30 16:46:32 +02:00
peter1138
f538179878
Feature: Multi-tile docks and docking points.
2019-06-30 16:46:32 +02:00