Rework the way the ReinitSeparation command is called. The old way was way too danger...
[openttd-joker.git] / src / tbtr_template_vehicle_func.h
blob5c07602c9a81105df048b97753c7ad1cd4217020
1 // template_vehicle_func.h
2 #ifndef TEMPLATE_VEHICLE_FUNC_H
3 #define TEMPLATE_VEHICLE_FUNC_H
5 #include "stdafx.h"
6 #include "window_gui.h"
8 #include "tbtr_template_vehicle.h"
10 //void DrawTemplateVehicle(TemplateVehicle*, int, const Rect&);
13 Train* VirtualTrainFromTemplateVehicle(TemplateVehicle* tv, StringID &err);
15 void BuildTemplateGuiList(GUITemplateList*, Scrollbar*, Owner, RailType);
17 Money CalculateOverallTemplateCost(const TemplateVehicle*);
19 void DrawTemplate(const TemplateVehicle*, int, int, int);
21 TemplateVehicle* TemplateVehicleFromVirtualTrain(Train *virt);
23 Train* DeleteVirtualTrain(Train*, Train *);
25 CommandCost CmdTemplateReplaceVehicle(Train*, bool, DoCommandFlag);
27 #ifdef _DEBUG
28 // for testing
29 void tbtr_debug_pat();
30 void tbtr_debug_pav();
31 void tbtr_debug_ptv(TemplateVehicle*);
32 void tbtr_debug_pvt(const Train*);
33 #endif
35 TemplateVehicle* GetTemplateVehicleByGroupID(GroupID);
36 bool ChainContainsVehicle(Train*, Train*);
37 Train* ChainContainsEngine(EngineID, Train*);
38 Train* DepotContainsEngine(TileIndex, EngineID, Train*);
40 int NumTrainsNeedTemplateReplacement(GroupID, TemplateVehicle*);
42 CommandCost TestBuyAllTemplateVehiclesInChain(TemplateVehicle *tv, TileIndex tile);
44 void CmdRefitTrainFromTemplate(Train *t, TemplateVehicle *tv, DoCommandFlag);
45 void BreakUpRemainders(Train *t);
47 bool TemplateVehicleContainsEngineOfRailtype(const TemplateVehicle*, RailType);
49 void TransferCargoForTrain(Train*, Train*);
51 void NeutralizeStatus(Train *t);
53 bool TrainMatchesTemplate(const Train *t, TemplateVehicle *tv);
54 bool TrainMatchesTemplateRefit(const Train *t, TemplateVehicle *tv);
56 #endif