#include "stdafx.h"
#include "openttd.h"
#include "variables.h"
#include "command_func.h"
#include "functions.h"
#include "window_func.h"
#include "vehicle_func.h"
#include "vehicle_base.h"
#include "settings_type.h"
#include "table/strings.h"
Go to the source code of this file.
Functions | |
static void | ChangeTimetable (Vehicle *v, VehicleOrderID order_number, uint16 time, bool is_journey) |
CommandCost | CmdChangeTimetable (TileIndex tile, uint32 flags, uint32 p1, uint32 p2) |
Add or remove waiting times from an order. | |
CommandCost | CmdSetVehicleOnTime (TileIndex tile, uint32 flags, uint32 p1, uint32 p2) |
Clear the lateness counter to make the vehicle on time. | |
CommandCost | CmdAutofillTimetable (TileIndex tile, uint32 flags, uint32 p1, uint32 p2) |
Start or stop filling the timetable automatically from the time the vehicle actually takes to complete it. | |
void | UpdateVehicleTimetable (Vehicle *v, bool travelling) |
Definition in file timetable_cmd.cpp.
CommandCost CmdAutofillTimetable | ( | TileIndex | tile, | |
uint32 | flags, | |||
uint32 | p1, | |||
uint32 | p2 | |||
) |
Start or stop filling the timetable automatically from the time the vehicle actually takes to complete it.
When starting to autofill the current times are cleared and the timetable will start again from scratch.
tile | Not used. | |
flags | Operation to perform. | |
p1 | Vehicle index. | |
p2 | Set to 1 to enable, 0 to disable. |
Definition at line 116 of file timetable_cmd.cpp.
References ClrBit(), CMD_ERROR, DC_EXEC, GB(), GetFirstVehicleFromSharedList(), IsValidVehicleID(), SetBit(), VF_AUTOFILL_TIMETABLE, and VF_TIMETABLE_STARTED.
CommandCost CmdChangeTimetable | ( | TileIndex | tile, | |
uint32 | flags, | |||
uint32 | p1, | |||
uint32 | p2 | |||
) |
Add or remove waiting times from an order.
tile | Not used. | |
flags | Operation to perform. | |
p1 | Various bitstuffed elements
| |
p2 | The amount of time to wait.
|
Definition at line 54 of file timetable_cmd.cpp.
References CMD_ERROR, DC_EXEC, GB(), HasBit(), IsValidVehicleID(), OFB_NON_STOP, and return_cmd_error.
CommandCost CmdSetVehicleOnTime | ( | TileIndex | tile, | |
uint32 | flags, | |||
uint32 | p1, | |||
uint32 | p2 | |||
) |
Clear the lateness counter to make the vehicle on time.
tile | Not used. | |
flags | Operation to perform. | |
p1 | Various bitstuffed elements
|
Definition at line 90 of file timetable_cmd.cpp.
References CMD_ERROR, DC_EXEC, GB(), and IsValidVehicleID().