1
0
Fork 0
Commit Graph

28395 Commits (8c17fad1e004cd8346950324fad2d3ca8da2c0c0)
 

Author SHA1 Message Date
SamuXarick 8c17fad1e0 Codechange: Iterate train group lists for CheckTrainsLengths 2024-01-02 22:28:53 +00:00
SamuXarick e9a4f865b0 Codechange: Simply check whether the group vehicle list is empty for ToolbarVehicleClick 2024-01-02 22:28:53 +00:00
SamuXarick afa050ed65 Codechange: Iterate group vehicle list for RemoveRoadStop, RemoveAirport and HasStationInUse 2024-01-02 22:28:53 +00:00
SamuXarick fe3c0f3203 Change: Iterate group vehicle lists for Station::~Station
As a compromise, the result of this change differs from the original. The VehiclePool was being iterated twice. Do it only once and assume only primary vehicles make use of last_station_visited and last_loading_station.
2024-01-02 22:28:53 +00:00
SamuXarick 1f4ca2ed07 Codechange: Iterate group vehicle list for UpdateAllServiceInterval, UpdateServiceInterval, TrainAccelerationModelChanged, TrainSlopeSteepnessChanged, RoadVehAccelerationModelChanged, RoadVehSlopeSteepnessChanged, CheckFreeformEdges and InvalidateShipPathCache 2024-01-02 22:28:53 +00:00
SamuXarick c5dc61e0f8 Codechange: Iterate group vehicle list for ScriptGroup::GetProfitThisYear and ScriptGroup::GetCurrentUsage 2024-01-02 22:28:53 +00:00
SamuXarick 444a90dda8 Codechange: Iterate group vehicle lists for RemoveOrderFromAllVehicles
Additionally make the function receive one parameter more with the owner of the destination, to help it perform faster.
2024-01-02 22:28:53 +00:00
SamuXarick 17c6259f5c Codechange: Iterate group vehicle lists for NetworkPopulateCompanyStats and NetworkAutoCleanCompanies 2024-01-02 22:28:53 +00:00
SamuXarick becb273ed4 Codechange: Iterate group vehicle lists for WhoCanServiceIndustry 2024-01-02 22:28:53 +00:00
SamuXarick e1f07a56ee Codechange: Iterate group vehicle list for CmdRemoveAllVehiclesGroup 2024-01-02 22:28:53 +00:00
SamuXarick b492a7b53d Codechange: Iterate group vehicle list for CmdAddSharedVehicleGroup 2024-01-02 22:28:53 +00:00
SamuXarick 1fb35c5cce Codechange: Iterate group vehicle list for PropagateChildLivery 2024-01-02 22:28:53 +00:00
SamuXarick 4ee690b911 Codechange: Iterate group vehicle lists for GroupStatistics::UpdateProfits 2024-01-02 22:28:53 +00:00
SamuXarick 89c69f991c Change: Iterate group vehicle lists for GetPreviewCompany and NewVehicleAvailable
As a compromise, the result of this change differs from the original. Since the list only contains primary vehicles, free wagons aren't taken into consideration.
2024-01-02 22:28:53 +00:00
SamuXarick f786477c6d Codechange: Iterate group vehicle lists for SettingsDisableElrail 2024-01-02 22:28:53 +00:00
SamuXarick 71e96fd8a6 Codechange: Iterate group vehicle lists for UpdateCompanyRatingAndValue 2024-01-02 22:28:53 +00:00
SamuXarick fc7fd4655c Change: Iterate group vehicle lists for DisasterTick_Ufo and DisasterTick_Big_Ufo
As a compromise, the result of this change differs from the original. The iteration order changed from lowest to highest vehicle index to lowest to highest company index plus the order at which each vehicle was added to each list regardless of their indexes.
2024-01-02 22:28:53 +00:00
SamuXarick 2ce3d10584 Codechange: Iterate aircraft group list for UpdateAirplanesOnNewStation 2024-01-02 22:28:52 +00:00
SamuXarick e7b505423e Codechange: Iterate group vehicle lists for ScriptVehicleList_Station, ScriptVehicleList_Depot, ScriptVehicleList_Group and ScriptVehicleList_DefaultGroup 2024-01-02 22:28:52 +00:00
SamuXarick b9627b36b9 Codechange: Iterate group vehicle lists for GenerateVehicleSortList 2024-01-02 22:28:52 +00:00
SamuXarick 021817aa61 Change: Update group statistics earlier in AfterLoad
This commit prefaces the next incoming set of commit changes in order to have the vehicle lists already generated as an attempt to prevent AfterLoad actions accessing them empty.
2024-01-02 22:28:52 +00:00
SamuXarick ac1e2ef077 Change: Groups cache vehicle lists
Use std::vector<const Vehicle *> VehicleList for these lists.
2024-01-02 22:28:52 +00:00
Patric Stout aef49e9933
Fix: race-conditions in GUI updates when downloading HTTP files (#11639) 2024-01-02 22:05:25 +01:00
translators 344bdafb53 Update: Translations from eints
latvian: 8 changes by lexuslatvia
polish: 1 change by pAter-exe
2024-01-02 18:40:54 +00:00
Krys Clarke 1cdafcd7ac
Fix: Missing word in conditional order comparator (#11632) 2024-01-02 18:29:25 +00:00
Peter Nelson ae3352582a
Fix: Autorenew failed message consumes arguments. (#11669) 2024-01-02 18:08:04 +00:00
Jonathan G Rennison 48b6b1844a
Change: Limit total script ops that can be consumed by a list valuate (#11670) 2024-01-02 19:02:12 +01:00
Jonathan G Rennison 502a52edd5
Fix: Spurious cancellations of HTTP content downloads (#11668) 2024-01-01 19:13:29 +00:00
translators 3e4dee6d0c Update: Translations from eints
english (us): 11 changes by 2TallTyler
korean: 29 changes by telk5093
2024-01-01 18:38:47 +00:00
Jonathan G Rennison 88324a253e
Fix #11644: Off by one error/buffer over-read in StrMakeValid (#11645)
* Fix #11644: Off by one error in StrMakeValid UTF-8 decode overrun detection

* Fix #11644: Off by one error in StrMakeValid buffer last character

* Fix: Unnecessary string duplication at StrMakeValid call sites
2024-01-01 13:26:31 -05:00
Loïc Guilloux a672813bb0
Add: [Script] Optional filter parameter to ScriptVehicleList constructor (#11663) 2024-01-01 01:07:47 +01:00
Loïc Guilloux f56a2d0f82
Fix: Missing invalidations on gui.ai_developer_tools change (#11664) 2024-01-01 00:43:10 +01:00
Jonathan G Rennison 3e2060f155
Fix #11337: Station blocked/pylon/wire bits with CBID_STATION_TILE_LAYOUT (#11656) 2023-12-31 18:31:01 -05:00
translators 13348b7790 Update: Translations from eints
galician: 13 changes by Xocko12
catalan: 47 changes by J0anJosep
latvian: 14 changes by lexuslatvia
french: 11 changes by ottdfevr
portuguese: 52 changes by azulcosta
2023-12-31 18:38:20 +00:00
Peter Nelson 934545a674
Fix: Calculation of initial engine age was inaccurate. (#11660)
Engine age in months was calculated as the difference in days / 32, instead of the actually difference in months. This would result in engines being artificially younger if a game was started at a later date.
2023-12-31 15:47:32 +00:00
Peter Nelson 7124b4eef1 Codechange: Use std::unique_ptr for all NWidgets. 2023-12-31 15:33:56 +00:00
Peter Nelson 9a3934ae23 Codechange: Use vector/unique_ptr inside widget containers.
This replaces a C-style double-linked-list which required all widgets
to have next/prev pointers, and removes the need for manual pointer management.
2023-12-31 15:33:56 +00:00
Peter Nelson 628092f133 Codechange: Use GetParentWidget to find widget's NWidgetMatrix container. 2023-12-30 22:02:37 +00:00
Peter Nelson c2c65d66ba Codechange: Add GetParentWidget() to widgets.
This allows to get parent widgets in the nested tree from bottom-up.
2023-12-30 22:02:37 +00:00
Peter Nelson 8ff0bef862
Codechange: Make widget index const to prevent changes. (#11658)
This guards against future widget index manipulation.
2023-12-30 18:55:16 +00:00
translators fd782ada05 Update: Translations from eints
russian: 11 changes by lexuslatvia
finnish: 12 changes by hpiirai
latvian: 217 changes by lexuslatvia
2023-12-30 18:38:27 +00:00
Peter Nelson 6215e9bf77
Fix #11655: Crash due to NWidgetMatrix modifying widget->index. (#11657)
NWidgetMatrix modifies its child widget's index to indicate which element
is to be drawn, which now causes issues with code that does not know about
stuffing extra data into the index.

Instead, let NWidgetMatrix store the currently processing element, and
retrieve this information from the matrix widget while child widgets are
being drawn.

This means only widgets that are children of NWidgetMatrix need to know
anything about their extra data.
2023-12-30 18:24:26 +00:00
Charles Pigott 1e60734660
Fix: Compilation with DEBUG_DUMP_COMMANDS enabled (#11607) 2023-12-30 17:46:32 +00:00
Patric Stout 49db7bbe08 Change: add vcpkg.json to instruct vcpkg what dependencies we require
This works on all OSes, making it far simpler for any developer
to jump in. Just install vcpkg, run "vcpkg install" in our root,
and you have all the dependencies.
2023-12-30 18:40:04 +01:00
Patric Stout 0c064b5119 Change: [CI] use vcpkg built-in caching mechanism 2023-12-30 18:40:04 +01:00
Patric Stout 5d86588a45 Change: [CI] pkg-config is installed by default on latest runner 2023-12-30 18:40:04 +01:00
Patric Stout 086bd00f5d Fix: [CI] upgrade curl to a modern version to avoid patching other tools 2023-12-30 18:40:04 +01:00
Patric Stout 3fec8ece5a Change: [CI] always use "latest" image for our runners 2023-12-30 18:40:04 +01:00
Patric Stout d6e8e83052
Fix: [CI] patch in SHF_COMPRESSED symbol for our Linux Generic binaries (#11651) 2023-12-30 14:40:09 +01:00
Peter Nelson f3b4d2a384
Fix #11649: Ignore disabling a widget that does not exist. (#11652)
Orders window has different widget layouts depending on vehicle type
which don't all have the same widgets, and therefore it tries to disable
widgets that might not exist.

Restore the old behaviour of ignoring such requests, instead of crashing.
2023-12-30 13:29:31 +00:00