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.
4 months ago
Tyler Trahan
f6dd5053a3
Feature: Order flag to unbunch vehicles at depot ( #11945 )
4 months ago
frosch
b1718478c8
Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
4 months ago
merni-ns
5a88027a19
Feature: Infinite money mode ( #11902 )
4 months ago
frosch
68c64d2511
Codechange: Remove TKM string codes by duplicating strings.
4 months ago
Tyler Trahan
fd9e72a7e7
Feature: Use real-time "wallclock" timekeeping units ( #11341 )
4 months ago
Tyler Trahan
735abfe111
Codechange: Split dates and timers into Economy and Calendar time ( #10700 )
4 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.
5 months ago
Rubidium
e3f49ee7a0
Codechange: coding style fixes
5 months ago
Peter Nelson
3864902683
Codechange: Use vehicle viewport hash to find clicked vehicle. ( #11675 )
...
This avoids having to iterate all vehicles, which can be an performance improvement when there are many vehicles.
5 months ago
Tyler Trahan
2a62caa30b
Codechange: Use Ticks for BaseConsist timetable fields
6 months ago
Tyler Trahan
1f41e773d6
Codechange: Use consistent name for bay road stops
...
As of #10494 , this is how we describe original dead-end road stops.
6 months ago
Jonathan G Rennison
9822fa6584
Fix: Trivial autoreplace of mixed cargo articulated engines ( #11253 )
...
Do not fail autoreplace/autorenew of mixed cargo articulated engines
due to an inability to refit to mixed cargoes, when no refit is
required because the target engine already has a suitable set of cargoes.
Notably, this allows autorenew (autoreplace to same engine type)
to succeed.
6 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.
7 months ago
Peter Nelson
7d4a91ef9e
Cleanup: Remove some unused functions. ( #11429 )
...
These were picked up with cppcheck.
7 months ago
Rubidium
c6411168d8
Cleanup: missing spaces before continuation * in some comments
7 months ago
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
9 months ago
Patric Stout
df400ef84a
Fix: only count distance traveled in vehicles for cargo payment ( #11283 )
...
No longer you can utilize the free (and instant) labour of station
workers, transporting your cargo from one part of the station to
the other. No more!
Based on patch by dP.
9 months ago
PeterN
acd7d3c913
Codechange: Rename *Railtype* to *RailType* for consistency. ( #11287 )
9 months ago
Tyler Trahan
77173a6a10
Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes
9 months ago
Tyler Trahan
fca2b37726
Codechange: Move Ticks into their own class
9 months ago
Patric Stout
b0e73277d6
Codechange: remove loaded_at_xy from CargoPacket as it was unused ( #11276 )
9 months ago
Patric Stout
299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed ( #10761 )
10 months ago
Patric Stout
a9ed590ca7
Codechange: use TimerGameCalendar::Date for variables in linkgraph that are dates ( #11187 )
10 months ago
Patric Stout
b7acf9e50e
Codechange: use TimerGameCalendar::Year and friends when working with years ( #11188 )
10 months ago
Tyler Trahan
c7b51a8c3a
Codechange: Use proper date types in various places ( #11177 )
10 months ago
Tyler Trahan
e4fd99a33a
Codechange: Use DateAtStartOfYear() instead of multiplying by DAYS_IN_LEAP_YEAR ( #11174 )
10 months ago
Tyler Trahan
9a602ff304
Fix #10334 : Store separate newgrf-safe version of date_of_last_service. ( #11124 )
...
This value is not changed when the date cheat is used, which caused issues with changing properties based on service date.
Co-authored-by: Peter Nelson <peter1138@openttd.org>
10 months 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
11 months ago
Peter Nelson
76516d7f70
Codechange: Use IsValidCargoID/IsValidCargoType.
...
IsValidCargoType() is used only for unmapped IDs.
1 year ago
Rubidium
1a179cb297
Codechange: use GetString + StrMakeValid to pass string without colours/font sizes to Debug
1 year ago
Rubidium
3323402aaa
Codechange: rename smallvec_type to container_func and use only when needed
1 year ago
Peter Nelson
c38df2d589
Codechange: Use std::map instead of custom SmallMap.
1 year ago
Tyler Trahan
98d809c33b
Codechange: Don't use macros for DAYS_TILL and friends ( #10746 )
1 year ago
Rubidium
fb856e16c1
Codechange: replace some min/clamp constructs to ClampTo
1 year ago
Peter Nelson
4a5e413a6c
Cleanup: Remove unnecessary VehicleRandomBits()
...
Simple Random() assignment to byte does the same.
1 year ago
Tyler Trahan
6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar ( #10753 )
1 year ago
Peter Nelson
00bf42353a
Codechange: Place gamelog into its own class, along with internal data.
...
Data is now stored in vectors to avoid manual memory management and
passing lengths around.
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
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
Tyler Trahan
97cfd40649
Fix #10630 : Don't allow shifting service date earlier than 0 ( #10643 )
1 year ago
Tyler Trahan
3719f60de0
Add: Use specific error message when vehicle cannot go to station/waypoint
1 year ago
Jonathan G Rennison
4c1406a4b5
Add: NewGRF road stops
1 year ago
Rubidium
4e65ec1dc4
Codechange: do not declare functions in blocks
1 year ago
SamuXarick
b2a5ebcfc4
Fix 3c047b1: AIGroup.GetProfitLastYear could get values different than those displayed in GUI ( #10227 )
...
* Change: Store "all time" and "since minimum age" last year profits on groups
* Fix: Update last year profit for groups when copying vehicle statistics on autoreplace
* Codechange: Refactor profit last year
* Change: Rename some group related items for clarity
* Change: Reorder the fields in GroupStatistics
That way less memory gets wasted.
1 year ago
Rubidium
375a5b8e3f
Codechange: refactor FindClosestDepot to not use pointers, but return a struct
1 year ago
Bernard Teo
8a78fa7121
Feature: Contextual actions for vehicles grouped by shared orders ( #8425 )
2 years ago
Henry Wilson
59dbcdb5ba
Feature: Display power-to-weight ratio in ground vehicle details GUI
2 years ago