Commit Graph

31957 Commits

Author SHA1 Message Date
Tyler Trahan ffefae5d28 Fix #14737: Don't scale custom town and industry counts by land area (#14738) 2025-12-08 04:43:42 +05:00
translators 7229f830f3 Update: Translations from eints
norwegian (bokmal): 12 changes by eriksorngard
portuguese: 1 change by jcteotonio
polish: 2 changes by pAter-exe, 2 changes by Rito13
2025-12-08 04:43:42 +05:00
translators ef7897498d Update: Translations from eints
english (au): 11 changes by krysclarke
swedish: 11 changes by robert-i
chinese (traditional): 11 changes by KogentaSan
greek: 11 changes by gh658804
russian: 13 changes by Ln-Wolf
finnish: 15 changes by hpiirai
portuguese: 44 changes by jcteotonio
portuguese (brazilian): 11 changes by pasantoro, 1 change by jcteotonio
polish: 10 changes by Rito13, 1 change by pAter-exe
2025-12-08 04:43:42 +05:00
translators 34d60862c1 Update: Translations from eints
galician: 1 change by pvillaverde
2025-12-08 04:43:42 +05:00
Peter Nelson ede3e19eb4 Change: Scale towns/industries by amount of land tiles. (#10063) 2025-12-08 04:41:52 +05:00
Rito12 8edc88b7fe Add: Show height difference in bridge is too low error message. (#14614) 2025-12-08 04:40:49 +05:00
Rito12 5379df1712 Add: Game units for height. (#14615) 2025-12-08 04:39:45 +05:00
Jonathan G Rennison b141d44362 Fix: Do not pre-fill industry production history for unused production slots (#14730) 2025-12-08 04:39:40 +05:00
Oliver Bechstein-Rumble 34e3a8df44 Fix #14240: Remember previous GUI scale when toggling auto-detect (#14380) 2025-12-08 04:39:36 +05:00
Peter Nelson b4908fe534 Fix: Don't set set town index for depot tiles. (#14729) 2025-12-08 04:39:31 +05:00
Peter Nelson de9984f379 Codechange: Prefer string equality instead of comparison. (#14727) 2025-12-08 04:39:16 +05:00
Loïc Guilloux 596e347d14 Codechange: Add prefix to dependabot commits (#14691) 2025-12-08 04:39:16 +05:00
SamuXarick 8d13fc6e3b Doc 80666a0: Fix typo in game script changelog (#14714) 2025-12-08 04:39:16 +05:00
Peter Nelson 13c1bda3fd Codechange: Use single vector for next station order.
Pass vector to insert into to avoid handling multiple vectors.

This may change the order of returned stations.
2025-12-08 04:38:33 +05:00
Peter Nelson 7f2b8f49f9 Codechange: Remove StationIDStack and SmallStack.
Use a std::vector or std::span instead.
2025-12-08 04:36:44 +05:00
Peter Nelson 5b9dad4ac3 Codechange: Iterate road/tram masks instead of checking each type. (#14716) 2025-12-08 04:35:07 +05:00
Tyler Trahan e0f7fb74c4 Doc: Define policy on AI usage in OpenTTD development (#14537) 2025-12-08 04:35:07 +05:00
SamuXarick 12d83e8165 Codechange: Optimize FlowRiver (#13264) 2025-12-08 04:33:13 +05:00
Peter Nelson 2fb91b0ac6 Codechange: [Script] Add regression test for company president gender. 2025-12-08 04:33:13 +05:00
Peter Nelson 92029336a7 Fix a46a3a97f3: Incorrect parameter order for CmdSetCompanyManagerFace.
Style and bits were mixed up. Switch everything to style first, as the most significant parameter.
2025-12-08 04:33:09 +05:00
Peter Nelson e4a8f7d1e4 Codechange: Silence uninitialized variable warning from GCC. (#14715)
`is_custom_layout` is not used uninitialized but GCC does not know that and produces a warning.
2025-12-08 04:33:06 +05:00
translators 527921a975 Update: Translations from eints
swedish: 1 change by robert-i
norwegian (bokmal): 4 changes by eriksorngard
chinese (simplified): 4 changes by WenSimEHRP
catalan: 1 change by J0anJosep
danish: 4 changes by bscargo
latvian: 8 changes by lexuslatvia
dutch: 4 changes by Afoklala
french: 5 changes by ottdfevr
2025-12-08 04:33:06 +05:00
Peter Nelson 9606fd085e Fix ef71ce0a9d: Crash when user enters a blank line in the console. (#14711)
Crash caused by reading outside the bounds of string_view (though not the underlying buffer)
2025-12-08 04:33:03 +05:00
Peter Nelson 09858583be Codefix: Make sure safeguards.h is the last included non-table header. (#14687) 2025-12-08 04:32:55 +05:00
Rito12 cc0c274296 Codefix: Remove double SetDirty() calls. 2025-12-08 04:32:52 +05:00
Peter Nelson 962ac9fcbf Codechange: Dereference with x-> instead of (*x). (#14700) 2025-12-08 04:31:05 +05:00
Peter Nelson 47ab2d3bb5 Codechange: Script list iterator tidying. (#14698)
* Use `iter->` instead of `(*iter).`
* Use prefix instead of postfix operators
* Use `auto` instead of explicit iterator type.
* Use `std::next()` instead of assignment then increment.
* Use range-for where possible.
2025-12-08 04:31:04 +05:00
Peter Nelson 5559b9a4d2 Codechange: Use find/find_if to search for rail/road types by label.
Replaces manual loops.
2025-12-08 04:31:02 +05:00
Peter Nelson 5eaa73901f Codechange: Use FlatSet to store and test alternate rail/road types. 2025-12-08 04:30:00 +05:00
Peter Nelson 62e9ac00b9 Fix f6c5da4cad: dump_info should not reverse non-ASCII label. (#14697)
Cargo/rail/road types labels are already in appropriate endian-ness.
2025-12-08 04:29:55 +05:00
translators ebd13f353f Update: Translations from eints
chinese (traditional): 4 changes by KogentaSan
english (us): 1 change by 2TallTyler
korean: 1 change by telk5093
polish: 1 change by pAter-exe
2025-12-08 04:29:55 +05:00
Peter Nelson 25802b4df5 Fix: Bootstrap ignored default OpenTTD truetype fonts. (#14684)
Bootstrapping assumed that glyphs must be missing if there is no baseset, ignoring whether there actually are glyphs missing.
2025-12-08 04:28:53 +05:00
translators 5da3fe0caf Update: Translations from eints
english (au): 1 change by krysclarke
greek: 1 change by gh658804
hungarian: 4 changes by vargaviktor
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
portuguese: 1 change by jcteotonio
portuguese (brazilian): 1 change by pasantoro
2025-12-08 04:28:53 +05:00
Peter Nelson f792e82d0b Change: Make groups window group list aware of interface scaling. 2025-12-08 04:28:51 +05:00
Peter Nelson a43bb1ec0b Codechange: Use Rects for group window drawing.
Simplifies handling of LTR/RTL coordinates.
2025-12-08 04:28:48 +05:00
Peter Nelson 3cf39972dc Change: Provide road and rail overlay sprites for bridge decks. (#14557)
This allows bridges designed primarily with NewGRF railtypes and roadtypes to be at least somewhat compatible with built-in rail and road.
2025-12-08 04:27:30 +05:00
Rubidium c5d910a9aa Codechange: make all Providers fully const (Font/Screenshot/Sound) 2025-12-08 04:27:19 +05:00
Peter Nelson d432757676 Fix 9cdf740097: Don't make copy of format providers when making a screenshot. (#14681)
While here, use projection instead of lambda to select provider.
2025-12-08 04:27:17 +05:00
Peter Nelson 988467df79 Add: Include build cost in rail/road dropdowns. (#14599) 2025-12-08 04:27:08 +05:00
translators 130368065b Update: Translations from eints
english (us): 3 changes by 2TallTyler
galician: 9 changes by pvillaverde
2025-12-08 04:27:08 +05:00
Su cc5f738cec Change: replace the "(City)" identifier in the town directory with the city icon (#14634) 2025-12-08 04:27:07 +05:00
Peter Nelson d280669959 Codechange: Initialise rail/road types with range-for.
Replace double loop with single loop that performs both parts together.
2025-12-08 04:27:04 +05:00
Peter Nelson eed63628f5 Codechange: Use std algorithm when allocating rail/road type.
Use `std::ranges::find()` instead of a `for`-loop to allocate rail and road types.
2025-12-08 04:27:01 +05:00
Peter Nelson c6f657fb62 Codechange: Make GetRail/RoadTypeInfoIndex() a member method.
This follows a similar pattern used for cargoes, houses and objects.

Also fixes incorrect documentation of GetRoadTypeInfoIndex().
2025-12-08 04:25:59 +05:00
Peter Nelson 0812a641ae Codechange: Cleanup unnecessary includes of spritecache.h (#14678) 2025-12-08 04:25:46 +05:00
Peter Nelson d50dd18215 Codechange: Replace Rect CentreTo with CentreToHeight. (#14675)
So far all callers only need to centre vertically, so not having to provide the existing width simplifies calls.
2025-12-08 04:24:01 +05:00
Peter Nelson de0b4b4918 Change: Support interface scaling in network client list buttons. 2025-12-08 04:23:57 +05:00
Peter Nelson 056cccfb71 Codechange: Rework network client list buttons.
Instead of calculating and storing which buttons to display for each
line and then further calculating what each line should be when
displaying it, store everything on one pass.

This simplifies/deduplicates logic.
2025-12-08 04:23:54 +05:00
translators 4fea930bdf Update: Translations from eints
english (au): 3 changes by krysclarke
swedish: 3 changes by robert-i
korean: 3 changes by telk5093
greek: 3 changes by gh658804
russian: 3 changes by Ln-Wolf
finnish: 3 changes by hpiirai
catalan: 3 changes by J0anJosep
portuguese: 3 changes by jcteotonio
portuguese (brazilian): 3 changes by pasantoro
polish: 3 changes by pAter-exe
2025-12-08 04:23:54 +05:00
Peter Nelson 7c3f8825fa Codechange: Use Rect WithX/WithY in some places. 2025-12-08 04:23:46 +05:00