Better handle out of track and depot through load cases

Add advice messages for when loading is aborted due to out of track/depot
Handle non-aligned use of platform
Fix full-load behaviour
Fix speed limiting whilst advancing
This commit is contained in:
Jonathan G Rennison
2018-03-29 19:16:44 +01:00
parent 7aab49e282
commit 2821599f6b
7 changed files with 158 additions and 15 deletions

View File

@@ -79,7 +79,6 @@ bool TryPathReserve(Train *v, bool mark_as_stuck = false, bool first_tile_okay =
void DeleteVisibleTrain(Train *v);
int GetTrainStopLocation(StationID station_id, TileIndex tile, Train *v, int *station_ahead, int *station_length);
void CheckBreakdownFlags(Train *v);
void GetTrainSpriteSize(EngineID engine, uint &width, uint &height, int &xoffs, int &yoffs, EngineImageType image_type);
@@ -406,6 +405,20 @@ CommandCost CmdMoveVirtualRailVehicle(TileIndex, DoCommandFlag, uint32, uint32,
Train* CmdBuildVirtualRailWagon(const Engine*);
Train* CmdBuildVirtualRailVehicle(EngineID, bool lax_engine_check, StringID &error);
int GetTileMarginInFrontOfTrain(const Train *v, int x_pos, int y_pos);
inline int GetTileMarginInFrontOfTrain(const Train *v)
{
return GetTileMarginInFrontOfTrain(v, v->x_pos, v->y_pos);
}
int GetTrainStopLocation(StationID station_id, TileIndex tile, Train *v, int *station_ahead, int *station_length, int x_pos, int y_pos);
inline int GetTrainStopLocation(StationID station_id, TileIndex tile, Train *v, int *station_ahead, int *station_length)
{
return GetTrainStopLocation(station_id, tile, v, station_ahead, station_length, v->x_pos, v->y_pos);
}
#define FOR_ALL_TRAINS(var) FOR_ALL_VEHICLES_OF_TYPE(Train, var)
#endif /* TRAIN_H */