1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-26 16:09:10 +00:00

(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
This commit is contained in:
bjarni
2006-08-12 10:41:29 +00:00
parent 7eefc54011
commit 466452c351
3 changed files with 9 additions and 1 deletions

View File

@@ -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);