src/engine.cpp
branchNewGRF_ports
changeset 10184 fcf5fb2548eb
parent 6878 7d1ff2f621c7
child 10724 68a692eacf22
equal deleted inserted replaced
10179:eec5a7dcbf61 10184:fcf5fb2548eb
     3 /** @file engine.cpp */
     3 /** @file engine.cpp */
     4 
     4 
     5 #include "stdafx.h"
     5 #include "stdafx.h"
     6 #include "openttd.h"
     6 #include "openttd.h"
     7 #include "debug.h"
     7 #include "debug.h"
     8 #include "engine.h"
       
     9 #include "player_base.h"
     8 #include "player_base.h"
    10 #include "player_func.h"
     9 #include "player_func.h"
    11 #include "command_func.h"
    10 #include "command_func.h"
    12 #include "news.h"
    11 #include "news_func.h"
    13 #include "saveload.h"
    12 #include "saveload.h"
    14 #include "variables.h"
    13 #include "variables.h"
    15 #include "train.h"
    14 #include "train.h"
    16 #include "aircraft.h"
    15 #include "aircraft.h"
    17 #include "newgrf_cargo.h"
    16 #include "newgrf_cargo.h"
    24 #include "date_func.h"
    23 #include "date_func.h"
    25 #include "autoreplace_base.h"
    24 #include "autoreplace_base.h"
    26 #include "autoreplace_gui.h"
    25 #include "autoreplace_gui.h"
    27 #include "string_func.h"
    26 #include "string_func.h"
    28 #include "settings_type.h"
    27 #include "settings_type.h"
       
    28 #include "oldpool_func.h"
    29 
    29 
    30 #include "table/strings.h"
    30 #include "table/strings.h"
    31 #include "table/engines.h"
    31 #include "table/engines.h"
    32 
    32 
    33 Engine _engines[TOTAL_NUM_ENGINES];
    33 Engine _engines[TOTAL_NUM_ENGINES];
   336 		/* maybe make another road type available */
   336 		/* maybe make another road type available */
   337 		FOR_ALL_PLAYERS(p) {
   337 		FOR_ALL_PLAYERS(p) {
   338 			if (p->is_active) SetBit(p->avail_roadtypes, HasBit(EngInfo(index)->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD);
   338 			if (p->is_active) SetBit(p->avail_roadtypes, HasBit(EngInfo(index)->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD);
   339 		}
   339 		}
   340 	}
   340 	}
   341 	AddNewsItem(index, NEWS_FLAGS(NM_CALLBACK, 0, NT_NEW_VEHICLES, DNC_VEHICLEAVAIL), 0, 0);
   341 	AddNewsItem(index, NM_CALLBACK, NF_NONE, NT_NEW_VEHICLES, DNC_VEHICLEAVAIL, 0, 0);
   342 }
   342 }
   343 
   343 
   344 void EnginesMonthlyLoop()
   344 void EnginesMonthlyLoop()
   345 {
   345 {
   346 	if (_cur_year < YEAR_ENGINE_AGING_STOPS) {
   346 	if (_cur_year < YEAR_ENGINE_AGING_STOPS) {