summaryrefslogtreecommitdiff
path: root/src/command.cpp
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2008-04-27 20:09:29 +0000
committerbjarni <bjarni@openttd.org>2008-04-27 20:09:29 +0000
commit783e20a263a5e72bfed81ef7a9535a2caefebf79 (patch)
treeefbff2346a07d27ade486566153b76347444eb3f /src/command.cpp
parentd6c971fd9b3777bcd0fa41ecaefb52ab2567bc89 (diff)
downloadopenttd-783e20a263a5e72bfed81ef7a9535a2caefebf79.tar.xz
(svn r12913) -Add: ability to backup and restore a player's economic data and data for a vehicle (or chain of vehicles)
Autoreplace uses this with the following benefits: -Mass autoreplace (the button in the depot window) will now estimate costs correctly -Autoreplace now either replaces correctly or manages to keep the original vehicle (no more broken trains) Thanks to Ammler for testing this
Diffstat (limited to 'src/command.cpp')
-rw-r--r--src/command.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/command.cpp b/src/command.cpp
index 7bf1b8cba..26c380cec 100644
--- a/src/command.cpp
+++ b/src/command.cpp
@@ -542,16 +542,12 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback,
* fact will trigger an assertion failure. --pasky
* CMD_CLONE_VEHICLE: Both building new vehicles and refitting them can be
* influenced by newgrf callbacks, which makes it impossible to accurately
- * estimate the cost of cloning a vehicle.
- * CMD_DEPOT_MASS_AUTOREPLACE: we can't predict wagon removal so
- * the test will not include income from any sold wagons.
- * This means that the costs can sometimes be lower than estimated. */
+ * estimate the cost of cloning a vehicle. */
notest =
(cmd & 0xFF) == CMD_CLEAR_AREA ||
(cmd & 0xFF) == CMD_LEVEL_LAND ||
(cmd & 0xFF) == CMD_REMOVE_LONG_ROAD ||
- (cmd & 0xFF) == CMD_CLONE_VEHICLE ||
- (cmd & 0xFF) == CMD_DEPOT_MASS_AUTOREPLACE;
+ (cmd & 0xFF) == CMD_CLONE_VEHICLE;
_docommand_recursive = 1;