Peter Nelson
76516d7f70
Codechange: Use IsValidCargoID/IsValidCargoType.
...
IsValidCargoType() is used only for unmapped IDs.
1 year ago
Henry Wilson
3a03a12a9c
Feature: Show the number of industries already built in the Fund New Industry window.
1 year ago
Rubidium
fb856e16c1
Codechange: replace some min/clamp constructs to ClampTo
1 year ago
Tyler Trahan
6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar ( #10753 )
1 year ago
Tyler Trahan
6830e5f5f7
Cleanup: Don't use a magic number when closing processing industries ( #10710 )
1 year ago
Patric Stout
31ad990831
Codechange: move tick-counter into TimerGameTick ( #10712 )
1 year ago
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
1 year ago
Peter Nelson
087654501b
Codechange: Initialise specs with std::fill/std::copy instead of memset/memcpy.
1 year ago
PeterN
e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. ( #10663 )
...
This avoids a (soft) namespace conflict between the four ST_* enums.
1 year ago
Patric Stout
3ebc7ad16e
Codechange: migrate all game-time-related timers to the new framework
1 year ago
Rubidium
e8af8daa68
Codechange: pass "ground vehicle" to GetTileSlopeZ since for tunnel/bridges there are two states
...
Previously it checked the position in non-driving direction to "guess" whether
a ground vehicle was using the function, so on tunnels/bridges it could either
return the Z of the (virtual) ground compared to the Z of the path the vehicle
would take.
1 year ago
Rubidium
580d0a6343
Codechange: make use of Tile in for all direct map accesses
2 years ago
Rubidium
8cbf1be9d6
Codechange: split large function into smaller functions with self-explanatory names
2 years ago
dP
fe2c8a1240
Codechange: Decouple INDUSTRY_CTRL into separate commands ( #10475 )
2 years ago
rubidium42
6ba55e663e
Codechange: do not hide variables with other variables
2 years ago
Rubidium
de6bc8e692
Codechange: move TILE_MASK to Map::WrapToMap
2 years ago
Rubidium
fe2bcd2a58
Codechange: migrate size related functions to Map structure
2 years ago
PeterN
5801442780
Fix: Switch to OWNER_TOWN prevented OWNER_DEITY test during industry prospecting. ( #10360 )
2 years ago
Tyler Trahan
2206c73156
Feature: Set a custom number of industries in map generation window ( #10340 )
2 years ago
Tyler Trahan
dced2d8c30
Fix #10333 , c53f29d: Only show industry prospecting errors to local company ( #10338 )
2 years ago
Daniel Robinson
c53f29df53
Fix #10181 : Show error message on failed industry prospecting ( #10202 )
2 years ago
frosch
9529703cab
Codechange: When checking industry placement conditions, perform cheap checks first. ( #9987 )
...
1. Built-in checks on industry level.
2. Built-in checks on industry tiles.
3. NewGRF-defined checks on industry level.
4. NewGRF-defined checks on industry tiles.
2 years ago
Jonathan G Rennison
b3893878bb
Fix #9867 : Industry::stations_near not filled at industry creation
2 years ago
dP
36bee83864
Change: Deliver cargo to the closest industry first ( #9536 )
3 years ago
J0anJosep
d9a37c915f
Cleanup #9725 : Replace cmd_helper related functions and remove cmd_helper.h.
3 years ago
Michael Lutz
c521b965bd
Codechange: Don't use a global for the terrforming error tile.
3 years ago
Michael Lutz
58cff7b081
Codechange: Un-bitstuff the remaining on-map commands.
3 years ago
Michael Lutz
c6d7b98808
Codechange: Un-bitstuff landscape commands.
3 years ago
Michael Lutz
e740c24eb7
Codechange: Template DoCommand to automagically reflect the parameters of the command proc.
...
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 years ago
Michael Lutz
7048e1522f
Codechange: Move flags in CommandProc in front of the command arguments.
3 years ago
Michael Lutz
33ca4f2b99
Codechange: Let the compile generate the master command table out of templated command traits.
...
This is using a non-intrusive type-traits like templated system, which
allows compile-time validation that the command table and the command
enum match up.
3 years ago
Michael Lutz
b6933a2ebd
Codechange: Move command arguments to the back of the DoCommand function call.
3 years ago
Michael Lutz
20a30825a0
Fix: Insufficient input validation for CmdIndustryCtrl. ( #9711 )
3 years ago
Patric Stout
28e90769f7
Codechange: use "[[maybe_unused]]" instead of a wide variety of other ways we had
...
While at it, replace OTTD_ASSERT with WITH_ASSERT, as this
is always set if assert() is valid. No matter if NDEBUG is set
or not.
3 years ago
glx22
5799402f7a
Codechange: Rename window related DeleteXXX to match new behaviour
3 years ago
rubidium42
2e136285e1
Codechange: move from C-string to std::string for DoCommand
3 years ago
glx22
38c97e1492
Codechange: Replace TILE_AREA_LOOP with range-based for loops
3 years ago
William Davis
881e1da51d
Change: Use gender-neutral pronouns in console command messages (and comments) ( #9203 )
3 years ago
Patric Stout
fece1c57ca
Codechange: Suppress warnings when asserts are disabled ( #8917 )
4 years ago
frosch
d9b4413bc9
Codechange: rename sound ids to make more sense. ( #8701 )
4 years ago
dP
bab7de6cf2
Feature: Allow GameScripts to add additional text to Industry view window
4 years ago
frosch
b3d048dfcf
Change: [NewGRF] industry special flag 19 now specifically targets only passenger production, instead of the second cargo of any water-based industry. ( #8590 )
...
This behavior is less surprising to NewGRF authors, and may even be intentional behavior for some industries.
4 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 years ago
glx22
d8605ad18d
Codechange: Replace FOR_VEHICLE_ORDERS with range-based for loops
4 years ago
Pavel Stupnikov
9a45a0f535
Feature: Set exclusive access to industry from GS ( #8115 )
4 years ago
Niels Martin Hansen
b7751c483e
Feature: Influence industry production changes from GS ( #7912 )
4 years ago
Pavel Stupnikov
c9fd85528a
Add: new economy "frozen" that stops production changes and industry closures ( #8282 )
4 years ago
frosch
df5362a008
Fix #8311 , b98c7763de4: Industry probability at map generation was scaled differently when set via property or callback.
4 years ago
Michael Lutz
6d3c2edc59
Add: [NewGRF] Industry behaviour flag to override second cargo production clamping for water industries when using smooth economy.
...
Smooth economy is only used when the corresponding setting is enabled and the industries does not use the production callback.
4 years ago
dP
f2a9a1e2a5
Fix #8137 : New clients can't join (desync) after funding an industry
4 years ago