Changeset - r27113:6cba6b39bd2a
[Not reviewed]
master
0 2 0
Andy - 20 months ago 2023-01-21 11:48:51
andy@teamrubber.com
Change: Allow GS access to more ScriptOrder functions
2 files changed with 17 insertions and 17 deletions:
0 comments (0 inline, 0 general)
src/script/api/game_changelog.hpp
Show inline comments
 
@@ -22,6 +22,23 @@
 
 * \li GSCompanyMode::IsDeity
 
 * \li GSTown::ROAD_LAYOUT_RANDOM
 
 * \li GSVehicle::IsPrimaryVehicle
 
 * \li GSOrder::SetOrderJumpTo
 
 * \li GSOrder::SetOrderCondition
 
 * \li GSOrder::SetOrderCompareFunction
 
 * \li GSOrder::SetOrderCompareValue
 
 * \li GSOrder::SetStopLocation
 
 * \li GSOrder::SetOrderRefit
 
 * \li GSOrder::AppendOrder
 
 * \li GSOrder::AppendConditionalOrder
 
 * \li GSOrder::InsertOrder
 
 * \li GSOrder::InsertConditionalOrder
 
 * \li GSOrder::RemoveOrder
 
 * \li GSOrder::SetOrderFlags
 
 * \li GSOrder::MoveOrder
 
 * \li GSOrder::SkipToOrder
 
 * \li GSOrder::CopyOrders
 
 * \li GSOrder::ShareOrders
 
 * \li GSOrder::UnshareOrders
 
 *
 
 * API removals:
 
 * \li GSError::ERR_PRECONDITION_TOO_MANY_PARAMETERS, that error is never returned anymore.
src/script/api/script_order.hpp
Show inline comments
 
@@ -358,7 +358,6 @@ public:
 
	 * @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
 
	 */
 
	static bool SetOrderJumpTo(VehicleID vehicle_id, OrderPosition order_position, OrderPosition jump_to);
 

	
 
@@ -372,7 +371,6 @@ public:
 
	 * @pre condition >= OC_LOAD_PERCENTAGE && condition <= OC_UNCONDITIONALLY.
 
	 * @game @pre ScriptCompanyMode::IsValid().
 
	 * @return Whether the order has been/can be changed.
 
	 * @api -game
 
	 */
 
	static bool SetOrderCondition(VehicleID vehicle_id, OrderPosition order_position, OrderCondition condition);
 

	
 
@@ -386,7 +384,6 @@ public:
 
	 * @pre compare >= CF_EQUALS && compare <= CF_IS_FALSE.
 
	 * @game @pre ScriptCompanyMode::IsValid().
 
	 * @return Whether the order has been/can be changed.
 
	 * @api -game
 
	 */
 
	static bool SetOrderCompareFunction(VehicleID vehicle_id, OrderPosition order_position, CompareFunction compare);
 

	
 
@@ -400,7 +397,6 @@ public:
 
	 * @pre value >= 0 && value < 2048.
 
	 * @game @pre ScriptCompanyMode::IsValid().
 
	 * @return Whether the order has been/can be changed.
 
	 * @api -game
 
	 */
 
	static bool SetOrderCompareValue(VehicleID vehicle_id, OrderPosition order_position, SQInteger value);
 

	
 
@@ -415,7 +411,6 @@ public:
 
	 * @pre stop_location >= STOPLOCATION_NEAR && stop_location <= STOPLOCATION_FAR
 
	 * @game @pre ScriptCompanyMode::IsValid().
 
	 * @return Whether the order has been/can be changed.
 
	 * @api -game
 
	 */
 
	static bool SetStopLocation(VehicleID vehicle_id, OrderPosition order_position, StopLocation stop_location);
 

	
 
@@ -429,7 +424,6 @@ public:
 
	 * @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
 
	 */
 
	static bool SetOrderRefit(VehicleID vehicle_id, OrderPosition order_position, CargoID refit_cargo);
 

	
 
