Tyler Trahan
98d809c33b
Codechange: Don't use macros for DAYS_TILL and friends ( #10746 )
1 year ago
Rubidium
19ec4e8beb
Codechange: replace ClampToI32/U16 with ClampTo<int32_t/uint16_t>
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
PeterN
ff55bfb787
Fix #10343 : Don't extend town-disallowed roadtypes. ( #10347 )
...
Towns currently don't build disallowed roadtypes, however they should
also not extend disallowed roadtypes as well.
If the roadtype that cannot be extended happens to be the roadtype that
the town was going to build then this restriction is ignored.
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
rubidium42
6ba55e663e
Codechange: do not hide variables with other variables
2 years ago
Rubidium
fe2bcd2a58
Codechange: migrate size related functions to Map structure
2 years ago
Rubidium
3373128233
Codechange: pass the randomizer directly to the town name generation
2 years ago
PeterN
c8cc61d889
Fix #10150 : Force FS_SMALL for small viewport signs. ( #10283 )
...
* Fix #10150 : Force FS_SMALL for small viewport signs.
This is a workaround for string widths being different with mixed
font-sizes.
* Fix: Flag small sign shadow as small text.
(This method of drawing shadows is hilarious and needs replacing, but
this is a quick fix.)
2 years ago
Joel-Milligan
59645c6733
Change: Remove scrollbar from town authority actions panel ( #9928 )
2 years ago
Tyler Trahan
47a998fb0c
Feature: Towns don't build parallel, redundant bridges
2 years ago
Tyler Trahan
fa562ba041
Fix #9712 : Cap town bridge length at original 11-tile limit ( #9890 )
2 years ago
Tyler Trahan
f92cf38ab5
Feature: Allow disabling local authority control of company actions
3 years ago
J0anJosep
d9a37c915f
Cleanup #9725 : Replace cmd_helper related functions and remove cmd_helper.h.
3 years ago
Joan Josep
e890e7db76
Cleanup #9725 : Clean up Doxygen docs and fix typo. ( #9753 )
3 years ago
Michael Lutz
c521b965bd
Codechange: Don't use a global for the terrforming error tile.
3 years ago
Michael Lutz
2e39637db2
Codechange: Don't use a global for the 'not enough cash' message.
3 years ago
Michael Lutz
57b82e2e99
Codechange: Don't use globals for story/goal/sign/group command proc return values.
3 years ago
Michael Lutz
c6d7b98808
Codechange: Un-bitstuff landscape commands.
3 years ago
Michael Lutz
1a42a8a5d5
Codechange: Un-bitstuff town-related commands.
3 years ago
Michael Lutz
46bd2f1ced
Codechange: Un-bitstuff remaining transport infrastructure 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
Patric Stout
2c05412d72
Fix #9407 : desync when founding a town nearby a station ( #9526 )
...
"stations_near" wasn't updated when founding a town near
a station. As this variable is not saved, any client joining
after the town is founded has a different value for
"stations_near", potentially causing desyncs.
As the intention of this if() statement was to skip an expensive
calculation when there are clearly no stations, better to move
that check inside the function, so other places also enjoy
the speedup.
3 years ago
rubidium42
9a7750f14e
Codechange: use the constructor for CompanyNewsItem to fill the data instead of a separate function
3 years ago
rubidium42
aa9818db90
Codechange: create a type for the "free_data" of NewsItems and (de)allocate it with new and delete
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
rubidium42
4613ababd3
Fix #9316 , 64eddaeb: at about 250.000 inhabitants the bridge length limit check overflows
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
rubidium42
661728558e
Codechange: let IsUnique.* functions accept std::string
3 years ago
rubidium42
b791ffc6de
Fix: do not hide parameter by local variable with the same name
3 years ago
Rubidium
296194ad36
Fix: memory leak due to assigning result of strdup to a std::string
3 years ago
William Davis
881e1da51d
Change: Use gender-neutral pronouns in console command messages (and comments) ( #9203 )
3 years ago
glx22
9a8756d7ed
Codechange: Replace FOR_ALL_CARGOSPECS with range-based for loops
3 years ago
Charles Pigott
dd798d688b
Fix #8919 : Release builds with asserts enabled ( #8925 )
4 years ago
Patric Stout
fece1c57ca
Codechange: Suppress warnings when asserts are disabled ( #8917 )
4 years ago
frosch
4ce941bbc2
Codechange: turn a constant variable into a real constant.
4 years ago
SamuXarick
a4035af337
Codechange: Apply coding style ( #8640 )
...
* Fix: Missing or needed spaces
* Codechange: Remove space
* Codechange: Remove space
* Codechange: More missing spaces
* Codechange: Missing spaces
* Codechange: Remove space
* Codechange: Remove space
4 years ago
Tyler Trahan
1dda7d6486
Fix: don't walk out of the map when trying to build tunnels ( #8600 )
4 years ago
SamuXarick
8da5cff210
Fix #8462 : Don't check whether to grow a town road on water ( #8471 )
4 years ago
Patric Stout
8e6574dcdb
Revert 78f92130: "Fix #8506 : Towns shouldn't add junctions to NewGRF roads they cannot build ( #8535 )" ( #8541 )
...
As per https://github.com/OpenTTD/OpenTTD/pull/8535#issuecomment-757122918 ,
jumped the gun here.
4 years ago
Tyler Trahan
b0456669c9
Fix #8506 : Towns shouldn't add junctions to NewGRF roads they cannot build ( #8535 )
4 years ago
Tyler Trahan
b08c66a796
Fix 7bdfb38: Drive-thru road stations can be connected at either end ( #8528 )
4 years ago