Commit Graph

16 Commits (ab535c0a8665e6380c5037d7b6f0a507fc91d36a)

Author SHA1 Message Date
Peter Nelson ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. (#11445)
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
7 months ago
Patric Stout 07730584d7
Codechange: make explicit when a TileIndex is cast to its basetype (#11190)
This prevents people accidentially assigning a TileIndex to a Date
or any other type they shouldn't.
10 months ago
PeterN 584faaf064
Change: Reorganise industry accept/produce arrays. (#10853)
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.
1 year ago
Peter Nelson 09408e8e46 Codechange: Add IsCargoAccepted/Produced() helpers. 1 year ago
Peter Nelson 76516d7f70 Codechange: Use IsValidCargoID/IsValidCargoType.
IsValidCargoType() is used only for unmapped IDs.
1 year ago
glx22 18fe0a4046 Codechange: Use SQInteger for generic numbers in script_tilelist 1 year ago
Rubidium fe2bcd2a58 Codechange: migrate size related functions to Map structure 1 year ago
Peter Nelson f5f035a22b Codechange: Make use of Rect Width/Height helpers. 2 years ago
glx22 38c97e1492 Codechange: Replace TILE_AREA_LOOP with range-based for loops 3 years ago
SamuXarick 424770d662 Fix: [AI/GS] Consider neutral station setting when creating tile lists 4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
PeterN 3bbd7ea2c1
Fix: Industry coverage area is no longer rectangular. (#7464)
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.
5 years ago
PeterN abe8cf4985
Codechange: Replace duplicated code with TileArea::Expand() (#7467) 5 years ago
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 10 years ago
truebrain 98103121d4 (svn r23355) -Codechange: rename all AI* to Script* (Rubidium) 13 years ago
truebrain afdb67a353 (svn r23354) -Codechange: move all src/ai/api/ai_*.[hc]pp files to src/script/api/script_* (Rubidium) 13 years ago