Commit Graph

108 Commits (32b0fb9f6ebe5f607550d4d35ce112b2e1c7442e)

Author SHA1 Message Date
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.
5 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.
6 months ago
Peter Nelson cc488ec6c9
Fix ddd609c: Reverse build probability callback was not called for articulated parts. (#11526) 7 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.
7 months ago
Peter Nelson 7d4a91ef9e
Cleanup: Remove some unused functions. (#11429)
These were picked up with cppcheck.
8 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.
8 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>
11 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
12 months 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
1 year 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 4 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 5 years ago
peter1138 e6bb90543e Change: Show additional cost and refitted capacity in build vehicle window. 5 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 10 years ago
rubidium 3947453277 (svn r25259) -Codechange: track capacities and usage of links 11 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. 12 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 13 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