Commit Graph

32801 Commits

Author SHA1 Message Date
Tyler Trahan
25ad0317fb Feature: Draw infinite water when all borders are water (#13289) 2025-12-08 16:41:31 +05:00
Kuhnovic
e6a05f57e0 Codechange: Set YAPF startup nodes directly. (#14663) 2025-12-08 16:41:27 +05:00
Kuhnovic
c367ad6376 Codechange: Simplified logic of ship leaving a depot. (#14661) 2025-12-08 16:41:24 +05:00
Kuhnovic
839e5fffb2 Codechange: Moved PruneIntermediateNodeBranch to rail pathfinder. (#14662) 2025-12-08 16:41:20 +05:00
Kuhnovic
554913986e Fix bff8501: Gcc 15 warns about duplicate type. (#14660) 2025-12-08 16:41:18 +05:00
Peter Nelson
2af7a99984 Fix #14607: Bridge-over-station discrepancy depending on build order. (#14608)
When building a custom station, the callback-derived tile layout is ignored during the bridge height test. This caused a discrepancy between building a station under a bridge vs building a bridge over the same station.

Test the station tile layout callback during the bridge height test.
2025-12-08 16:41:12 +05:00
Peter Nelson
e2e01eabb5 Fix 3ac1a2f1e4: Game crash due to invalid vehicle type information. (#14628)
Use std::variant instead of union for vehicle info.

RailVehicleInfo is now non-POD so using in a union causes undefined behaviour.
2025-12-08 16:39:52 +05:00
Kuhnovic
22d9c0b2d3 Codechange: Simplified structure of yapf_ship_regions. (#14640) 2025-12-08 16:39:49 +05:00
translators
8797689c10 Update: Translations from eints
hungarian: 5 changes by vargaviktor
2025-12-08 16:39:49 +05:00
Peter Nelson
cd639a774d Fix d85f4b3ebf: Incorrect row height in network server list. (#14653) 2025-12-08 16:39:46 +05:00
Peter Nelson
f5ec253a8e Codechange: Make TownRatingCheckType an enum class. (#14652) 2025-12-08 16:39:02 +05:00
Peter Nelson
7baa01b394 Codechange: Use EnumBitSet for TownFlags. (#14651) 2025-12-08 16:39:00 +05:00
Peter Nelson
29c5157e36 Codefix: Incorrect naming and location of widget names for build docks window. (#14650) 2025-12-08 16:33:54 +05:00
translators
9f7623f137 Update: Translations from eints
chinese (simplified): 4 changes by WenSimEHRP
catalan: 5 changes by J0anJosep
2025-12-08 16:33:54 +05:00
Peter Nelson
1824e42246 Codechange: Add constant for INVALID_WIDGET. (#14649)
Replaces direct use of -1, making it easier to find.
2025-12-08 16:33:52 +05:00
Peter Nelson
18bf0e2b58 Codechange: Call shorter variant of DrawFrameRect and GfxFillRect. (#14647)
Pass rect instead of breaking it up when possible.
2025-12-08 16:31:39 +05:00
Peter Nelson
a660bedc67 Codechange: Deduplicate DrawButtonDropdown. (#14646)
Use Rect methods to position components.
2025-12-08 15:59:56 +05:00
Peter Nelson
8cdc054ef1 Codechange: Don't use Point for non-2D coordinate. (#14645)
`HandleScrollbarHittest` returns min and max coordinates, not x and y.
Also avoid referring to the min and max coordinates as top and bottom, as these functions are used for both vertical and horizontal scrollbars.
2025-12-08 15:59:54 +05:00
Peter Nelson
43eacceea7 Codechange: Move settings entry size global variables. (#14644)
_setting_circle_size and (the incorrectly named) SETTING_HEIGHT variables are now static members of BaseSettingEntry.

Neither of these are constants, so they no longer use constant naming style.
2025-12-08 15:59:50 +05:00
Peter Nelson
48cf1cabbe Fix 6e90b828c6: Off-by-one in Rect::CentreTo. (#14643)
* Rect right/bottom are inclusive so -1 must be taken from width/height.
* Misnamed variable, `new_right` is actually `new_top`.
2025-12-08 15:58:14 +05:00
Peter Nelson
83bd4b6d0f Fix 8c58fb1efd: Doubled beep sounds when clicking toolbar buttons.
* ShowDropDownList() now issues a beep, so individual toolbar buttons no longer need to do it.
* HandleButtonClick() may be called twice for some buttons, as it is called by automatically for PUSH buttons.

This caused some beeps to sound louder than others.
2025-12-08 15:58:10 +05:00
Peter Nelson
c606a3e630 Codechange: Demagicify main toolbar button type.
Use WWT_PUSHIMGBTN for non-menu buttons so they automatically raise, replacing the custom OnTimeout function.
2025-12-08 15:58:05 +05:00
Peter Nelson
2c9ac37b62 Fix #14631, Fix 1cb0cbcb6c: Waypoint customs spec not allocated properly on initial construction. (#14633)
Split AllocateSpecToStation/RoadStop into Allocate and Assign functions, allowing command tests to occur separately.
2025-12-08 15:53:20 +05:00
translators
e21094f04f Update: Translations from eints
vietnamese: 4 changes by KhoiCanDev
2025-12-08 15:53:20 +05:00
Peter Nelson
6e3d0012b1 Fix ed67aedabf: Wrong button type for town menu in scenario editor toolbar. (#14641)
The button was changed from an action to a menu, which should be WWT_IMGBTN instead of WWT_PUSHIMGBTN.
2025-12-08 15:53:17 +05:00
Tyler Trahan
99df8b41e6 Doc: Update station rating comments and doxygen. 2025-12-08 15:53:11 +05:00
Tyler Trahan
415bbb00c4 Codechange: Early continue for cargos not moved by this station 2025-12-08 15:53:06 +05:00
Kuhnovic
726da5e7b2 Change: Add lock penalty to ship pathfinder. (#14603) 2025-12-08 15:53:04 +05:00
Kuhnovic
4f5ef4e720 Codechange: Use YAPF for river builder pathfinder. (#14606) 2025-12-08 15:52:53 +05:00
translators
b015eb5ad7 Update: Translations from eints
korean: 8 changes by telk5093
dutch: 4 changes by Afoklala
portuguese: 10 changes by jcteotonio
2025-12-08 15:52:53 +05:00
Peter Nelson
10651bb638 Change: [Script] Decouple RAILTYPE_INVALID from internal presentation. (#14630)
RAILTYPE_INVALID is now -1, which matches ROADTYPE_INVALID.
2025-12-08 15:52:47 +05:00
translators
2ff2feeb6c Update: Translations from eints
english (au): 4 changes by krysclarke
portuguese: 13 changes by jcteotonio
2025-12-08 15:52:47 +05:00
Peter Nelson
1a61f5cfbe Change: Determine automatic interface scale by window size. (#14627)
Replace OS-dependent interface scaling with scaling dependent on the window size.

This works on all platforms and should provide a more comfortable experience for new players. Manual interface scale setting works as before.
2025-12-08 15:52:43 +05:00
translators
ab553a140c Update: Translations from eints
french: 5 changes by ottdfevr
portuguese: 31 changes by jcteotonio
2025-12-08 15:51:02 +05:00
Jonathan G Rennison
a39cd7a8ef Fix: Variant cycle detection in FinaliseEngineArray (#14629) 2025-12-08 15:50:58 +05:00
Kuhnovic
afd0313802 Fix #14620: Use full file path when deleting files. (#14623) 2025-12-08 15:49:34 +05:00
Peter Nelson
5191e486f9 Change: Apply interface scale to window snap distance. (#14625) 2025-12-08 15:49:30 +05:00
translators
df29f21ccb Update: Translations from eints
swedish: 2 changes by robert-i
norwegian (bokmal): 4 changes by eriksorngard
chinese (traditional): 5 changes by KogentaSan
english (us): 5 changes by 2TallTyler
greek: 2 changes by gh658804
russian: 2 changes by Ln-Wolf
finnish: 2 changes by hpiirai
danish: 2 changes by bscargo
portuguese: 6 changes by jcteotonio
portuguese (brazilian): 9 changes by pasantoro
polish: 12 changes by pAter-exe
2025-12-08 15:49:30 +05:00
translators
6ab463f87f Update: Translations from eints
swedish: 2 changes by robert-i
greek: 2 changes by gh658804
russian: 3 changes by Ln-Wolf
finnish: 2 changes by hpiirai
danish: 3 changes by New-Authentication
portuguese: 44 changes by jcteotonio
portuguese (brazilian): 2 changes by pasantoro
polish: 2 changes by pAter-exe
2025-12-08 15:49:30 +05:00
Tyler Trahan
302872d88a Fix #14588: Show error when unable to clone partly-cleared crashed train (#14591) 2025-12-08 15:49:28 +05:00
Kuhnovic
d3f0c65c76 Change: Removed disable_node_optimization YAPF setting (#14578) 2025-12-08 15:47:42 +05:00
Kuhnovic
28897c9319 Fix 4eaeccd: FioRemove should return false if the file does not exist. (#14619) 2025-12-08 15:47:39 +05:00
Peter Nelson
c40a4bf7fb Fix #14572: Incorrect playlist entry was removed if there are duplicates. (#14583) 2025-12-08 15:47:37 +05:00
Peter Nelson
f0f207fdf8 Fix 313c6c45aa: [Script] Return rail types as list instead of bitmask. (#14617)
This is more idiomatic for scripts, and avoids exposing internal representation.
2025-12-08 15:47:31 +05:00
Kuhnovic
511779e468 Change: Ask for confirmation before deleting a savegame / scenario / heightmap. (#14621) 2025-12-08 15:46:12 +05:00
Peter Nelson
5c06f40019 Cleanup 3ac1a2f1e4: Don't load/save a train's railtypes property. (#14618)
A train's railtypes property is always reset by Train::ConsistChanged on load, so storing is not necessary.
2025-12-08 15:46:09 +05:00
translators
015420b64d Update: Translations from eints
portuguese: 1 change by jcteotonio
2025-12-08 15:46:09 +05:00
Michael Lutz
81c5823b62 Add: Show all railtypes in the build vehicle and engine preview dialogs. 2025-12-08 15:44:49 +05:00
Michael Lutz
e211ab56ef Add: [Script] Function to get all rail types of an rail engine. 2025-12-08 15:44:14 +05:00
Michael Lutz
8639f79934 Add: [NewGRF] Train property to set multiple track types for an engine. 2025-12-08 15:44:12 +05:00