Merge branch 'master' into jgrpp
# Conflicts: # src/music.cpp # src/script/api/script_company.cpp # src/script/api/script_event_types.cpp # src/script/api/script_group.cpp # src/script/api/script_object.cpp # src/script/api/script_road.cpp
This commit is contained in:
@@ -356,6 +356,7 @@ public:
|
||||
* @pre IsValidVehicleOrder(vehicle_id, order_position).
|
||||
* @pre IsValidVehicleOrder(vehicle_id, jump_to).
|
||||
* @pre order_position != ORDER_CURRENT && IsConditionalOrder(vehicle_id, order_position).
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @return Whether the order has been/can be changed.
|
||||
* @api -game
|
||||
*/
|
||||
@@ -369,6 +370,7 @@ public:
|
||||
* @pre IsValidVehicleOrder(vehicle_id, order_position).
|
||||
* @pre order_position != ORDER_CURRENT && IsConditionalOrder(vehicle_id, order_position).
|
||||
* @pre condition >= OC_LOAD_PERCENTAGE && condition <= OC_UNCONDITIONALLY.
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @return Whether the order has been/can be changed.
|
||||
* @api -game
|
||||
*/
|
||||
@@ -382,6 +384,7 @@ public:
|
||||
* @pre IsValidVehicleOrder(vehicle_id, order_position).
|
||||
* @pre order_position != ORDER_CURRENT && IsConditionalOrder(vehicle_id, order_position).
|
||||
* @pre compare >= CF_EQUALS && compare <= CF_IS_FALSE.
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @return Whether the order has been/can be changed.
|
||||
* @api -game
|
||||
*/
|
||||
@@ -395,6 +398,7 @@ public:
|
||||
* @pre IsValidVehicleOrder(vehicle_id, order_position).
|
||||
* @pre order_position != ORDER_CURRENT && IsConditionalOrder(vehicle_id, order_position).
|
||||
* @pre value >= 0 && value < 2048.
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @return Whether the order has been/can be changed.
|
||||
* @api -game
|
||||
*/
|
||||
@@ -409,6 +413,7 @@ public:
|
||||
* @pre ScriptVehicle::GetVehicleType(vehicle_id) == ScriptVehicle::VT_RAIL.
|
||||
* @pre IsGotoStationOrder(vehicle_id, order_position).
|
||||
* @pre stop_location >= STOPLOCATION_NEAR && stop_location <= STOPLOCATION_FAR
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @return Whether the order has been/can be changed.
|
||||
* @api -game
|
||||
*/
|
||||
@@ -422,6 +427,7 @@ public:
|
||||
* @pre IsValidVehicleOrder(vehicle_id, order_position).
|
||||
* @pre IsGotoStationOrder(vehicle_id, order_position) || (IsGotoDepotOrder(vehicle_id, order_position) && refit_cargo != CT_AUTO_REFIT).
|
||||
* @pre ScriptCargo::IsValidCargo(refit_cargo) || refit_cargo == CT_AUTO_REFIT || refit_cargo == CT_NO_REFIT
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @return Whether the order has been/can be changed.
|
||||
* @api -game
|
||||
*/
|
||||
@@ -434,6 +440,7 @@ public:
|
||||
* @param order_flags The flags given to the order.
|
||||
* @pre ScriptVehicle::IsPrimaryVehicle(vehicle_id).
|
||||
* @pre AreOrderFlagsValid(destination, order_flags).
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception ScriptOrder::ERR_ORDER_TOO_MANY
|
||||
* @exception ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION
|
||||
@@ -448,6 +455,7 @@ public:
|
||||
* @param jump_to The OrderPosition to jump to if the condition is true.
|
||||
* @pre ScriptVehicle::IsPrimaryVehicle(vehicle_id).
|
||||
* @pre IsValidVehicleOrder(vehicle_id, jump_to).
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception ScriptOrder::ERR_ORDER_TOO_MANY
|
||||
* @return True if and only if the order was appended.
|
||||
@@ -464,6 +472,7 @@ public:
|
||||
* @pre ScriptVehicle::IsPrimaryVehicle(vehicle_id)
|
||||
* @pre IsValidVehicleOrder(vehicle_id, order_position).
|
||||
* @pre AreOrderFlagsValid(destination, order_flags).
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception ScriptOrder::ERR_ORDER_TOO_MANY
|
||||
* @exception ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION
|
||||
@@ -480,6 +489,7 @@ public:
|
||||
* @pre ScriptVehicle::IsPrimaryVehicle(vehicle_id).
|
||||
* @pre IsValidVehicleOrder(vehicle_id, order_position).
|
||||
* @pre IsValidVehicleOrder(vehicle_id, jump_to).
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception ScriptOrder::ERR_ORDER_TOO_MANY
|
||||
* @return True if and only if the order was inserted.
|
||||
@@ -492,6 +502,7 @@ public:
|
||||
* @param vehicle_id The vehicle to remove the order from.
|
||||
* @param order_position The order to remove from the order list.
|
||||
* @pre IsValidVehicleOrder(vehicle_id, order_position).
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @return True if and only if the order was removed.
|
||||
* @api -game
|
||||
@@ -512,6 +523,7 @@ public:
|
||||
* @pre IsValidVehicleOrder(vehicle_id, order_position).
|
||||
* @pre AreOrderFlagsValid(GetOrderDestination(vehicle_id, order_position), order_flags).
|
||||
* @pre (order_flags & OF_GOTO_NEAREST_DEPOT) == (GetOrderFlags(vehicle_id, order_position) & OF_GOTO_NEAREST_DEPOT).
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @return True if and only if the order was changed.
|
||||
* @api -game
|
||||
@@ -526,6 +538,7 @@ public:
|
||||
* @pre IsValidVehicleOrder(vehicle_id, order_position_move).
|
||||
* @pre IsValidVehicleOrder(vehicle_id, order_position_target).
|
||||
* @pre order_position_move != order_position_target.
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @return True if and only if the order was moved.
|
||||
* @note If the order is moved to a lower place (e.g. from 7 to 2)
|
||||
@@ -541,6 +554,7 @@ public:
|
||||
* @param vehicle_id The vehicle that should skip some orders.
|
||||
* @param next_order The order the vehicle should skip to.
|
||||
* @pre IsValidVehicleOrder(vehicle_id, next_order).
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @return True if and only the current order was changed.
|
||||
* @api -game
|
||||
@@ -554,6 +568,7 @@ public:
|
||||
* @param main_vehicle_id The vehicle to copy the orders from.
|
||||
* @pre ScriptVehicle::IsPrimaryVehicle(vehicle_id).
|
||||
* @pre ScriptVehicle::IsPrimaryVehicle(main_vehicle_id).
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception ScriptOrder::ERR_ORDER_TOO_MANY
|
||||
* @exception ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE
|
||||
@@ -569,6 +584,7 @@ public:
|
||||
* @param main_vehicle_id The vehicle to share the orders with.
|
||||
* @pre ScriptVehicle::IsPrimaryVehicle(vehicle_id).
|
||||
* @pre ScriptVehicle::IsPrimaryVehicle(main_vehicle_id).
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE
|
||||
* @return True if and only if the sharing succeeded.
|
||||
@@ -581,6 +597,7 @@ public:
|
||||
* After unsharing orders, the orders list of the vehicle is empty.
|
||||
* @param vehicle_id The vehicle to remove from the shared order list.
|
||||
* @pre ScriptVehicle::IsPrimaryVehicle(vehicle_id).
|
||||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @return True if and only if the unsharing succeeded.
|
||||
* @api -game
|
||||
*/
|
||||
|
Reference in New Issue
Block a user