Commit Graph

126 Commits

Author SHA1 Message Date
Jonathan G Rennison
d09b504bc5 Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/release-linux.yml
#	.github/workflows/release-macos.yml
#	.github/workflows/release-source.yml
#	.github/workflows/release.yml
#	CMakeLists.txt
#	COMPILING.md
#	src/ai/ai_core.cpp
#	src/ai/ai_gui.cpp
#	src/bridge_gui.cpp
#	src/company_gui.cpp
#	src/console_cmds.cpp
#	src/core/CMakeLists.txt
#	src/core/smallmap_type.hpp
#	src/disaster_vehicle.h
#	src/effectvehicle_base.h
#	src/fontcache.cpp
#	src/game/game_core.cpp
#	src/game/game_gui.cpp
#	src/gamelog.cpp
#	src/gamelog_internal.h
#	src/group_gui.cpp
#	src/linkgraph/linkgraph.h
#	src/misc.cpp
#	src/network/core/config.h
#	src/network/core/udp.cpp
#	src/network/network_chat_gui.cpp
#	src/network/network_content_gui.cpp
#	src/network/network_gui.cpp
#	src/newgrf.cpp
#	src/newgrf_gui.cpp
#	src/newgrf_profiling.cpp
#	src/newgrf_profiling.h
#	src/object_gui.cpp
#	src/openttd.cpp
#	src/openttd.h
#	src/order_gui.cpp
#	src/os/windows/font_win32.cpp
#	src/rail_gui.cpp
#	src/road.cpp
#	src/road_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.h
#	src/script/api/script_controller.cpp
#	src/script/api/script_roadtypelist.cpp
#	src/script/script_config.cpp
#	src/script/script_config.hpp
#	src/script/script_instance.cpp
#	src/script/script_scanner.cpp
#	src/script/squirrel.cpp
#	src/script/squirrel_helper.hpp
#	src/settings_gui.cpp
#	src/settings_internal.h
#	src/settings_type.h
#	src/table/settings/network_private_settings.ini
#	src/timetable_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/window_gui.h
2023-07-01 02:42:51 +01:00
Jonathan G Rennison
f9c9f53882 Fix town 0 not being included in public roads network
See: #530
2023-06-04 19:01:19 +01:00
Peter Nelson
1a93618bd1 Fix: Road type is not available before its introduction date. 2023-05-12 21:03:13 +02:00
Peter Nelson
5059e23ed5 Revert 8fa61533: "Fix 30ae072: when a road type is hidden, towns may not build them even when that flag is set"
This reverts commit 8fa61533f0.
2023-05-12 21:03:13 +02:00
Tyler Trahan
98d809c33b Codechange: Don't use macros for DAYS_TILL and friends (#10746) 2023-05-07 05:25:24 -04:00
Tyler Trahan
930f0a16d8 Codechange: Define Date/Year/Month/Day within TimerGameCalendar class 2023-04-26 07:14:03 -04: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
82803b98e0 Merge branch 'master' into jgrpp
# Conflicts:
#	src/game/game_gui.cpp
#	src/graph_gui.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/newgrf.cpp
#	src/order_gui.cpp
#	src/saveload/engine_sl.cpp
#	src/saveload/saveload.h
#	src/script/api/script_text.cpp
#	src/script/script_gui.cpp
#	src/settings_table.cpp
#	src/strings.cpp
#	src/table/settings/economy_settings.ini
#	src/table/settings/locale_settings.ini
#	src/timetable_gui.cpp
2023-04-10 15:11:53 +01:00
Peter Nelson
65e0b0dcb7 Codechange: Be consistent with how company masks are set to all. 2023-04-07 22:09:55 +01:00
Jonathan G Rennison
b07d964081 Allow use of GetTownRoadType result in HasRoadTypeAvail for towns 2023-03-06 01:07:16 +00:00
Jonathan G Rennison
faa77e2605 Merge branch 'master' into jgrpp
# Conflicts:
#	src/script/api/script_company.cpp
#	src/script/api/script_date.cpp
#	src/script/api/script_date.hpp
#	src/script/api/script_gamesettings.cpp
#	src/script/api/script_order.hpp
#	src/script/api/script_town.cpp
#	src/script/api/script_window.cpp
2023-03-06 01:05:43 +00:00
Jonathan G Rennison
983790ec7a Remove unused town argument from GetTownRoadType 2023-03-05 21:28:24 +00:00
Rubidium
8fa61533f0 Fix 30ae072: when a road type is hidden, towns may not build them even when that flag is set 2023-03-05 22:01:54 +01:00
Jonathan G Rennison
cbd71b3d58 Merge branch 'master' into jgrpp
# Conflicts:
#	src/order_cmd.cpp
2023-03-05 12:41:58 +00:00
Rubidium
30ae07269d Fix: game scripts must not build with non-existing road types 2023-03-05 07:17:38 +01:00
Jonathan G Rennison
0a8c58b755 Public roads: Fix memory leaks 2023-02-28 01:41:08 +00:00
Jonathan G Rennison
db224585eb Revert "Public roads: Dynamically set A* max search nodes"
This reverts commit acd67a0d0b.
2023-02-26 15:45:41 +00:00
Jonathan G Rennison
8e5371eec4 Public roads: Fix handling of non-trivial foundations 2023-02-26 14:45:40 +00:00
Jonathan G Rennison
ad90f90d43 Public roads: Adjust return type of town_network_distance 2023-02-26 13:31:39 +00:00
Jonathan G Rennison
acd67a0d0b Public roads: Dynamically set A* max search nodes 2023-02-26 13:31:39 +00:00
Jonathan G Rennison
ff189e44e4 Public roads: Handle non-trivial existing foundations 2023-02-26 13:31:39 +00:00
Jonathan G Rennison
2d1b3fb6e7 Public roads: Remove visited towns mechanism
It is excessively expensive, and not needed
2023-02-26 13:31:39 +00:00
Jonathan G Rennison
5641c926bf Public roads: Use robin_hood hash maps for checked towns and town to network 2023-02-26 13:31:39 +00:00
Jonathan G Rennison
b56d7267dc Public roads: Remove unnecessary sorting operations 2023-02-25 22:14:22 +00:00
Jonathan G Rennison
3967a9fdb0 Public roads: Reuse AyStar finder instance 2023-02-25 22:14:22 +00:00
Jonathan G Rennison
06ffc0ba70 Public roads: Avoid dangling pointer issues in AyStar user target 2023-02-25 22:14:22 +00:00
Jonathan G Rennison
f8130f5cb7 Public roads: Remove use of shared_ptr 2023-02-25 22:14:22 +00:00
Jonathan G Rennison
71b6d7a502 Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/arabic_egypt.txt
#	src/station_cmd.cpp
#	src/station_cmd.h
#	src/timetable_cmd.cpp
#	src/train_cmd.cpp
2022-07-30 20:38:34 +01:00
Patric Stout
4651ad94fe Fix: commands with a RoadType in their arguments were not validated properly (#9944)
Although it was checked that RoadType was not 63 (INVALID_ROADTYPE),
and all values lower than 63 are fine, it also allowed values higher
than 63. As the RoadType is a "byte", it could contain values up
to 255.
2022-07-09 10:03:57 +02:00
Jonathan G Rennison
57c0ce1270 Fix public roads when traversing level crossings and other non-normal road 2022-05-29 00:18:31 +01:00
Jonathan G Rennison
8b5b96af77 Fix typos in PostProcessNetworks 2021-10-24 13:33:02 +01:00
Andreas Schmitt
c475fb12c0 Add sanity check 2021-06-19 13:11:03 +01:00
Andreas Schmitt
7a0150735e Adjust the cost function again for better bridge and tunnel use 2021-06-19 13:11:03 +01:00
Andreas Schmitt
d4fd7f62d1 Build a couple of cycles in the network by connecting each town to the three closest ones in its network 2021-06-19 13:11:03 +01:00
Jonathan G Rennison
f53ed56200 Increase bridge/tunnel per-tile cost 2021-06-19 13:11:03 +01:00
Jonathan G Rennison
9683676df1 Use GetTileMaxZ for slope cost check to avoid overly penalising foundations 2021-06-19 13:02:36 +01:00
Jonathan G Rennison
5e7b8ccd43 Only calculate input points once in IsBlockedByPreviousBridgeOrTunnel 2021-06-19 13:02:36 +01:00
Jonathan G Rennison
90e75871ad Fix bridge/tunnel building not using DC_AUTO
This could result in existing infrastructure being removed at
the bridge/tunnel far end
2021-06-19 13:02:36 +01:00
Jonathan G Rennison
724474e435 Use MayTownBuildBridgeType/BSCF_NOT_AVAILABLE_TOWN for bridge type check 2021-06-19 13:02:36 +01:00
Jonathan G Rennison
96bfcd587b Fix signedness mismatch warning in tunnel length check 2021-06-19 13:02:36 +01:00
Andreas Schmitt
a3d1b916d1 Limit tunnel length at the proper place 2021-06-19 13:02:36 +01:00
Andreas Schmitt
3e771dc18d Revert bug inducing change 2021-06-19 13:02:36 +01:00
Andreas Schmitt
b175203d54 Add comment 2021-06-19 13:02:36 +01:00
Andreas Schmitt
a73cb99695 Do not build bridges with additional specs
Prior to this change, additional bridge sets like modular bridges would be used.
Those might not be suitable for public roads. Those bridges should be left to the player.
2021-06-19 13:02:36 +01:00
Andreas Schmitt
198ef11a2b Force the pathfinder to build serpentine roads 2021-06-19 13:02:36 +01:00
Jonathan G Rennison
bd41cb618a Allow using and building trivial foundations
(3 corners raised and 2 opposite corners raised)
2021-06-19 13:02:36 +01:00
Jonathan G Rennison
0f336bba57 Give bridges over the sea a more generous length limit 2021-06-19 13:02:36 +01:00
Jonathan G Rennison
bfdabf4cb2 Allow building on coast tiles 2021-06-19 13:02:36 +01:00
Jonathan G Rennison
63534f97bd Make bridges and tunnels significantly more costly 2021-06-19 13:02:36 +01:00
Jonathan G Rennison
a6f7478873 Adjust comment for BASE_COST_PER_TILE 2021-06-19 13:02:36 +01:00