Patric Stout
1fb101eabb
Codechange: address CodeQL issue "Multiplication result converted to larger type" ( #10306 )
...
Most are very unlikely to ever be triggered in our codebase; two
stand out: linkgraph and money cheat. Those, potentially, could
wrap earlier than expected.
2 years ago
Jonathan G Rennison
58d841486e
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/os/windows/font_win32.cpp
# src/script/api/script_object.hpp
# src/town_cmd.cpp
# src/train_cmd.cpp
# src/viewport.cpp
# src/viewport_func.h
2 years ago
Peter Nelson
138198e971
Change: Separate ground sprite from foundation sprite offsets.
2 years ago
Jonathan G Rennison
2b38022161
Fix airport catchment overlay not being refreshed when upgrading/moving
2 years ago
Jonathan G Rennison
f32733ef22
Command: Replace binary_length field with auxiliary data
...
Use for CMD_ADD_PLAN_LINE
2 years ago
Jonathan G Rennison
e647075870
Change LinkGraph::EdgeMatrix to a sparse storage format
...
Use a btree_map instead of a SmallMatrix.
This avoids excessive storage requirements for large graphs,
and overly expensive edge matrix resize operations.
Remove next_edge iteration mechanism.
2 years ago
Jonathan G Rennison
1f36c3f3e4
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/ai/ai_gui.cpp
# src/build_vehicle_gui.cpp
# src/genworld_gui.cpp
# src/lang/english.txt
# src/lang/german.txt
# src/lang/korean.txt
# src/newgrf_sound.cpp
# src/roadveh.h
# src/sound.cpp
# src/station_cmd.cpp
# src/train.h
# src/train_cmd.cpp
# src/vehicle.cpp
# src/vehicle_base.h
# src/vehicle_gui.cpp
2 years ago
SamuXarick
a8a7f95665
Change: Allow to build dock on clearable watered object tiles ( #8514 )
2 years ago
Jonathan G Rennison
aa4501747f
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/base_station_base.h
# src/lang/german.txt
# src/saveload/station_sl.cpp
# src/station.cpp
# src/station_cmd.cpp
2 years ago
Jonathan G Rennison
4dc741a8a0
Fix #10011 : Incorrect infrastructure totals when overbuilding bay road stop ( #10143 )
...
Fix https://github.com/OpenTTD/OpenTTD/issues/10011
2 years ago
Nicolas Chappe
a43a1902bb
Feature: [Linkgraph] Prioritize faster routes for passengers, mail and express cargo
...
Passengers usually prefer fast paths to short paths.
Average travel times of links are updated in real-time for use in Dijkstra's algorithm,
and newer travel times weigh more, just like capacities.
(cherry picked from commit 977604ef08
)
2 years ago
Jonathan G Rennison
ac1071f4fc
Merge branch 'master' into jgrpp
...
# Conflicts:
# src/station_cmd.cpp
# src/vehicle_gui.cpp
2 years ago
PeterN
f59f0195e3
Fix: Wrong string used to determine size of zoomed out station sign. ( #10036 )
2 years ago
Jonathan G Rennison
22b2ce0bc6
Fix incorrect infrastructure totals when overbuilding bay road stop
...
With different road/tram type
See: https://github.com/OpenTTD/OpenTTD/issues/10011
2 years ago
Jonathan G Rennison
5a39734a1c
Allow station cargo histories to record larger values than 64k
...
See: #414
2 years ago
Patric Stout
100aca1848
Fix: CmdRemoveRoadStop didn't validate the height property properly ( #9945 )
...
Height was a unsigned 32bit integer, where TileAddWrap uses a
signed 32bit integer for the height. In result, there was an
implicit cast from unsigned to signed, messing things up.
But looking at it from a functional perspective, allowing such
large values is not sensible. In fact, width is restricted to
just a 8bit integer. By changing height to a 8bit integer too,
the implicit cast will never make a positive value negative anymore.
2 years ago
Jonathan G Rennison
19af139631
Fix #9937 : Station industries_near incorrect after removing part moved sign
...
RecomputeCatchment was being called before moving the sign tile
instead of afterwards
2 years ago
Jonathan G Rennison
6150edd3b4
Fix Station industries_near incorrect after removing part moved sign
...
RecomputeCatchment was being called before moving the sign tile
instead of afterwards
See: https://github.com/OpenTTD/OpenTTD/issues/9937
2 years ago
Jonathan G Rennison
9870f2db3a
Fix #399 : Removing non-rectangular airports clearing non-airport tiles
...
Merge-conflict resolution error in 0b0d1547
2 years ago
Jonathan G Rennison
c4e2175cc9
Merge branch 'master' into jgrpp
2 years ago
Jonathan G Rennison
b6c967aae3
Adjust order of station name assignments
2 years ago
Jonathan G Rennison
a54416afbc
Add GRF variable to use extra station names even when default names remain
2 years ago
Jonathan G Rennison
fcc74c1650
Be less strict about distance form centre for town-only station name
...
For large towns
2 years ago
Jonathan G Rennison
8a9afd4621
Add road stops flag for drive-through stops only
2 years ago
Jonathan G Rennison
ad0dc6dc87
Add road stops flag to disable drawing catenary
2 years ago
Tyler Trahan
f92cf38ab5
Feature: Allow disabling local authority control of company actions
2 years ago
Tyler Trahan
fbbc80f79e
Fix #9020 : Update station coverage highlight when adding/removing tiles
2 years ago
Jonathan G Rennison
e24d7c88bc
Add road stop flag to not show one-way road overlays
2 years ago
Jonathan G Rennison
cb573a1523
Add road stop property to set cost multipliers
2 years ago
Jonathan G Rennison
ad046bdf22
Add a waypoint ground draw flag to NewGRF road stops
...
Adjust overlay draw conditions
2 years ago
Jonathan G Rennison
5109083564
Fix spec allocation issues when overbuilding a road stop with the same type
2 years ago
Jonathan G Rennison
1dee6d2796
Fix drawing of custom road stop ground sprites on map
2 years ago
Jonathan G Rennison
50775f8b43
Increase road stop random bits to 8 bits
2 years ago
Jonathan G Rennison
650a359a16
Fix road stop road/tram type variables when not present and in GUI
2 years ago
Jonathan G Rennison
2cbbae16da
Add roadstop GRF properties to set bridge heights and disallowed pillars
2 years ago
Jonathan G Rennison
23c472d2a0
Add support for road stop animation, availability callback
...
Add animation, callback mask, general flags properties
Add animation frame variables
2 years ago
Jonathan G Rennison
0c3988c39b
Fix GetAnimatedTileSpeed_Station for airport tiles
2 years ago
Jonathan G Rennison
64fb6251bf
Implement NewGRF road waypoint selection window
2 years ago
Jonathan G Rennison
66db1863f2
Debug: Add NewGRF inspector support for road stops
2 years ago
Jonathan G Rennison
1084bb8566
Initial support for NewGRF road stops (bus and lorry stops)
2 years ago
J0anJosep
d9a37c915f
Cleanup #9725 : Replace cmd_helper related functions and remove cmd_helper.h.
2 years ago
Jonathan G Rennison
786f80e878
Fix removal of road waypoints during bankruptcy
2 years ago
Jonathan G Rennison
c3c55db02b
Implement road ground types for road waypoints
2 years ago
Jonathan G Rennison
b4fc0b4dc5
Initial implementation of road waypoints
2 years ago
Jonathan G Rennison
d81cbc25b8
Add setting to allow hiding viewport labels of inidivudal waypoints
2 years ago
Yourself
7823c81597
Add: Through load speed limit setting
3 years ago
Jonathan G Rennison
ba824f08c3
Fix re-routing of unrelated cargo when removing invalidated link graph flow
3 years ago
Jonathan G Rennison
89181ea9fd
Add setting to increase cost/distance of aircraft linkgraph links
3 years ago
Jonathan G Rennison
4844268d1c
Fix #9774 : CmdBuildRoadStop updated station acceptance in estimate mode
3 years ago
Jonathan G Rennison
42b223a288
Fix CmdBuildRoadStop updating station acceptance in estimate mode
3 years ago
Michael Lutz
c6d7b98808
Codechange: Un-bitstuff landscape commands.
3 years ago
Michael Lutz
55170ae703
Codechange: Un-bitstuff rail commands.
3 years ago
Michael Lutz
6fe445e6c0
Codechange: Un-bitstuff station/depot/waypoint commands.
3 years ago
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.
3 years ago
Michael Lutz
7048e1522f
Codechange: Move flags in CommandProc in front of the command arguments.
3 years ago
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.
3 years ago
Michael Lutz
b6933a2ebd
Codechange: Move command arguments to the back of the DoCommand function call.
3 years ago
Jonathan G Rennison
9e946d4c5d
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/command.cpp
# src/console_cmds.cpp
# src/group_gui.cpp
# src/lang/catalan.txt
# src/lang/czech.txt
# src/lang/danish.txt
# src/lang/greek.txt
# src/lang/hungarian.txt
# src/lang/irish.txt
# src/lang/japanese.txt
# src/lang/luxembourgish.txt
# src/lang/norwegian_bokmal.txt
# src/lang/romanian.txt
# src/lang/russian.txt
# src/lang/serbian.txt
# src/lang/simplified_chinese.txt
# src/lang/slovak.txt
# src/lang/spanish_MX.txt
# src/lang/swedish.txt
# src/lang/tamil.txt
# src/lang/traditional_chinese.txt
# src/lang/turkish.txt
# src/lang/ukrainian.txt
# src/lang/vietnamese.txt
# src/network/network.cpp
# src/network/network_client.cpp
# src/network/network_func.h
# src/network/network_internal.h
# src/network/network_server.cpp
# src/network/network_server.h
# src/saveload/afterload.cpp
# src/saveload/newgrf_sl.cpp
# src/saveload/saveload.h
# src/script/script_instance.cpp
# src/toolbar_gui.cpp
# src/toolbar_gui.h
# src/vehicle_gui.cpp
# src/widgets/rail_widget.h
# src/widgets/vehicle_widget.h
# src/window.cpp
3 years ago
Jonathan G Rennison
324e90e5ac
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/lang/arabic_egypt.txt
# src/lang/english.txt
# src/lang/greek.txt
# src/network/core/tcp_connect.cpp
# src/network/network_client.cpp
# src/network/network_client.h
# src/pathfinder/npf/npf.cpp
# src/pathfinder/yapf/yapf_ship.cpp
# src/rail_gui.cpp
# src/settings_table.cpp
# src/settings_type.h
# src/station_cmd.cpp
# src/table/settings/gui_settings.ini
# src/town_cmd.cpp
# src/widgets/rail_widget.h
3 years ago
Jonathan G Rennison
9e1bb3eea7
Merge tag '12.0-beta2' into jgrpp-beta
...
# Conflicts:
# docs/landscape_grid.html
# src/lang/simplified_chinese.txt
# src/network/network_server.cpp
# src/station_cmd.cpp
3 years ago
Jonathan G Rennison
f54d69a60a
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# src/economy.cpp
# src/elrail.cpp
# src/graph_gui.cpp
# src/linkgraph/linkgraph_gui.cpp
# src/network/core/game_info.cpp
# src/newgrf_station.cpp
# src/saveload/saveload.cpp
# src/settings.cpp
# src/station_cmd.cpp
# src/station_gui.cpp
# src/strings_func.h
# src/table/settings/network_settings.ini
# src/table/settings/settings.ini
3 years ago
Loïc Guilloux
a4a7240511
Change: Allow all tiles around docks to be docking tiles ( #9578 )
...
(cherry picked from commit 38a64eb2aa
)
3 years ago
Jonathan G Rennison
fd605e3cf3
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# .github/workflows/commit-checker.yml
# src/company_cmd.cpp
# src/console_cmds.cpp
# src/crashlog.cpp
# src/lang/english.txt
# src/lang/german.txt
# src/lang/indonesian.txt
# src/lang/japanese.txt
# src/lang/korean.txt
# src/lang/swedish.txt
# src/linkgraph/linkgraphjob.cpp
# src/linkgraph/mcf.cpp
# src/network/core/tcp.cpp
# src/network/core/tcp.h
# src/network/core/tcp_game.h
# src/network/core/udp.h
# src/network/network.cpp
# src/network/network_admin.cpp
# src/network/network_admin.h
# src/network/network_chat_gui.cpp
# src/network/network_client.cpp
# src/network/network_client.h
# src/network/network_func.h
# src/network/network_internal.h
# src/network/network_server.cpp
# src/network/network_server.h
# src/newgrf.cpp
# src/newgrf_station.cpp
# src/order_gui.cpp
# src/rail_cmd.cpp
# src/saveload/saveload.cpp
# src/settings.cpp
# src/settings_gui.cpp
# src/settings_internal.h
# src/settings_type.h
# src/station_cmd.cpp
# src/stdafx.h
# src/table/currency_settings.ini
# src/table/misc_settings.ini
# src/table/settings.h.preamble
# src/table/settings.ini
# src/terraform_cmd.cpp
# src/timetable_gui.cpp
# src/train_cmd.cpp
# src/tree_cmd.cpp
# src/water_cmd.cpp
3 years ago
Loïc Guilloux
38a64eb2aa
Change: Allow all tiles around docks to be docking tiles ( #9578 )
3 years ago
Jonathan G Rennison
0b0d154788
Merge branch 'master' into jgrpp-beta
...
# Conflicts:
# .github/workflows/ci-build.yml
# src/lang/german.txt
# src/lang/romanian.txt
# src/lang/slovak.txt
# src/lang/turkish.txt
# src/network/core/address.cpp
# src/network/core/tcp.h
# src/network/core/udp.cpp
# src/network/network.cpp
# src/network/network_client.cpp
# src/network/network_server.cpp
# src/network/network_server.h
# src/network/network_udp.cpp
# src/openttd.cpp
# src/saveload/newgrf_sl.cpp
# src/tree_cmd.cpp
# src/video/video_driver.hpp
# src/window.cpp
# src/window_gui.h
3 years ago
SamuXarick
18247bb3b8
Fix #9521 : Don't load at just removed docks that were part of a multi-dock station ( #9524 )
3 years ago
Nicolas Chappe
b83820e723
Change: [Linkgraph] Delete links only served by vehicles stopped in depot
...
A stale link is not deleted if the link refresher finds a vehicle that still serves it.
This commit excludes vehicles stopped in depot for a very long time from the link refresher,
so that their stale links can be deleted.
3 years ago
Joan Josep
cc38a42b07
Fix 659989af45: Set appropriate town window dirty when building/removing airports. ( #9497 )
3 years ago
Nicolas Chappe
977604ef08
Feature: [Linkgraph] Prioritize faster routes for passengers, mail and express cargo
...
Passengers usually prefer fast paths to short paths.
Average travel times of links are updated in real-time for use in Dijkstra's algorithm,
and newer travel times weigh more, just like capacities.
3 years ago
dP
c1d79398d5
Fix: Use of unstable sort when distributing cargo production can cause desyncs
3 years ago
dP
9176fe5f64
Fix: Use of unstable sort when distributing cargo production can cause desyncs
...
(cherry picked from commit 4ed694fe98b146d984826d06b96e0c11045239bc)
See: https://github.com/OpenTTD/OpenTTD/pull/9460
3 years ago
Jonathan G Rennison
4174fe727c
Add NewGRF feature: Extra station name strings
...
These are used when all the default names have been used up,
instead of "Town Station #NNN".
3 years ago
glx22
89ab8b79a5
Codechange: Remove FOR_EACH_SET_BIT
3 years ago
Jonathan G Rennison
5698507d0b
Change station cargo history storage format
...
Use uint16 to avoid truncation issues
Don't reserve memory for unused cargoes
Store history as ring buffer
Update history graph immediately on storage date
Show total waiting cargo
3 years ago
Andreas Schmitt
9b1783809d
Add station cargo history
3 years ago
Jonathan G Rennison
3392d25aa3
Merge PR #274 into jgrpp
3 years ago
rubidium42
55a11710a6
Codechange: convert printf DEBUG statements to fmt Debug statements
3 years ago
Andreas Schmitt
92dad745c9
Fix a small bug
3 years ago
Andreas Schmitt
c4c2fedbb1
Refactor station rating and tooltip - multiply vehicle age check by 10
3 years ago
Jonathan G Rennison
1002c6d9d2
Fix various compiler warnings
...
See: #267
3 years ago
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
3 years ago
rubidium42
2e136285e1
Codechange: move from C-string to std::string for DoCommand
3 years ago
rubidium42
661728558e
Codechange: let IsUnique.* functions accept std::string
3 years ago
rubidium42
b791ffc6de
Fix: do not hide parameter by local variable with the same name
3 years ago
rubidium42
44ca7d9377
Change: Use gender-neutral pronouns
3 years ago
glx22
38c97e1492
Codechange: Replace TILE_AREA_LOOP with range-based for loops
3 years ago
glx22
8333323090
Codechange: Replace FOR_ALL_ROADTRAMTYPES with range-based for loops
...
(cherry picked from commit 2feb801e56
)
3 years ago
Peter Nelson
da571d6481
Codechange: Use std::vector for NewGRF station tile sprite layouts.
...
(cherry picked from commit a3e49178d1
)
3 years ago
Peter Nelson
72bc8c7595
Codechange: Use std::vector for NewGRF station platform layouts.
...
This avoids the need to custom memory management and additional members.
This also resolves use-after-free if modifying copied layouts, so presumably nobody has ever done that.
(cherry picked from commit bd1a20f6ee
)
3 years ago
glx22
050b95e351
Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loops
...
(cherry picked from commit 9a8756d7ed
)
3 years ago
Jonathan G Rennison
95ca147445
Add cheat: town local authority ratings fixed as Outstanding
3 years ago
glx22
2feb801e56
Codechange: Replace FOR_ALL_ROADTRAMTYPES with range-based for loops
3 years ago
Jonathan G Rennison
ece9a356dc
Fix #9113 : Assertion failure when removing airport with order backup ( #9182 )
3 years ago
Jonathan G Rennison
e0d5bf584d
Fix assertion failure when removing airport with order backup
...
See: #252 , https://github.com/OpenTTD/OpenTTD/issues/9113
3 years ago
Peter Nelson
a3e49178d1
Codechange: Use std::vector for NewGRF station tile sprite layouts.
3 years ago
Peter Nelson
bd1a20f6ee
Codechange: Use std::vector for NewGRF station platform layouts.
...
This avoids the need to custom memory management and additional members.
This also resolves use-after-free if modifying copied layouts, so presumably nobody has ever done that.
3 years ago
glx22
9a8756d7ed
Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loops
3 years ago
Jonathan G Rennison
ba2e6087b2
Add train cache flag for whether train using realistic braking physics
3 years ago
Jonathan G Rennison
f1cab62140
Add cheat to fix station ratings at 100%
3 years ago
Jonathan G Rennison
1f360e97a1
Fix building over existing stations bypassing realistic braking moving train restrictions
3 years ago