summaryrefslogtreecommitdiff
path: root/src/vehicle_cmd.cpp
AgeCommit message (Collapse)Author
2021-08-11Fix #9392: Return a valid value with GetBuildWithRefitCapacity when AIs are ↵SamuXarick
maxed out in vehicles (#9393)
2021-06-15Cleanup: remove some unneeded c_str() callsRubidium
2021-05-29Codechange: move from C-string to std::string for DoCommandrubidium42
2021-05-29Codechange: let IsUnique.* functions accept std::stringrubidium42
2021-02-26Fix 02e770ff: allow estimating CloneVehicle if short on money (#8748)Patric Stout
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.
2021-01-08Codechange: Remove min/max functions in favour of STL variants (#8502)Charles Pigott
2021-01-07Fix: don't allow cloning vehicles if cloning orders is failing (#8515)Patric Stout
Before this fix, any failing clone order was silently ignored and you as user would never know till you checked the order list. Evil.
2020-05-21Codechange: Use std::string for most of the user-settable custom names.Michael Lutz
2020-05-03Fix #8093: Build+Refit changed game-state in command test run, and thus ↵frosch
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'.
2020-05-03Fix: When build+refit an engine, do not refit any free wagons that may get ↵frosch
attached.
2020-05-03Codechange: Unify the tests whether build+refit is in simulation-test or ↵frosch
real-run.
2019-12-21Codechange: Replace vehicle related FOR_ALL with range-based for loopsglx
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-09-30Fix: Quiet a bogus -Wmaybe-unitialized warning from GCC9Charles Pigott
2019-07-23Fix #7667: Buying an engine after buying wagons doesn't give a complete train.stormcone
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-04-04Fix #7469: Desync when using build and refit feature.peter1138
2019-03-26Codechange: Initialise a few variables that -flto seems to think could ↵Charles Pigott
possibly be uninitialised
2019-03-26Codechange: Removed SmallVector completelyHenry Wilson
2019-03-26Codechange: Replaced SmallVector::[Begin|End]() with std alternativesHenry Wilson
2019-03-26Codechange: Replaced SmallVector::Append() with ↵Henry Wilson
std::vector::[push|emplace]_back()
2019-03-26Codechange: Replaced SmallVector::Contains() with std::find() patternHenry Wilson
2019-03-26Codechange: Replace SmallVector::Length() with std::vector::size()Henry Wilson
2019-03-26Codechange: Replace SmallVector::Clear() with std::vector::clear()Henry Wilson
2019-03-24Change: Show additional cost and refitted capacity in build vehicle window.peter1138
2019-03-24Feature: When filtering purchase list by cargo type, make buy button perform ↵peter1138
a refit if required.
2019-02-10Fix #7197: Invalidate depot buttons when necessary. (#7212)PeterN
2019-01-29Fix 11ab3c4ea2f: Vehicles could not be refitted to cargo IDs higher than 32.Peter Nelson
2018-11-25Fix #6676: Prevent helicopters from stopping in midair during some kinds of ↵Niels Martin Hansen
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.
2018-10-31Doc: Lots and lots of doxymentation fixesCharles Pigott
2018-04-30Fix: Spelling errors (#6769)Joan Josep
2016-11-05(svn r27677) -Codechange: Remove implicit VehicleListIdentifier from uint32 ↵frosch
constructor, to make conversions more explicit.
2015-10-30(svn r27428) -Fix: When selecting a refit cargo for orders, do not check ↵frosch
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.
2014-04-25(svn r26509) -Codechange: replace strdup with stredup (the latter ensures ↵rubidium
the return is not NULL)
2014-04-23(svn r26482) -Codechange: add an include that allows us to undefine/redefine ↵rubidium
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2014-02-07(svn r26317) -Fix [FS#5897]: Check whether NewGRF change vehicle capacity ↵frosch
when they are not supposed to, and truncate cargo appropiately if they are allowed to.
2013-10-13(svn r25865) -Codechange: Refactor detecting of depot vehicle type of a tile ↵zuu
to a new function, GetDepotVehicleType (cirdan, LordAro)
2013-08-06(svn r25698) -Fix [FS#5700]: Autoreplace/renew also refits free wagons.frosch
2013-08-04(svn r25648) -Change [FS#5669]: [NewGRF] Invalidate vehicle recolour palette ↵frosch
during (un)loading.
2013-05-19(svn r25259) -Codechange: track capacities and usage of linksrubidium
2013-02-24(svn r25040) -Add: a mode to CmdRefitVehicle to preserve the current ↵frosch
subtype, also when refitting multiple vehicles.
2013-02-17(svn r25008) -Codechange: Make CargoList::Truncate behave similarly to ↵rubidium
CargoList::MoveTo, i.e. pass the amount to truncate (fonsinchen)
2013-02-14(svn r24998) -Fix [FS#5137]: Set vehicle's service interval is percent flag ↵rubidium
appropriately on creation (peter1138)
2013-02-14(svn r24995) -Codechange: Add flags to vehicle service interval for custom & ↵rubidium
ispercent (peter1138)
2013-02-14(svn r24994) -Codechange: Replace access to service_interval with accessors ↵rubidium
(peter1138)
2012-10-01(svn r24567) -Fix [FS#5261]: Non-train vehicle lists were not resorted when ↵frosch
vehicles were renamed. (Juanjo)
2012-07-07(svn r24384) -Fix [FS#5188-ish]: Make IsInDepot() functions behave ↵frosch
consistent across vehicle types and add IsChainInDepot instead, if that is what shall be checked.
2012-07-07(svn r24382) -Fix: Call Vehicle::IsStoppedInDepot only for the first vehicle ↵frosch
in a chain (i.e. primary vehicle or free wagon).
2012-01-24(svn r23848) -Fix: Even if A == B, A can make more sense than B.frosch
2012-01-09(svn r23783) -Cleanup: remove ancient but not needed command flagrubidium