Patric Stout
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
Rubidium
27eadc13ec
Codechange: rename TILE_ADD(XY) to TileAdd(XY)
2024-03-10 15:50:24 +01:00
Peter Nelson
2d48829999
Codechange: Scan station catchment tiles when removing station from nearby towns/industries. ( #12129 )
...
Avoid iterating all towns and industries when updating station catchment, and scan a limited portion of the map instead.
This provides a modest performance benefit when many towns/industries exist.
2024-03-05 18:33:58 +00:00
Joan Josep
1b33b4058e
Fix: Redraw orders when a station feature is added/removed. ( #12061 )
2024-02-11 12:47:49 -05:00
Tyler Trahan
735abfe111
Codechange: Split dates and timers into Economy and Calendar time ( #10700 )
2024-01-22 09:04:34 -05:00
Tyler Trahan
1f41e773d6
Codechange: Use consistent name for bay road stops
...
As of #10494 , this is how we describe original dead-end road stops.
2023-11-28 14:24:33 -05:00
Peter Nelson
d4008850e3
Codechange: Ensure function opening `{` is on new line.
2023-11-09 20:15:38 +00:00
Rubidium
c9276c2959
Codechange: replace x.size() == 0 with x.empty()
2023-10-20 23:05:43 +02:00
Peter Nelson
9602de474d
Codechange: Use iterators and/or range-for on cargo related loops.
2023-10-19 17:03:25 +01:00
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
Tyler Trahan
77173a6a10
Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes
2023-09-10 08:40:25 -04: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
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
2023-04-24 15:56:01 +00:00
Jonathan G Rennison
0e4b716815
Fix: O(N^2) cost of Station::RecomputeCatchmentForAll
...
Station::RemoveFromAllNearbyLists does not need to be called when
all station nearby lists have been cleared and are being regenerated.
2023-03-01 16:54:57 +01:00
Michael Lutz
aab580e0ac
Codechange: [Linkgraph] Drop node/edge wrappers from LinkGraph.
2023-02-26 21:41:24 +01:00
Michael Lutz
7352f812e6
Codechange: [Linkgraph] Only store present link graph edges and not all possible edges.
2023-02-26 21:41:24 +01:00
Jonathan G Rennison
4c1406a4b5
Add: NewGRF road stops
2023-02-26 21:28:30 +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
Peter Nelson
22803f997b
Codechange: Use std::vector for station speclist
...
This removes manual memory allocation, although we still manage the list
size in roughly the same way.
2022-11-06 16:50:42 +01:00
dP
36bee83864
Change: Deliver cargo to the closest industry first ( #9536 )
2022-02-19 19:08:23 +01:00
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
2021-05-29 21:08:25 +02:00
glx22
38c97e1492
Codechange: Replace TILE_AREA_LOOP with range-based for loops
2021-05-13 00:13:54 +02:00
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
2021-01-08 11:16:18 +01:00
Michael Lutz
63ccb36ef3
Codechange: Use std::string for most of the user-settable custom names.
2020-05-21 20:02:34 +02:00
dP
7bd52970a1
Codechange: Refactor FindStationsAroundTiles to avoid code duplication
2020-05-13 08:43:01 +01:00
glx
ee7a8eebca
Codechange: Replace FOR_ALL_TOWNS with range-based for loops
2019-12-21 20:13:03 +01:00
glx
d8a1be48cd
Codechange: Replace vehicle related FOR_ALL with range-based for loops
2019-12-21 20:13:03 +01:00
glx
00c2a98cf3
Codechange: Replace FOR_ALL_INDUSTRIES with range-based for loops
2019-12-21 20:13:03 +01:00
glx
ddabfed1cd
Codechange: Replace station related FOR_ALL with range-based for loops
2019-12-21 20:13:03 +01:00
Niels Martin Hansen
9900af38f5
Fix #7847 : Use ViewportSign coordinates for sign Kdtree coordinates ( #7849 )
...
Ensure the same coordinates are used for station/town/player signs regardless of how the landscape changes below it after the coordinates were first determined.
By keeping track of whether each ViewportSign is valid for Kdtree use (and only ever registering the viewport sign when the object is valid) a lot of code can be simplified and become more robust at the same time.
2019-12-01 23:17:33 +01:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
peter1138
f538179878
Feature: Multi-tile docks and docking points.
2019-06-30 16:46:32 +02:00
peter1138
c02ef3e456
Feature: Add NotRoadTypes (NRT)
2019-05-01 21:36:27 +02:00
PeterN
671a310d21
Fix #7235 : Ensure catchment area of neutral station covers entire industry. ( #7518 )
2019-04-16 20:30:07 +01:00
PeterN
abe8cf4985
Codechange: Replace duplicated code with TileArea::Expand() ( #7467 )
2019-04-13 14:12:34 +01:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00
Niels Martin Hansen
ce10d9be3f
Fix #7374 : Ensure k-d trees are always updated when station sign moves
2019-03-24 19:26:13 +01:00
Niels Martin Hansen
e8d397e4ee
Codechange: Make a merged k-d tree index of all viewport signs
2019-03-09 20:27:11 +01:00
Niels Martin Hansen
d84b67e54d
Codechange: Make a k-d tree index of stations
2019-03-09 20:27:11 +01:00
Peter Nelson
8b1b3fd0f9
Feature: Non-rectangular sparse station catchment area.
2019-03-09 16:33:47 +00:00
peter1138
94b40fd530
Codechange: Convert IndustryVector to a std::set.
2019-03-09 16:33:47 +00:00
peter1138
ed6084523d
Codechange: Convert StationList from SmallVector to std::set.
2019-03-09 16:33:47 +00:00
PeterN
dd20ccee88
Feature: Industries with neutral stations (e.g. Oil Rig) only supply/accept cargo to/from their neutral station. ( #7234 )
...
This change is a controlled by a game setting, located under Environment ->
Industries which allows toggling the behaviour. It defaults to enabled.
"Company stations can serve industries with attached neutral stations"
When enabled, industries with attached neutral station (such as Oil Rigs) may
also be served by company-owned stations built nearby. This is the traditional
behaviour.
When disabled, these industries may only be served by their neutral station.
Any nearby company-owned stations won't be able to serve them, nor will the
neutral station serve anything else other than the industry.
2019-03-08 18:30:44 +00:00
Charles Pigott
86012e10ea
Fix: Remove need to instantiate SmallStack's pool object by making it a singleton method
2018-04-21 16:28:50 +02:00
frosch
780e595933
(svn r27178) -Fix [FS#5969]: Data race due to lazy initialisation of objects.
2015-03-07 18:27:01 +00:00
rubidium
e811fa1718
(svn r27030) -Fix: crash when having the vehicle list opened from a buoy or oil rig while the buoy/oil rig gets its final removal (i.e. the sign gets removed)
2014-10-21 19:16:47 +00: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
fonsinchen
46590e112e
(svn r26343) -Fix: Rewrite SmallStack so that it doesn't use a pool and is reentrant.
2014-02-16 16:25:18 +00:00