@@ -445,7 +439,6 @@ public:
 
	 * @exception ScriptOrder::ERR_ORDER_TOO_MANY
 
	 * @exception ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION
 
	 * @return True if and only if the order was appended.
 
	 * @api -game
 
	 */
 
	static bool AppendOrder(VehicleID vehicle_id, TileIndex destination, ScriptOrderFlags order_flags);
 

	
 
@@ -459,7 +452,6 @@ public:
 
	 * @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
 
	 * @exception ScriptOrder::ERR_ORDER_TOO_MANY
 
	 * @return True if and only if the order was appended.
 
	 * @api -game
 
	 */
 
	static bool AppendConditionalOrder(VehicleID vehicle_id, OrderPosition jump_to);
 

	
 
@@ -477,7 +469,6 @@ public:
 
	 * @exception ScriptOrder::ERR_ORDER_TOO_MANY
 
	 * @exception ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION
 
	 * @return True if and only if the order was inserted.
 
	 * @api -game
 
	 */
 
	static bool InsertOrder(VehicleID vehicle_id, OrderPosition order_position, TileIndex destination, ScriptOrderFlags order_flags);
 

	
 
@@ -493,7 +484,6 @@ public:
 
	 * @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
 
	 * @exception ScriptOrder::ERR_ORDER_TOO_MANY
 
	 * @return True if and only if the order was inserted.
 
	 * @api -game
 
	 */
 
	static bool InsertConditionalOrder(VehicleID vehicle_id, OrderPosition order_position, OrderPosition jump_to);
 

	
 
@@ -505,7 +495,6 @@ public:
 
	 * @game @pre ScriptCompanyMode::IsValid().
 
	 * @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
 
	 * @return True if and only if the order was removed.
 
	 * @api -game
 
	 */
 
	static bool RemoveOrder(VehicleID vehicle_id, OrderPosition order_position);
 

	
 
@@ -526,7 +515,6 @@ public:
 
	 * @game @pre ScriptCompanyMode::IsValid().
 
	 * @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
 
	 * @return True if and only if the order was changed.
 
	 * @api -game
 
	 */
 
	static bool SetOrderFlags(VehicleID vehicle_id, OrderPosition order_position, ScriptOrderFlags order_flags);
 

	
 
@@ -545,7 +533,6 @@ public:
 
	 *  the target order is moved upwards (e.g. 3). If the order is moved
 
	 *  to a higher place (e.g. from 7 to 9) the target will be moved
 
	 *  downwards (e.g. 8).
 
	 * @api -game
 
	 */
 
	static bool MoveOrder(VehicleID vehicle_id, OrderPosition order_position_move, OrderPosition order_position_target);
 

	
 
@@ -557,7 +544,6 @@ public:
 
	 * @game @pre ScriptCompanyMode::IsValid().
 
	 * @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
 
	 * @return True if and only the current order was changed.
 
	 * @api -game
 
	 */
 
	static bool SkipToOrder(VehicleID vehicle_id, OrderPosition next_order);
 

	
 
@@ -573,7 +559,6 @@ public:
 
	 * @exception ScriptOrder::ERR_ORDER_TOO_MANY
 
	 * @exception ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE
 
	 * @return True if and only if the copying succeeded.
 
	 * @api -game
 
	 */
 
	static bool CopyOrders(VehicleID vehicle_id, VehicleID main_vehicle_id);
 

	
 
@@ -588,7 +573,6 @@ public:
 
	 * @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
 
	 * @exception ScriptOrder::ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE
 
	 * @return True if and only if the sharing succeeded.
 
	 * @api -game
 
	 */
 
	static bool ShareOrders(VehicleID vehicle_id, VehicleID main_vehicle_id);
 

	
 
@@ -599,7 +583,6 @@ public:
 
	 * @pre ScriptVehicle::IsPrimaryVehicle(vehicle_id).
 
	 * @game @pre ScriptCompanyMode::IsValid().
 
	 * @return True if and only if the unsharing succeeded.
 
	 * @api -game
 
	 */
 
	static bool UnshareOrders(VehicleID vehicle_id);
 

	
0 comments (0 inline, 0 general)