Peter Nelson
cc488ec6c9
Fix ddd609c: Reverse build probability callback was not called for articulated parts. ( #11526 )
10 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.
11 months ago
Peter Nelson
7d4a91ef9e
Cleanup: Remove some unused functions. ( #11429 )
...
These were picked up with cppcheck.
11 months ago
Peter Nelson
2a88e0fab3
Codechange: Use bitmask instead of array for cargo consistency check.
...
We only need to know if a cargo type is accepted, not how much.
12 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>
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
Peter Nelson
f177ce7c9a
Codechange: Base CargoArray off std::array.
...
This avoids needing to define array accessors and allows use of
default value initialization.
1 year ago
Peter Nelson
76516d7f70
Codechange: Use IsValidCargoID/IsValidCargoType.
...
IsValidCargoType() is used only for unmapped IDs.
1 year ago
Peter Nelson
4a5e413a6c
Cleanup: Remove unnecessary VehicleRandomBits()
...
Simple Random() assignment to byte does the same.
1 year ago
Jonathan G Rennison
10e76b2788
Fix #10032 : Capacities of articulated vehicles in build window
...
See also: #9954
2 years ago
Matt Kimber
9b28b15e67
Codechange: create MutableSpriteCache to remove the need to cast Vehicle to a mutable type in render methods
4 years ago
glx
b50d77b831
Fix #8064 : Incorrect display of refit capacity
5 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
peter1138
e6bb90543e
Change: Show additional cost and refitted capacity in build vehicle window.
6 years ago
PeterN
4cebebcf68
Change: Add CargoTypes type for cargo masks. ( #6790 )
6 years ago
frosch
d2393b4f6c
(svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq.
8 years ago
frosch
d188d02384
(svn r27580) -Fix [FS#6395]: Set date of last service on construction also for wagons and articulated parts.
8 years ago
rubidium
6c2abf0930
(svn r26863) -Codechange: move a number of Vehicle* functions into the Vehicle class
10 years ago
alberth
bc84c52b30
(svn r26849) -Fix[FS#6113]: Better display of refit information in articulated vehicles.
10 years ago
rubidium
0463dbdc9e
(svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
11 years ago
rubidium
3947453277
(svn r25259) -Codechange: track capacities and usage of links
12 years ago
planetmaker
c24374f99c
(svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow)
12 years ago
yexo
1f0593e7ca
(svn r24029) -Change: [NoAI] make AIEngine::IsArticulated return true if the articulated callback flag is set, don't try to run the callback.
13 years ago
frosch
5167f2be29
(svn r23965) -Fix [FS#5070]: Refittability should never depend on the current capacity of a vehicle.
13 years ago
rubidium
6d6be50ae0
(svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files
13 years ago
truebrain
0d929e877f
(svn r23713) -Codechange: split VehicleMove() into two functions, to minimalize the work done where possible
13 years ago
rubidium
3d88c74389
(svn r23526) -Codechange: unify cargos vs cargoes
13 years ago
frosch
f97fa89f1a
(svn r23137) -Change: [NewGRF v8] New result format for callback 16.
13 years ago
frosch
acc3c75951
(svn r23075) -Codechange: Add GetGRF() and GetGRFID() methods to Engine and Vehicle to simplify code.
13 years ago
frosch
72cd855978
(svn r23074) -Codechange: Add Vehicle::GetEngine() to simplify code.
13 years ago
rubidium
ff143c6708
(svn r22413) -Document: even more stuff
14 years ago
rubidium
e34c42de32
(svn r22205) -Codechange: replace magic number with constant
14 years ago
glx
16dd93d3fb
(svn r22048) -Fix (r4495): company 0 does not always exist, so put temporary vehicles in a valid company
14 years ago
terkhen
734994c9ba
(svn r21924) -Codechange: Unify some parts of the articulated vehicle code.
...
-Cleanup: Avoid conversions to Train and RoadVehicle that are no longer required.
14 years ago
terkhen
cfbbcf1597
(svn r21858) -Codechange: Give more similar names to ArticulatedPart functions.
14 years ago
terkhen
48b7916458
(svn r21521) -Codechange: Unify some cached values that were present in both road vehicles and trains.
14 years ago
terkhen
d6959dcc6b
(svn r21517) -Codechange: Add IsGroundVehicle function to the Engine class.
14 years ago
terkhen
6a38925ca3
(svn r21123) -Codechange: Remove max_speed from the Vehicle class.
14 years ago
rubidium
30f2afac9b
(svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers
14 years ago
rubidium
e356cb9405
(svn r20281) -Codechange: unify case scope closure + break coding style
14 years ago
alberth
33a96b5ef3
(svn r19132) -Codechange: No need to end a line with ;;.
15 years ago
rubidium
82fc28f77f
(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header
15 years ago
frosch
1e1fa9ff2e
(svn r18566) -Codechange: When both the union and intersection of refit masks of articulated vehicles are needed, they can be determined at once.
15 years ago
peter1138
bcb33b50ac
(svn r17911) -Codechange: bool * is a pointer, not a bool
15 years ago
frosch
abbaed60d3
(svn r17907) -Codechange: Deduplicate result interpretation of articulated vehicle callback.
15 years ago
frosch
9a9d0ee7c0
(svn r17728) -Cleanup: Remove some more unneeded/unused parameters.
15 years ago
frosch
7a8a97e68a
(svn r17726) -Cleanup: Remove some unneeded/unused parameters.
15 years ago
frosch
b243f6ca97
(svn r17700) -Codechange: Integrate ShipVehicleInfo::refittable into EngineInfo::refit_mask during initialisation.
15 years ago
frosch
12a814f487
(svn r17684) -Fix: tcache.first_engine and rcache.first_engine need to be set before first callback/sprite-resolving. For RV fronts it was missing at all, causing livery selection to fail.
15 years ago