File diff r13056:a5ba812281e7 → r13057:58af81fcdcf8
src/timetable_cmd.cpp
Show inline comments
 
@@ -55,12 +55,14 @@ static void ChangeTimetable(Vehicle *v, 
 
 *                      time.
 
 * - p1 = (bit    25) - Whether p2 contains waiting and travelling time.
 
 * @param p2 The amount of time to wait.
 
 * - p2 = (bit  0-15) - Waiting or travelling time as specified by p1 bit 24 if p1 bit 25 is not set,
 
 *                      Travelling time if p1 bit 25 is set.
 
 * - p2 = (bit 16-31) - Waiting time if p1 bit 25 is set
 
 * @param text unused
 
 * @return the cost of this operation or an error
 
 */
 
CommandCost CmdChangeTimetable(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
 
{
 
	if (!_settings_game.order.timetabling) return CMD_ERROR;
 

	
 
	VehicleID veh = GB(p1, 0, 16);
 
@@ -112,12 +114,15 @@ CommandCost CmdChangeTimetable(TileIndex
 
/**
 
 * Clear the lateness counter to make the vehicle on time.
 
 * @param tile Not used.
 
 * @param flags Operation to perform.
 
 * @param p1 Various bitstuffed elements
 
 * - p1 = (bit  0-15) - Vehicle with the orders to change.
 
 * @param p2 unused
 
 * @param text unused
 
 * @return the cost of this operation or an error
 
 */
 
CommandCost CmdSetVehicleOnTime(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
 
{
 
	if (!_settings_game.order.timetabling) return CMD_ERROR;
 

	
 
	VehicleID veh = GB(p1, 0, 16);
 
@@ -139,12 +144,14 @@ CommandCost CmdSetVehicleOnTime(TileInde
 
 * @param tile Not used.
 
 * @param flags Operation to perform.
 
 * @param p1 Vehicle index.
 
 * @param p2 Various bitstuffed elements
 
 * - p2 = (bit 0) - Set to 1 to enable, 0 to disable autofill.
 
 * - p2 = (bit 1) - Set to 1 to preserve waiting times in non-destructive mode
 
 * @param text unused
 
 * @return the cost of this operation or an error
 
 */
 
CommandCost CmdAutofillTimetable(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
 
{
 
	if (!_settings_game.order.timetabling) return CMD_ERROR;
 

	
 
	VehicleID veh = GB(p1, 0, 16);