Patric Stout
9a3dbf3122
Fix 02e770ff: allow estimating CloneVehicle if short on money ( #8748 )
...
CheckCompanyHasMoney() was also executed when not using DC_EXEC,
resulting in an error about shortage of money instead of the
estimation.
This mostly is a problem for AI players, as they will have no
way to know how much it would have cost.
4 years ago
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
4 years ago
Patric Stout
725d793be1
Fix: don't allow cloning vehicles if cloning orders is failing ( #8515 )
...
Before this fix, any failing clone order was silently ignored
and you as user would never know till you checked the order list.
Evil.
4 years ago
Michael Lutz
63ccb36ef3
Codechange: Use std::string for most of the user-settable custom names.
4 years ago
frosch
9f2e23d8ba
Fix #8093 : Build+Refit changed game-state in command test run, and thus caused desyncs.
...
Use DC_AUTOREPLACE for actions that shall be reversibe, in this case:
- Do not rearrange free wagons in test-run.
- Do not discard OrderBackups.
The latter was not triggered by actual auto-replace, since it does not set a 'user'.
4 years ago
frosch
0f9dc88834
Fix: When build+refit an engine, do not refit any free wagons that may get attached.
4 years ago
frosch
68244393f1
Codechange: Unify the tests whether build+refit is in simulation-test or real-run.
4 years ago
glx
d8a1be48cd
Codechange: Replace vehicle related FOR_ALL with range-based for loops
5 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
Charles Pigott
73a2cee779
Fix: Quiet a bogus -Wmaybe-unitialized warning from GCC9
5 years ago
stormcone
2e686ad5d5
Fix #7667 : Buying an engine after buying wagons doesn't give a complete train.
5 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
peter1138
8114bad033
Fix #7469 : Desync when using build and refit feature.
6 years ago
Charles Pigott
e453572b6a
Codechange: Initialise a few variables that -flto seems to think could possibly be uninitialised
6 years ago
Henry Wilson
c01a2e2a81
Codechange: Removed SmallVector completely
6 years ago
Henry Wilson
ab711e6942
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
6 years ago
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
6 years ago
Henry Wilson
5795f66d2e
Codechange: Replaced SmallVector::Contains() with std::find() pattern
6 years ago
Henry Wilson
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
6 years ago
Henry Wilson
bfd79e59dc
Codechange: Replace SmallVector::Clear() with std::vector::clear()
6 years ago
peter1138
e6bb90543e
Change: Show additional cost and refitted capacity in build vehicle window.
6 years ago
peter1138
d54b6ac09b
Feature: When filtering purchase list by cargo type, make buy button perform a refit if required.
6 years ago
PeterN
d242875d27
Fix #7197 : Invalidate depot buttons when necessary. ( #7212 )
6 years ago
Peter Nelson
48fb575502
Fix 11ab3c4ea2f: Vehicles could not be refitted to cargo IDs higher than 32.
6 years ago
Niels Martin Hansen
c84b9913bd
Fix #6676 : Prevent helicopters from stopping in midair during some kinds of landing
...
This adds a new flag that gets stored in the savegame, but it should still be compatible both ways, hence no save version bump.
6 years ago
Charles Pigott
f5b1115039
Doc: Lots and lots of doxymentation fixes
6 years ago
Joan Josep
944f785be8
Fix: Spelling errors ( #6769 )
7 years ago
frosch
476b2b0e8c
(svn r27677) -Codechange: Remove implicit VehicleListIdentifier from uint32 constructor, to make conversions more explicit.
8 years ago
frosch
0974f5489b
(svn r27428) -Fix: When selecting a refit cargo for orders, do not check whether the vehicle is in a depot or station, and do not ask whether the vehicle currently allows station-refitting. Also hide the refit cost for orders, it is not predictable.
9 years ago
rubidium
9ed12b0f07
(svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL)
11 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
frosch
41b7a04a68
(svn r26317) -Fix [FS#5897]: Check whether NewGRF change vehicle capacity when they are not supposed to, and truncate cargo appropiately if they are allowed to.
11 years ago
zuu
cef1c47f18
(svn r25865) -Codechange: Refactor detecting of depot vehicle type of a tile to a new function, GetDepotVehicleType (cirdan, LordAro)
11 years ago
frosch
fbe6b92b1d
(svn r25698) -Fix [FS#5700]: Autoreplace/renew also refits free wagons.
11 years ago
frosch
5bda07c10c
(svn r25648) -Change [FS#5669]: [NewGRF] Invalidate vehicle recolour palette during (un)loading.
11 years ago
rubidium
3947453277
(svn r25259) -Codechange: track capacities and usage of links
12 years ago
frosch
205543f727
(svn r25040) -Add: a mode to CmdRefitVehicle to preserve the current subtype, also when refitting multiple vehicles.
12 years ago
rubidium
2795ed5b09
(svn r25008) -Codechange: Make CargoList::Truncate behave similarly to CargoList::MoveTo, i.e. pass the amount to truncate (fonsinchen)
12 years ago
rubidium
ced17303c2
(svn r24998) -Fix [FS#5137]: Set vehicle's service interval is percent flag appropriately on creation (peter1138)
12 years ago
rubidium
369a6f9d1b
(svn r24995) -Codechange: Add flags to vehicle service interval for custom & ispercent (peter1138)
12 years ago
rubidium
c77cd1f409
(svn r24994) -Codechange: Replace access to service_interval with accessors (peter1138)
12 years ago
frosch
6018a0190e
(svn r24567) -Fix [FS#5261]: Non-train vehicle lists were not resorted when vehicles were renamed. (Juanjo)
12 years ago
frosch
08a8c3a773
(svn r24384) -Fix [FS#5188-ish]: Make IsInDepot() functions behave consistent across vehicle types and add IsChainInDepot instead, if that is what shall be checked.
12 years ago
frosch
22632d5e9a
(svn r24382) -Fix: Call Vehicle::IsStoppedInDepot only for the first vehicle in a chain (i.e. primary vehicle or free wagon).
12 years ago
frosch
6dc33ed4b5
(svn r23848) -Fix: Even if A == B, A can make more sense than B.
13 years ago
rubidium
1a0fe0e8c6
(svn r23783) -Cleanup: remove ancient but not needed command flag
13 years ago
frosch
00ec5da361
(svn r23745) -Fix (r23087): If autorefit fails, count the vehicle capacity nevertheless, if it is already carrying the right thing.
13 years ago
frosch
f5ebbc96e9
(svn r23743) -Fix [FS#4906]: Call CB 15E for all vehicles before actually executing any refit.
13 years ago
rubidium
6d6be50ae0
(svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files
13 years ago
frosch
fba9c756c7
(svn r23581) -Fix (r23518) [FS#4890]: Cloning of vehicles crashed.
13 years ago