From 1cdee354b490d4c1dbbfe05f51322b2b143cb392 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Wed, 30 Jan 2008 10:27:45 +0000 Subject: (svn r12019) -Codechange: Add support for passenger engine designation for AI-use, NewGRF property 0x08 for trains. --- src/ai/default/default.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ai') diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp index 957ba653e..7bddaa2cb 100644 --- a/src/ai/default/default.cpp +++ b/src/ai/default/default.cpp @@ -154,6 +154,9 @@ static EngineID AiChooseTrainToBuild(RailType railtype, Money money, byte flag, continue; } + /* Don't choose an engine designated for passenger use for freight. */ + if (rvi->ai_passenger_only != 0 && flag == 1) continue; + CommandCost ret = DoCommand(tile, i, 0, 0, CMD_BUILD_RAIL_VEHICLE); if (CmdSucceeded(ret) && ret.GetCost() <= money && rvi->ai_rank >= best_veh_score) { best_veh_score = rvi->ai_rank; -- cgit v1.2.3-70-g09d2