Commit Graph
665 Commits
Author SHA1 Message Date
Rubidiumandrubidium42 6370859c7e Codechange: add missing documentation to destructors 2026-02-24 16:24:53 +01:00
Rubidiumandrubidium42 c859d34c66 Codechange: use designated initialisers for _tile_type_industry_procs 2026-02-18 17:03:33 +01:00
Rubidiumandrubidium42 7aecc268b6 Codechange: add missing @param and @return 2026-02-16 17:19:09 +01:00
Rubidiumandrubidium42 a0b173b43c Codechange: remove @return documentation for void methods 2026-02-15 20:30:26 +01:00
Peter NelsonandGitHub 10f9f13c64 Codechange: use enum class for TreeGround (#15222) 2026-02-03 08:59:56 +00:00
Peter NelsonandPeter Nelson 5c2a37d03e Codechange: use enum class for ClearGround 2026-02-02 18:49:20 +00:00
Rubidiumandrubidium42 bcaf3eaec2 Codefix: wrong parameter names and partially missing parameters 2026-02-02 18:18:51 +01:00
Rubidiumandrubidium42 03c24810b1 Codechange: use scoped enums for timer enumerations, rename one enum 2026-01-29 12:42:27 +01:00
Rubidiumandrubidium42 4adf494ebc Codechange: enum-class-ify Commands 2026-01-28 23:32:51 +01:00
Cyprian Klimaszewskiandrubidium42 97f3e5b70f Codechange: Make TileType enum an enum class. 2026-01-24 08:34:05 +01:00
Peter NelsonandGitHub 2bb6d3350f Fix 595b696d61: Tile suitability test for farm field no longer handled snow tiles. (#15134) 2026-01-19 19:59:57 +00:00
Cyprian Klimaszewskiandrubidium42 25184a23fc Codechange: Make EconomyType an enum class. 2026-01-14 22:07:02 +01:00
Cyprian Klimaszewskiandrubidium42 322ce224b4 Codechange: Make Price an enum class. 2026-01-14 22:07:02 +01:00
Tyler TrahanandGitHub 18f2f7eb2d Codechange: Use enum class for setting values (#15074) 2026-01-10 22:40:48 +00:00
Rubidiumandrubidium42 2fcd4e189a Codechange: replace 'new PoolItem(...' with 'PoolItem::Create(...' 2026-01-03 16:04:32 +01:00
Peter NelsonandGitHub f6eba87e47 Fix #14915: Crash due to divide-by-zero of industry probabilities. (#14918) 2025-12-15 16:42:10 +00:00
Cyprian KlimaszewskiandGitHub 99f04f27de Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-07 11:25:08 +00:00
Peter NelsonandGitHub 9adc4bfc0f Codechange: Make order load/unload flags value types. (#14861)
Order Load and Unload flags have complex logic to ensure that invalid combinations aren't used. In fact, apart from FullLoad and FullLoadAny, all mixed combinations are invalid.

Simplify logic by removing the use of bit values and treat each option as a value.
2025-12-06 18:30:31 +00:00
Tyler TrahanandGitHub 595b696d61 Change: Avoid building farm fields in wetlands (#14846) 2025-12-02 14:28:12 +00:00
Rubidiumandrubidium42 316f36fe14 Codefix: comparison of narrow type with wide type in loop condition 2025-11-24 23:02:00 +01:00
Peter NelsonandGitHub 98275ee5d3 Codechange: Use enum class for water-related enums. (#14804) 2025-11-19 20:35:11 +00:00
Tyler TrahanandGitHub d1376d0b67 Fix #14737: Don't scale custom town and industry counts by land area (#14738) 2025-10-27 18:18:31 +00:00
Peter NelsonandGitHub a1920fc225 Change: Scale towns/industries by amount of land tiles. (#10063) 2025-10-24 16:32:09 -04:00
Jonathan G RennisonandGitHub 2212169a8c Fix: Do not pre-fill industry production history for unused production slots (#14730) 2025-10-24 21:34:35 +02:00
Jonathan G RennisonandGitHub f64e1cdae0 Fix: Industry accept/produce when not contiguous range from 0 (#14555) 2025-09-27 18:12:49 +01:00
Rubidiumandrubidium42 7c0f69a8fe Codefix: typos in comments and strings 2025-08-31 10:30:37 +02:00
Peter NelsonandPeter Nelson f30f808b50 Codechange: Implement tile proc handler to test for building bridge over tile. 2025-08-20 21:40:41 +01:00
Peter NelsonandPeter Nelson d09dfd843c Codechange: Extend industry cargo history to 24 years.
Monthly data is stored for the current 24 months.
Quarterly data is stored for a further 2-6 years.
Yearly data is stored for a further 6-24 years.
2025-07-30 01:13:05 +01:00
Peter NelsonandGitHub 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 NelsonandPeter Nelson 56942a15c7 Add: Industry accepted and waiting history graphs.
Records amount of cargo accepted, and a rolling average of the waiting amount.

Average waiting samples the waiting amount once per day for each industry, spread out over an economy day.
2025-07-20 14:03:54 +01:00
Peter NelsonandPeter Nelson 290144c5c9 Fix #14396: Industry production graph showed zero instead of N/A.
Record the number of valid history records per industry so that the graph avoids showing values which are not present as zero.
2025-07-09 23:02:58 +01:00
Peter NelsonandPeter Nelson 9b55ad5b8d Codechange: Generic type and container for history statistics. 2025-07-09 23:02:58 +01:00
Peter NelsonandGitHub 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
froschandfrosch 6faa667644 Codechange: Remove global GetRegister(), instead return 100+ registers directly from GetXxxCallback(). 2025-05-06 22:24:41 +02:00
froschandfrosch 0d5b3ebd7f Codechange: Declare all IntervalTimers const, which can be const. 2025-05-06 18:29:41 +02:00
Peter NelsonandPeter Nelson 7c834921b2 Codechange: Use FlatSet for per-industry type industry lists. 2025-05-05 14:00:38 +01:00
froschandfrosch b7e7f08f78 Codechange: Simplify usage of GRFFileProps by adding some common helper methods. 2025-04-28 13:44:46 +02:00
froschandGitHub 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
froschandGitHub d7ddea4032 Codechange: Turn AnimationTrigger enums into enum classes. (#14067) 2025-04-21 20:53:31 +02:00
froschandGitHub 61a0a520f6 Codechange: Unify random trigger enums and turn them into enum classes. (#14066) 2025-04-21 20:03:34 +02:00
froschandfrosch f399b8eb29 Codechange: Unify naming of NewGRF animation callbacks. 2025-04-21 19:06:13 +02:00
froschandfrosch 39220a5feb Codechange: Unify naming of NewGRF random trigger functions. 2025-04-21 19:06:13 +02:00
froschandfrosch 368d131fb7 Codechange: Use 'construction stage' consistently, instead of 'construction state'. 2025-04-21 19:06:13 +02:00
froschandfrosch b956af631e Codechange: Replace CircularTileSearch with SpiralTileSequence. 2025-04-20 12:50:45 +02:00
froschandfrosch cde350dc01 Codechange: Replace macros GENERAL_SPRITE_COLOUR and COMPANY_SPRITE_COLOUR with functions GetColourPalette and GetCompanyPalette. 2025-04-18 23:41:37 +02:00
froschandfrosch 03ed59a004 Codechange: Turn AnimationStatus into an enum class. 2025-04-15 20:42:44 +02:00
froschandfrosch b0d678e375 Codechange: Rename _ignore_restrictions to _ignore_industry_restrictions. 2025-04-11 22:11:28 +02:00
Peter NelsonandGitHub 93016b9a92 Fix #13842: Close industry production graph if industry is removed. (#13890) 2025-03-25 17:58:59 +00:00
Peter NelsonandGitHub 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
Peter NelsonandGitHub fc7b6c6cbb Codechange: Use .fill() to clear an array instead of assigning a new array. (#13880)
Avoids allocating a temporary on the stack.
2025-03-23 22:09:45 +00:00