Commit Graph

1057 Commits

Author SHA1 Message Date
Jonathan G Rennison
55146f459f Ensure that SortRailTypes sort is deterministic
Use rail type ID as tie-breaker
2023-02-12 22:18:23 +00:00
Jonathan G Rennison
483e3172af Merge branch 'master' into jgrpp
# Conflicts:
#	src/core/strong_typedef_type.hpp
#	src/gfx.cpp
#	src/group_cmd.cpp
#	src/industry_cmd.cpp
#	src/map_func.h
#	src/newgrf_debug_gui.cpp
#	src/order_cmd.cpp
#	src/pathfinder/follow_track.hpp
#	src/rail_cmd.cpp
#	src/road_cmd.cpp
#	src/road_gui.cpp
#	src/saveload/saveload.cpp
#	src/screenshot.cpp
#	src/smallmap_gui.cpp
#	src/station_cmd.cpp
#	src/strings.cpp
#	src/tile_type.h
#	src/timetable_gui.cpp
#	src/town_cmd.cpp
#	src/train_cmd.cpp
#	src/viewport.cpp
2023-02-10 17:19:35 +00:00
rubidium42
6ba55e663e Codechange: do not hide variables with other variables 2023-01-29 07:21:34 +01:00
Jonathan G Rennison
7701d4e813 Ensure secondary track type is valid when switching to dual mode by removing piece 2023-01-27 19:03:35 +00:00
Rubidium
fe2bcd2a58 Codechange: migrate size related functions to Map structure 2023-01-21 17:11:40 +01:00
Rubidium
f667a831a5 Codechange: unify creation of diagonal/orthogonal iterator using smart pointers 2023-01-13 21:09:40 +01:00
Jonathan G Rennison
160dcc345a Add wrapper class for diagonal or orthogonal tile iteration 2022-12-30 18:09:55 +00:00
Jonathan G Rennison
df86c5cadb Fix Tunnel/bridge signal add/remove costs
Costs now reflect number of signals, not tunnel/bridge length

See: #458
2022-12-04 21:10:31 +00:00
Tyler Trahan
c19abebf8d Feature: Multi-track level crossings (#9931) 2022-11-01 16:51:23 -04:00
Michael Lutz
8e6ed8d5e9 Fix db98cedb: Swap the tile parameter validation around as only the first TileIndex is automatically validated. 2022-10-17 07:54:58 +01:00
Michael Lutz
10daaca5ea Fix db98cedb: Swap parameters for CmdRemoveRailroadTrack, too. 2022-10-17 07:54:58 +01: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
db98cedb7e Fix #9883: Show cost/income float over end tile of rail or road construction 2022-10-16 14:15:31 +02:00
Jonathan G Rennison
23e057cfac Don't apply show signals using default graphics settings for custom styles 2022-07-05 18:14:52 +01:00
Jonathan G Rennison
bd28d5a239 Use order state at reservation time for signal mode tracerestrict eval 2022-07-01 00:33:59 +01:00
Jonathan G Rennison
c19bd4473f Add signal style flag to require realistic braking 2022-06-30 21:20:43 +01:00
Jonathan G Rennison
78ae295dfe Add combined normal and shunt aspect signal style flag 2022-06-27 18:51:26 +01:00
Jonathan G Rennison
21606df9d3 Fix adding second set of signals to tile not setting signal style 2022-06-25 16:43:17 +01:00
Jonathan G Rennison
8249f3d535 Fix land info window not having strings for no-entry signals 2022-06-25 16:37:04 +01:00
Jonathan G Rennison
2f7664fc93 Move signal style mask variables into a single struct 2022-06-25 10:18:48 +01:00
Jonathan G Rennison
fcae909839 Add signal style flag for drawing on the opposite side 2022-06-22 23:45:44 +01:00
Jonathan G Rennison
92723d4f5c Remove tunnel/bridge spacing setting, use usual signal drag spacing 2022-06-19 18:32:47 +01:00
Jonathan G Rennison
191f710c40 Add custom signal style properties to set electric/semaphore enabled types 2022-06-19 17:43:46 +01:00
Jonathan G Rennison
bdd73a19a1 Add signal style flag for unconditional reserve through
Add map bits for unconditional reserve through
Adjust signal aspect/state handling
2022-06-19 04:15:27 +01:00
Jonathan G Rennison
7ae06124ae Add signal style flag for no aspect increase behaviour (banner repeater) 2022-06-19 02:08:38 +01:00
Jonathan G Rennison
6e4c4b35e7 Initial implementation of NewGRF custom signal styles 2022-06-19 02:08:38 +01:00
Jonathan G Rennison
41117a52d2 Signals: Add variable for signal context (track, tunnel, bridge, etc) 2022-06-15 19:03:13 +01:00
Jonathan G Rennison
ba52fbeb91 Signals: Add variable for restriction info, add bit for reserve through 2022-06-12 09:00:31 +01:00
Jonathan G Rennison
9d0e3e22b7 Fix being able to add/remove/modify tunnel/bridge signals when occupied 2022-05-31 21:18:30 +01:00
J0anJosep
d9a37c915f Cleanup #9725: Replace cmd_helper related functions and remove cmd_helper.h. 2022-02-02 21:30:15 +01:00
Jonathan G Rennison
30817c3915 Fix VRF_BEYOND_PLATFORM_END not being cleared when switching order 2022-01-03 12:47:44 +00:00
Jonathan G Rennison
ee7fbfc410 Merge pull request #350 into jgrpp 2022-01-01 02:05:09 +00:00
Jonathan G Rennison
f658d9f1fc Fix rail drag remove removing track even with an unremovable signal
This occurred when a removing a signal was blocked due to realistic
braking moving train restrictions.
This resulted in incorrect signal infrastructure totals and MP desyncs.
2022-01-01 02:04:27 +00:00
Yourself
3f391a74af fix: error when removing tunnelbridge signal w/ tracerestruct 2021-12-31 18:28:44 -07:00
Jonathan G Rennison
f65a166308 Add client setting to show all signals using the default sprites 2021-12-27 18:31:27 +00:00
Joan Josep
e890e7db76 Cleanup #9725: Clean up Doxygen docs and fix typo. (#9753) 2021-12-19 16:51:45 +01:00
Michael Lutz
c6d7b98808 Codechange: Un-bitstuff landscape 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
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
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
Jonathan G Rennison
5349003ec4 Add assert checks to road type infra total changes 2021-12-07 02:30:08 +00:00
Jonathan G Rennison
de6cf4de24 Check blocking train reservation before removing signals in CmdRemoveSingleRail 2021-12-05 21:46:09 +00:00
Jonathan G Rennison
4ccbb11440 Only show level crossing overlay sprites on outsides of multi-track crossings
When using both adjacent crossings and safer crossings
2021-11-20 01:42:54 +00:00
dP
54951e39a1 Fix #8797: Use logical rail length when placing signals (#9652) 2021-11-19 00:07:22 +00:00
Jonathan G Rennison
74bfe4e6d2 Allow placing routing restrictions on tunnel/bridge entrance/exit signals
No reserve through support
2021-11-13 22:28:14 +00:00
Jonathan G Rennison
fb604ded6b Fix restricted signal bit with semaphores for GRF custom signals 2021-11-08 00:51:45 +00:00
Jonathan G Rennison
1e0bea5b8d Replace FindFirstBit/FindFirstBit64 with a single template function 2021-11-01 23:00:44 +00:00