(svn r3535) -Feature: [autoreplace] allow autoreplacing of train wagons

currently ALL available wagons are displayed in the right menu in the replace window
	however the replacement will only be done if the new wagon can be refitted to carry same cargo as the old one is currently carrying

	Since the standard vehicles do not have any valid wagon replacements, this feature can only be used when using newgrf sets
This commit is contained in:
bjarni
2006-02-04 18:25:07 +00:00
parent 94dfa09424
commit 78b51cbec2
5 changed files with 35 additions and 7 deletions

View File

@@ -584,6 +584,9 @@ static int32 CmdBuildRailWagon(EngineID engine, TileIndex tile, uint32 flags)
TrainConsistChanged(GetFirstVehicleInChain(v));
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
if (IsLocalPlayer()) {
InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Train); // updates the replace Train window
}
}
}