#include "stdafx.h"
#include "command_func.h"
#include "functions.h"
#include "date_func.h"
#include "window_func.h"
#include "vehicle_base.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, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) |
Add or remove waiting times from an order. | |
CommandCost | CmdSetVehicleOnTime (TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) |
Clear the lateness counter to make the vehicle on time. | |
CommandCost | CmdSetTimetableStart (TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) |
Set the start date of the timetable. | |
CommandCost | CmdAutofillTimetable (TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text) |
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, | |
DoCommandFlag | flags, | |||
uint32 | p1, | |||
uint32 | p2, | |||
const char * | text | |||
) |
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 | Various bitstuffed elements
| |
text | unused |
Definition at line 186 of file timetable_cmd.cpp.
References _settings_game, CheckOwnership(), ClrBit(), CMD_ERROR, DC_EXEC, GB(), HasBit(), GameSettings::order, SetBit(), SetWindowDirty(), OrderSettings::timetabling, VF_AUTOFILL_PRES_WAIT_TIME, VF_AUTOFILL_TIMETABLE, and VF_TIMETABLE_STARTED.
CommandCost CmdChangeTimetable | ( | TileIndex | tile, | |
DoCommandFlag | flags, | |||
uint32 | p1, | |||
uint32 | p2, | |||
const char * | text | |||
) |
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.
| |
text | unused |
Definition at line 64 of file timetable_cmd.cpp.
References _settings_game, CheckOwnership(), CMD_ERROR, DC_EXEC, GB(), HasBit(), ONSF_NO_STOP_AT_DESTINATION_STATION, GameSettings::order, return_cmd_error, and OrderSettings::timetabling.
CommandCost CmdSetTimetableStart | ( | TileIndex | tile, | |
DoCommandFlag | flags, | |||
uint32 | p1, | |||
uint32 | p2, | |||
const char * | text | |||
) |
Set the start date of the timetable.
tile | Not used. | |
flags | Operation to perform. | |
p1 | Vehicle id. | |
p2 | The timetable start date in ticks. |
Definition at line 148 of file timetable_cmd.cpp.
References _date, _settings_game, CheckOwnership(), ClrBit(), CMD_ERROR, DAYS_IN_LEAP_YEAR, DC_EXEC, GB(), MAX_DAY, GameSettings::order, SetWindowDirty(), OrderSettings::timetabling, and VF_TIMETABLE_STARTED.
CommandCost CmdSetVehicleOnTime | ( | TileIndex | tile, | |
DoCommandFlag | flags, | |||
uint32 | p1, | |||
uint32 | p2, | |||
const char * | text | |||
) |
Clear the lateness counter to make the vehicle on time.
tile | Not used. | |
flags | Operation to perform. | |
p1 | Various bitstuffed elements
| |
p2 | unused | |
text | unused |
Definition at line 124 of file timetable_cmd.cpp.
References _settings_game, CheckOwnership(), CMD_ERROR, DC_EXEC, GB(), GameSettings::order, SetWindowDirty(), and OrderSettings::timetabling.