summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-08-12 10:41:29 +0000
committerbjarni <bjarni@openttd.org>2006-08-12 10:41:29 +0000
commit466452c3513eb180a89e9ea3fd76c73cf5f97254 (patch)
tree6cdfd2c36fdf36dd3317a87b23274349ba2c5cdd /train_cmd.c
parent7eefc540117a15a338a3cdc278c3368368cbdf96 (diff)
downloadopenttd-466452c3513eb180a89e9ea3fd76c73cf5f97254.tar.xz
(svn r5853) -Fix: [elrails] FS#178 Electric Trains can leave Conventional Depot
now the user will get an error if he tries to start the train and the status bar will say "no power" instead of "stopped" Electric trains already driving in and out of non-electrified depots will still do so, but you can't start new ones
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 8afe5d75b..d36449b34 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -1243,6 +1243,8 @@ int32 CmdStartStopTrain(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
return_cmd_error(error);
}
+ if (v->vehstatus & VS_STOPPED && v->u.rail.cached_power == 0) return_cmd_error(STR_TRAIN_START_NO_CATENARY);
+
if (flags & DC_EXEC) {
if (v->vehstatus & VS_STOPPED && v->u.rail.track == 0x80) {
DeleteVehicleNews(p1, STR_8814_TRAIN_IS_WAITING_IN_DEPOT);