Peter Nelson
2fd9096070
Change: Decouple and remove landscape-dependent cargo types. ( #11719 )
...
Cargo types of default engines, industries and houses are now specified in terms of label.
8 months ago
Tyler Trahan
41f2eed425
Feature: Settings to scale cargo production of towns and industries ( #10606 )
8 months ago
Tyler Trahan
735abfe111
Codechange: Split dates and timers into Economy and Calendar time ( #10700 )
8 months ago
Peter Nelson
c0ab436077
Codechange: Store Colours in Colours type. ( #11625 )
...
This reduces casts, some magic numbers, and introduces a bit of type-safety.
8 months ago
Peter Nelson
952d111b94
Codechange: Split CT_INVALID into CT_INVALID and INVALID_CARGO.
...
INVALID_CARGO is a CargoID and should be used for most purposes in game.
CT_INVALID is a CargoType used for defining default properties.
9 months ago
Rubidium
e3f49ee7a0
Codechange: coding style fixes
9 months ago
Peter Nelson
e5aed24395
Codechange: Use std::array for industry tile cargo acceptance. ( #11498 )
...
This avoids use of memcpy/memset to copy or fill.
10 months ago
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.
11 months ago
Rubidium
c9276c2959
Codechange: replace x.size() == 0 with x.empty()
12 months ago
frosch
5733145c59
Cleanup: Remove unneeded parameters.
1 year ago
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
1 year ago
PeterN
18e75dbc88
Fix: Don't produce invalid cargo. ( #11314 )
...
Production for secondary industries did not always check that the produced cargo type isn't valid.
1 year ago
Tyler Trahan
fca2b37726
Codechange: Move Ticks into their own class
1 year ago
Michael Lutz
0089323542
Add: [Script] Custom news message text for industry SetProductionLevel.
1 year ago
Michael Lutz
1c56991213
Add: [Script] Game script control of industry production level.
1 year 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.
1 year ago
Rubidium
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
1 year ago
Rubidium
3e8f8c55c2
Codechange: make creating temporary StringParameters easier
1 year ago
Rubidium
1d902a97ce
Codechange: move StringParameters to strings_internal.h
1 year ago
Rubidium
0a5e58451b
Codechange: pass string parameters by reference
1 year ago
Rubidium
f86500df92
Codechange: remove need for SetDParamX
1 year ago
Rubidium
36aaa9d683
Codechange: let GetStringWithArgs use StringBuilder
1 year 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
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