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.
2 years 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