1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-07-07 04:49:38 +01:00
Commit Graph

21 Commits

Author SHA1 Message Date
Peter Nelson
75387b9e2b Codechange: Use EnumBitSet for StationFacility. 2025-02-13 18:03:13 +00:00
Rubidium
e894a5880c Codechange: rename CargoID to CargoType and amend related variables/comments 2025-01-26 18:07:10 +01:00
Peter Nelson
4397aa3909
Codechange: Make StationType an enum class. () 2025-01-19 20:53:08 +00:00
Peter Nelson
ea74ca0a76
Fix : Crash attempting to find catchment tiles of a station with no catchment area. () 2024-03-23 13:03:59 +01:00
Loïc Guilloux
b0f3417025
Add: [Script] ScriptTileList_StationCoverage () 2024-02-06 20:22:18 +01:00
Peter Nelson
ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. ()
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
2023-11-06 20:29:35 +00:00
Patric Stout
07730584d7
Codechange: make explicit when a TileIndex is cast to its basetype ()
This prevents people accidentially assigning a TileIndex to a Date
or any other type they shouldn't.
2023-08-15 18:12:05 +02:00
PeterN
584faaf064
Change: Reorganise industry accept/produce arrays. ()
Use a array of struct for each cargo instead of an array for each statistic.
This makes iterating for acceptance and production much simpler.
pct_transported is now calculated when needed.
2023-05-25 21:25:46 +01:00
Peter Nelson
09408e8e46 Codechange: Add IsCargoAccepted/Produced() helpers. 2023-05-24 17:34:11 +01:00
Peter Nelson
76516d7f70 Codechange: Use IsValidCargoID/IsValidCargoType.
IsValidCargoType() is used only for unmapped IDs.
2023-05-22 20:43:40 +01:00
glx22
18fe0a4046 Codechange: Use SQInteger for generic numbers in script_tilelist 2023-03-06 00:32:12 +01:00
Rubidium
fe2bcd2a58 Codechange: migrate size related functions to Map structure 2023-01-21 17:11:40 +01:00
Peter Nelson
f5f035a22b Codechange: Make use of Rect Width/Height helpers. 2022-11-12 18:28:39 +00:00
glx22
38c97e1492 Codechange: Replace TILE_AREA_LOOP with range-based for loops 2021-05-13 00:13:54 +02:00
SamuXarick
424770d662 Fix: [AI/GS] Consider neutral station setting when creating tile lists 2020-03-14 23:23:33 +01:00
S. D. Cloudt
13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
PeterN
3bbd7ea2c1
Fix: Industry coverage area is no longer rectangular. ()
AIs test station catchment in reverse to how players see station catchment.
This did not take account of non-rectangular station catchment areas, so AIs
could end up placing stations in locations that did not accept/deliver cargo.
2019-04-13 14:27:57 +01:00
PeterN
abe8cf4985
Codechange: Replace duplicated code with TileArea::Expand() () 2019-04-13 14:12:34 +01:00
rubidium
0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
truebrain
98103121d4 (svn r23355) -Codechange: rename all AI* to Script* (Rubidium) 2011-11-29 23:15:35 +00:00
truebrain
afdb67a353 (svn r23354) -Codechange: move all src/ai/api/ai_*.[hc]pp files to src/script/api/script_* (Rubidium) 2011-11-29 23:07:38 +00:00