Commit Graph

838 Commits

Author SHA1 Message Date
Tyler Trahan
bd264145e5 Fix #9071: Don't consider tram tracks when growing towns (#14833) 2025-12-08 21:34:24 +05:00
Tyler Trahan
a67fec79e0 Change: Ensure generated towns have enough room (#14803) 2025-12-08 21:31:06 +05:00
Tyler Trahan
5800870c3f Fix #14737: Don't scale custom town and industry counts by land area (#14738) 2025-12-08 20:01:57 +05:00
Peter Nelson
2608ff2bac Change: Scale towns/industries by amount of land tiles. (#10063) 2025-12-08 20:00:07 +05:00
Peter Nelson
427ba3bfd3 Codechange: Iterate road/tram masks instead of checking each type. (#14716) 2025-12-08 19:52:50 +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
dP
6fe80d1354 Merge remote-tracking branch 'upstream/master' 2025-10-19 03:29:50 +05:00
dP
03d6e2bef2 Fix clang compilation 2025-10-17 23:56:45 +05:00
dP
94b4db3a72 Move event functions out of cm_main.hpp 2025-10-02 22:52:25 +05:00
dP
8404c2a7cc Merge remote-tracking branch 'upstream/master' 2025-09-28 02:33:49 +05:00
dP
3386f8caff Merge branch 'v14' 2025-09-04 23:08:10 +05:00
dP
4fec64525a Merge branch 'openttd' 2025-09-01 23:28:07 +05:00
Rubidium
7c0f69a8fe Codefix: typos in comments and strings 2025-08-31 10:30:37 +02:00
Peter Nelson
f30f808b50 Codechange: Implement tile proc handler to test for building bridge over tile. 2025-08-20 21:40:41 +01:00
Su
85af200788 Add: Identify cities on the main viewport by appending an icon to their names (#14504)
Co-authored-by: Peter Nelson <peter1138@openttd.org>
2025-08-15 16:49:25 -04:00
Peter Nelson
bd57aee3a9 Add: Town cargo history graphs. (#14461) 2025-08-02 23:19:43 +01:00
Peter Nelson
921d83c324 Codechange: Unify structures with sprite sub-tile bounds and simplify bounding boxes. (#14424)
Lots of different structs contain variations on sub-tile bounds with different naming. Unify into a single struct that can be inherited and passed directly to AddSortableSpriteToDraw.

At the same time, offsets now work more logically: sub-tile bounds now specify the bounding box, and an offset can be applied to the sprite.
2025-07-22 00:02:00 +01:00
Peter Nelson
67e56391c7 Fix #8167: No error sub-message when trying to clear protected buildings. (#14444) 2025-07-14 23:23:15 +01:00
dP
73cdeac5a1 Fix compilation erorrs 2025-06-30 14:21:06 +05:00
dP
d75253d491 Fix apm and average apm display 2025-06-30 00:32:52 +05:00
dP
0fe7c3635c Fix compilation errors after the merge 2025-06-27 18:03:03 +05:00
dP
f0f93c68ca Merge remote-tracking branch 'upstream/master' 2025-06-14 17:01:17 +05:00
dP
f388ddce1f Merge branch 'openttd' 2025-06-09 19:30:22 +05:00
Peter Nelson
ecafbf884e Add: Allow separate expansion of town buildings and roads in scenario editor. (#14341) 2025-06-07 13:56:43 +00:00
dP
df3a6e321f Merge remote-tracking branch 'upstream/master' 2025-05-14 18:41:13 +05:00
frosch
c6fa5022cb Add: [NewGRF] All callbacks returning D0xx strings, have now the option to return any string id via register 0x100. 2025-05-09 12:39:11 +02:00
frosch
6faa667644 Codechange: Remove global GetRegister(), instead return 100+ registers directly from GetXxxCallback(). 2025-05-06 22:24:41 +02:00
frosch
592cc49b62 Codechange: Turn _grow_town_result into a local variable in GrowTownAtRoad. 2025-05-06 20:58:17 +02:00
frosch
5af877d12d Codechange: Do not assign _grow_town_result in GrowTownInTile, instead return the new value. 2025-05-06 20:58:17 +02:00
frosch
22af391064 Codechange: Move _grow_town_result out of GrowTownWithExtraHouse, GrowTownWithRoad, GrowTownWithBridge and GrowTownWithTunnel. 2025-05-06 20:58:17 +02:00
frosch
0d5b3ebd7f Codechange: Declare all IntervalTimers const, which can be const. 2025-05-06 18:29:41 +02:00
Iris-Persephone
2f020abe74 Add: "Many random towns" button in scenario editor now prompts for the number of towns, with defaults based on new game settings (#14158) 2025-05-02 22:54:21 +01:00
Peter Nelson
2c4897c2cd Codechange: Use EnumBitSet for HouseZones. (#14137) 2025-04-28 20:27:43 +01:00
frosch
b7e7f08f78 Codechange: Simplify usage of GRFFileProps by adding some common helper methods. 2025-04-28 13:44:46 +02:00
frosch
0d9074769d Change: [NewGRF] Animation-trigger 'construction stage changed' of houses and industries now also triggers at construction start. (#14089) 2025-04-26 14:42:49 +02:00
frosch
f399b8eb29 Codechange: Unify naming of NewGRF animation callbacks. 2025-04-21 19:06:13 +02:00
frosch
2a62eea005 Codefix: Comment style. (#14064) 2025-04-21 17:25:09 +02:00
frosch
b956af631e Codechange: Replace CircularTileSearch with SpiralTileSequence. 2025-04-20 12:50:45 +02:00
Peter Nelson
936d78fefc Codefix: Avoid uppercase characters in variable names. (#13985) 2025-04-10 07:19:27 +01:00
Peter Nelson
91ab7f10cd Codefix: Avoid using override keyword as member name.
Rename `GRFFileProps` `override` member to `override_id`.
2025-04-09 22:02:35 +01:00
Peter Nelson
b96b26ef15 Codechange: Rename short CargoType parameters cargo. (#13848)
Rename CargoType variables and parameters using short or meaningless names.
2025-03-24 18:18:21 +00:00
Rubidium
0b102db421 Codefix: initialise a few uninitialised variables 2025-03-08 18:01:25 +01:00
Peter Nelson
b55af05626 Codechange: Pass encoded script strings as EncodedString.
This removes the ambiguity of having std::strings that may or may not be encoded.
2025-03-04 21:40:39 +00:00
dP
a955f0f3cc Merge 1.5.0-beta1 2025-02-27 17:55:40 +05:00
Peter Nelson
96f260e718 Codechange: Pass TileDesc by reference. 2025-02-23 23:00:51 +00:00
Peter Nelson
6e10584b91 Codechange: Use EncodedStrings for News messages. (#13654) 2025-02-23 20:24:02 +00:00
Rubidium
fd4adc55e3 Codechange: replace INVALID_X with XID::Invalid() for PoolIDs 2025-02-16 20:23:00 +01:00
Rubidium
380e7b48ce Codechange: use std::variant instead of a custom version for news references 2025-02-16 14:50:15 +01:00
Peter Nelson
2d7d085e8e Codechange: Use EncodedString for error messages. (#13569) 2025-02-16 10:04:32 +00:00