1
0
Fork 0
Commit Graph

31484 Commits (16276085a6615cdd06cc3fa2c3f0e78abb5f2d64)
 

Author SHA1 Message Date
Peter Nelson e2d066e5d3
Codefix: Effect vehicles don't use v->tile, so shouldn't be in the vehicle tile hash. (#14302) 2025-05-26 21:45:46 +01:00
translators e23a591a1e Update: Translations from eints
galician: 10 changes by pvillaverde
turkish: 20 changes by BeratSJ
latvian: 2 changes by lexuslatvia
2025-05-26 04:49:25 +00:00
Peter Nelson b042e7a439
Codefix: Prefer `static inline const` keyword order. (#14301) 2025-05-25 20:32:56 +01:00
Peter Nelson 948ceb3b17 Add: Button to configure badges in build picker window. 2025-05-25 09:13:05 +01:00
Peter Nelson f28dc3cca4 Add: Button to configure badges in build vehicle window. 2025-05-25 09:13:05 +01:00
Peter Nelson c2d4098afa Add: Configuration of NewGRF badges. 2025-05-25 09:13:05 +01:00
Peter Nelson daef052329 Add: Generic "configure list/view" vertical ellipsis icon. 2025-05-25 09:13:05 +01:00
Peter Nelson 29970fb496 Codechange: Add DropDownToggle component. 2025-05-25 09:13:05 +01:00
Peter Nelson 6e90b828c6 Codechange: Add CentreTo Rect method. 2025-05-25 09:13:05 +01:00
Peter Nelson c213218b66 Codechange: Pass click state to Dropdown Draw() function.
This allows drawing to change depending on last click position.
2025-05-25 09:13:05 +01:00
Peter Nelson 984d864c72 Codechange: Add OnClick handler for dropdown items.
This allows each dropdown item to indicate if something different should happen depending on where in the item was clicked.
2025-05-25 09:13:05 +01:00
Peter Nelson 04e07dff84 Codechange: Add Up/Down buttons, to fit in with the settings-button style. 2025-05-25 09:13:05 +01:00
translators b82e32c360 Update: Translations from eints
norwegian (bokmal): 1 change by eriksorngard
spanish (mexican): 1 change by absay
chinese (simplified): 1 change by WenSimEHRP
korean: 1 change by telk5093
danish: 68 changes by bscargo
2025-05-25 04:48:20 +00:00
Loïc Guilloux 5e765a2787
Codechange: [CMake] Use ".sq.hpp" instead of ".hpp.sq" for API exports (#14297) 2025-05-24 22:38:37 +02:00
SamuXarick 8031d68d01 Change: Ships may reverse on find closest depot order
Ships may be allowed to reverse when:
- manually ordered to find the closest ship depot.
- executing an updated order to find the closest ship depot after departing from a station.
2025-05-24 18:08:46 +01:00
SamuXarick 7df9426000 Change: Find nearest depot to entry edge in intermediate region
When using an intermediate region, find the depot closest to the edge where it entered the region from.
2025-05-24 18:08:46 +01:00
Samu 0b44deedd0 Fix #5713: Use pathfinder to find closest ship depot
When ships are asked to find the closest depot, the depot that is provided is not always reachable. This patch provides the closest reachable ship depot, by utilizing the pathfinder.
2025-05-24 18:05:59 +01:00
Kuhnovic 34c0b09764
Codechange: Removed T prefix from water region related types. (#14290) 2025-05-24 18:12:16 +02:00
Loïc Guilloux fea120a710
Fix #14295, 0455627d16: v->cur_implicit_order_index is never INVALID_VEH_ORDER_ID (#14296) 2025-05-24 13:53:51 +00:00
translators c366e6a48e Update: Translations from eints
chinese (simplified): 1 change by WenSimEHRP
dutch: 1 change by Afoklala
2025-05-24 04:44:57 +00:00
Peter Nelson b42abfbefc
Fix 0455627d16: Incorrect script order position mapping. (#14294) 2025-05-23 19:55:22 +01:00
Kuhnovic 180ec6505b
Codechange: Use strong types for water regions. (#14289) 2025-05-23 20:54:42 +02:00
Peter Nelson 0455627d16
Codechange: Move ownership of Orders to OrderList. (#13948)
Removes the orders pool, and orders are now stored directly in each OrderList.

Iterating orders now no longer needs to traverse a linked-list, all orders in an OrderList are sequential.
2025-05-23 10:36:28 +01:00
Peter Nelson 7344dfe651 Change: Reflow Textfile window content incrementally.
This avoids a stall when reflowing a long text file with some truetype fonts.
2025-05-23 07:42:10 +01:00
Peter Nelson 46b745a06a Codechange: Use a helper method to test if text file window is wrapped. 2025-05-23 07:42:10 +01:00
Peter Nelson 940071a5f2 Codechange: Add alternating iterator to take elements from middle of range. 2025-05-23 07:42:10 +01:00
Peter Nelson 780c26237f Codechange: Add OnScrollbarScroll window event, called when a scrollbar position changes. 2025-05-23 07:42:10 +01:00
translators 321f7e8683 Update: Translations from eints
swedish: 3 changes by joeax910
2025-05-23 04:45:57 +00:00
Peter Nelson 1064309ecf
Change: Don't measure group name widths in company livery window. (#14291)
Measuring the name width did not also take account of indentation levels so didn't prevent cropping, and the window can be resized anyway.

This avoids a potential bottleneck due to layouting group names if there are a lot of groups present.
2025-05-22 22:57:50 +01:00
SamuXarick 5fef32bde7
Change: [Script] Move GSStation::GetOwner to GSBaseStation::GetOwner (#13406)
* Add: [Script] GSBaseStation::GetOwner

Added method for Game Scripts to retrieve the owner of a basestation.

* Cleanup: [Script] Remove ScriptStation::GetOwner

Due to class inheritance, GSStation::GetOwner and GSWaypoint::GetOwner can both reach GetOwner defined at GSBaseStation.
2025-05-22 13:47:04 +02:00
translators 467f832c2f Update: Translations from eints
english (au): 1 change by krysclarke
chinese (traditional): 10 changes by KogentaSan
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
latvian: 1 change by lexuslatvia
portuguese: 1 change by jcteotonio
portuguese (brazilian): 1 change by pasantoro
polish: 10 changes by pAter-exe
2025-05-22 04:47:11 +00:00
Peter Nelson 5fe6578f64
Codechange: Improve performance of exclusive preview engine test. (#14270)
Check group statistics to test if a company has built an exclusive preview engine.

This improves performance by avoiding iterating the vehicle pool.
2025-05-21 21:19:38 +01:00
Peter Nelson 9f190aa534 Codechange: Use group's children list to improve performance of group UI. 2025-05-21 19:50:07 +01:00
Peter Nelson 000a79c093 Codechange: Improve performance of evaluating group hierarchy.
Store a list of child groups in each group, to avoid having to iterate the group pool to find its children.
2025-05-21 19:50:07 +01:00
SamuXarick 8f3f25de4b
Codefix: Missing 'this->' in VehiclesNearTileXY::Iterator::Iterator (#14288) 2025-05-21 20:28:47 +02:00
Peter Nelson 1d8db2223f
Fix #14234, 5aa4ad5135: Crash due to unexpected NUL char in string. (#14235)
Gracefully handle an unexpected NUL character in non-debug builds.
2025-05-21 18:47:04 +01:00
translators 82876c25e0 Update: Translations from eints 2025-05-21 04:46:46 +00:00
Peter Nelson a2addf0fe7
Fix: Clear rail vehicle flipped flag if reverse probability callback returns false. (#14281)
This now distinguishes between not-flipped and callback not implemented.
2025-05-20 23:03:55 +01:00
Peter Nelson acf594a7b7
Fix #14271, 7fd0e6c27d: Crash due to incorrect parameter index in string. (#14272) 2025-05-20 23:03:27 +01:00
Loïc Guilloux 4b1b2a4310
Change: [Script] Don't allow scripts to instantiate ScriptEvent (#14276) 2025-05-20 15:37:05 +02:00
frosch 2926179d02 Fix: Restore the behaviour when entering numbers in query windows: clamp integers out of range to the maximum valid value. 2025-05-20 12:57:30 +02:00
frosch c1389c77b2 Codechange: ParseInteger optionally clamps out-of-range values, instead of treating them as invalid. 2025-05-20 12:57:30 +02:00
translators ecadf1b322 Update: Translations from eints
hungarian: 4 changes by meskobalazs
2025-05-20 04:46:13 +00:00
Peter Nelson ce83f583bc
Codechange: Use EnumBitSet for VehicleRailFlags. (#14280) 2025-05-19 18:56:45 +01:00
Peter Nelson 77d6f6c69f
Codechange: Make ContentType::State an enum class. (#14279) 2025-05-19 17:11:28 +01:00
SamuXarick ad3a34e9ef
Add: [Script] ScriptVehicleList_Waypoint (#13456)
Creates a list of vehicles that have orders to a given waypoint.
2025-05-19 14:48:17 +02:00
Loïc Guilloux 1b0fd0e6fd
Fix b2c57123: [Script] Conversion from ScriptEvent to ScriptEventCompanyTown subclasses (#14274) 2025-05-18 15:40:47 +02:00
translators 9bbc525e53 Update: Translations from eints
catalan: 17 changes by J0anJosep
2025-05-18 04:50:09 +00:00
Peter Nelson 940a7127f8
Fix f8bdc1e612: Empty first parameter of EncodedString was skipped. (#14273)
This would place the remaining parameters one position too early.
2025-05-17 22:55:48 +00:00
translators 617169c1c9 Update: Translations from eints
norwegian (bokmal): 2 changes by eriksorngard
english (us): 9 changes by 2TallTyler
romanian: 3 changes by The-Bober
dutch: 2 changes by Afoklala
2025-05-17 04:44:32 +00:00