mirror of https://github.com/OpenTTD/OpenTTD.git
Merge 79c99f11ae
into 00cfd572ff
This commit is contained in:
commit
3a13ec413c
|
@ -959,6 +959,9 @@ function Regression::Order()
|
|||
print(" AreOrderFlagsValid(): " + AIOrder.AreOrderFlagsValid(33416, AIOrder.OF_TRANSFER | AIOrder.OF_FULL_LOAD));
|
||||
print(" AreOrderFlagsValid(): " + AIOrder.AreOrderFlagsValid(33417, AIOrder.OF_SERVICE_IF_NEEDED));
|
||||
print(" AreOrderFlagsValid(): " + AIOrder.AreOrderFlagsValid(33417, AIOrder.OF_STOP_IN_DEPOT));
|
||||
print(" AreOrderFlagsValid(): " + AIOrder.AreOrderFlagsValid(33417, AIOrder.OF_UNBUNCH_IN_DEPOT));
|
||||
print(" AreOrderFlagsValid(): " + AIOrder.AreOrderFlagsValid(33417, AIOrder.OF_UNBUNCH_IN_DEPOT | AIOrder.OF_SERVICE_IF_NEEDED));
|
||||
print(" AreOrderFlagsValid(): " + AIOrder.AreOrderFlagsValid(0, AIOrder.OF_UNBUNCH_IN_DEPOT | AIOrder.OF_GOTO_NEAREST_DEPOT));
|
||||
print(" AreOrderFlagsValid(): " + AIOrder.AreOrderFlagsValid(0, AIOrder.OF_SERVICE_IF_NEEDED | AIOrder.OF_GOTO_NEAREST_DEPOT));
|
||||
print(" IsValidConditionalOrder(): " + AIOrder.IsValidConditionalOrder(AIOrder.OC_LOAD_PERCENTAGE, AIOrder.CF_EQUALS));
|
||||
print(" IsValidConditionalOrder(): " + AIOrder.IsValidConditionalOrder(AIOrder.OC_RELIABILITY, AIOrder.CF_IS_TRUE));
|
||||
|
@ -1003,6 +1006,36 @@ function Regression::Order()
|
|||
print(" SetStopLocation(): " + AIOrder.SetStopLocation(20, 0, AIOrder.STOPLOCATION_MIDDLE));
|
||||
print(" GetStopLocation(): " + AIOrder.GetStopLocation(20, 0));
|
||||
|
||||
print(" BuildVehicle(): " + AIVehicle.BuildVehicle(28479, 204));
|
||||
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
|
||||
print(" ShareOrders(): " + AIOrder.ShareOrders(21, 16));
|
||||
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
|
||||
print(" AppendOrder(): " + AIOrder.AppendOrder(21, 29253, AIOrder.OF_FULL_LOAD_ANY));
|
||||
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
|
||||
print(" InsertOrder(): " + AIOrder.InsertOrder(21, 0, 28479, AIOrder.OF_UNBUNCH_IN_DEPOT));
|
||||
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
|
||||
print(" SetOrderFlags(): " + AIOrder.SetOrderFlags(21, 0, AIOrder.OF_NONE));
|
||||
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
|
||||
print(" AppendConditionalOrder(): " + AIOrder.AppendConditionalOrder(21, 0));
|
||||
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
|
||||
print(" AppendOrder(): " + AIOrder.AppendOrder(21, 28479, AIOrder.OF_UNBUNCH_IN_DEPOT));
|
||||
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
|
||||
print(" RemoveOrder(): " + AIOrder.RemoveOrder(21, 1));
|
||||
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
|
||||
print(" InsertOrder(): " + AIOrder.InsertOrder(21, 1, 28479, AIOrder.OF_UNBUNCH_IN_DEPOT));
|
||||
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
|
||||
print(" InsertOrder(): " + AIOrder.InsertOrder(21, 2, 28479, AIOrder.OF_UNBUNCH_IN_DEPOT));
|
||||
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
|
||||
print(" InsertOrder(): " + AIOrder.InsertOrder(21, 2, 29253, AIOrder.OF_FULL_LOAD));
|
||||
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
|
||||
print(" SetOrderFlags(): " + AIOrder.SetOrderFlags(21, 0, AIOrder.OF_FULL_LOAD));
|
||||
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
|
||||
print(" InsertConditionalOrder(): " + AIOrder.InsertConditionalOrder(21, 2, 1));
|
||||
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
|
||||
print(" SetOrderFlags(): " + AIOrder.SetOrderFlags(21, 1, AIOrder.OF_SERVICE_IF_NEEDED));
|
||||
print(" GetLastErrorString(): " + AIError.GetLastErrorString());
|
||||
print(" GetOrderCount(): " + AIOrder.GetOrderCount(21));
|
||||
|
||||
local list = AIVehicleList_Station(3);
|
||||
|
||||
print("");
|
||||
|
|
|
@ -9651,6 +9651,9 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
|||
AreOrderFlagsValid(): true
|
||||
AreOrderFlagsValid(): true
|
||||
AreOrderFlagsValid(): true
|
||||
AreOrderFlagsValid(): false
|
||||
AreOrderFlagsValid(): true
|
||||
AreOrderFlagsValid(): true
|
||||
IsValidConditionalOrder(): true
|
||||
IsValidConditionalOrder(): false
|
||||
IsValidConditionalOrder(): true
|
||||
|
@ -9692,6 +9695,35 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
|||
GetStopLocation(): 2
|
||||
SetStopLocation(): true
|
||||
GetStopLocation(): 1
|
||||
BuildVehicle(): 21
|
||||
GetLastErrorString(): ERR_NONE
|
||||
ShareOrders(): true
|
||||
GetLastErrorString(): ERR_NONE
|
||||
AppendOrder(): true
|
||||
GetLastErrorString(): ERR_NONE
|
||||
InsertOrder(): false
|
||||
GetLastErrorString(): ERR_ORDER_UNBUNCH
|
||||
SetOrderFlags(): true
|
||||
GetLastErrorString(): ERR_NONE
|
||||
AppendConditionalOrder(): true
|
||||
GetLastErrorString(): ERR_NONE
|
||||
AppendOrder(): false
|
||||
GetLastErrorString(): ERR_ORDER_UNBUNCH
|
||||
RemoveOrder(): true
|
||||
GetLastErrorString(): ERR_NONE
|
||||
InsertOrder(): true
|
||||
GetLastErrorString(): ERR_NONE
|
||||
InsertOrder(): false
|
||||
GetLastErrorString(): ERR_ORDER_UNBUNCH
|
||||
InsertOrder(): false
|
||||
GetLastErrorString(): ERR_ORDER_UNBUNCH
|
||||
SetOrderFlags(): false
|
||||
GetLastErrorString(): ERR_ORDER_UNBUNCH
|
||||
InsertConditionalOrder(): false
|
||||
GetLastErrorString(): ERR_ORDER_UNBUNCH
|
||||
SetOrderFlags(): true
|
||||
GetLastErrorString(): ERR_NONE
|
||||
GetOrderCount(): 2
|
||||
|
||||
--VehicleList_Station--
|
||||
Count(): 1
|
||||
|
@ -9748,9 +9780,9 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
|||
--Valuate() with excessive CPU usage--
|
||||
Your script made an error: excessive CPU usage in valuator function
|
||||
|
||||
*FUNCTION [unknown()] regression/main.nut line [2051]
|
||||
*FUNCTION [unknown()] regression/main.nut line [2084]
|
||||
*FUNCTION [Valuate()] NATIVE line [-1]
|
||||
*FUNCTION [Start()] regression/main.nut line [2052]
|
||||
*FUNCTION [Start()] regression/main.nut line [2085]
|
||||
|
||||
[id] 0
|
||||
[this] TABLE
|
||||
|
@ -9759,7 +9791,7 @@ Your script made an error: excessive CPU usage in valuator function
|
|||
[this] INSTANCE
|
||||
Your script made an error: excessive CPU usage in valuator function
|
||||
|
||||
*FUNCTION [Start()] regression/main.nut line [2052]
|
||||
*FUNCTION [Start()] regression/main.nut line [2085]
|
||||
|
||||
[Infinite] CLOSURE
|
||||
[list] INSTANCE
|
||||
|
|
|
@ -808,10 +808,11 @@ CommandCost CmdInsertOrder(DoCommandFlag flags, VehicleID veh, VehicleOrderID se
|
|||
if ((new_order.GetDepotOrderType() & ODTFB_SERVICE) && (new_order.GetDepotActionType() & (ODATFB_HALT | ODATFB_UNBUNCH))) return CMD_ERROR;
|
||||
|
||||
/* Check if we're allowed to have a new unbunching order. */
|
||||
if ((new_order.GetDepotActionType() & ODATFB_UNBUNCH)) {
|
||||
if (v->HasFullLoadOrder()) return CommandCost(STR_ERROR_CAN_T_ADD_ORDER, STR_ERROR_UNBUNCHING_NO_UNBUNCHING_FULL_LOAD);
|
||||
if (v->HasUnbunchingOrder()) return CommandCost(STR_ERROR_CAN_T_ADD_ORDER, STR_ERROR_UNBUNCHING_ONLY_ONE_ALLOWED);
|
||||
if (v->HasConditionalOrder()) return CommandCost(STR_ERROR_CAN_T_ADD_ORDER, STR_ERROR_UNBUNCHING_NO_UNBUNCHING_CONDITIONAL);
|
||||
if ((new_order.GetDepotOrderType() & ODTFB_PART_OF_ORDERS) && (new_order.GetDepotActionType() & ODATFB_UNBUNCH)) {
|
||||
if (new_order.GetDepotActionType() & ODATFB_HALT) return CMD_ERROR;
|
||||
if (v->HasFullLoadOrder()) return_cmd_error(STR_ERROR_UNBUNCHING_NO_UNBUNCHING_FULL_LOAD);
|
||||
if (v->HasUnbunchingOrder()) return_cmd_error(STR_ERROR_UNBUNCHING_ONLY_ONE_ALLOWED);
|
||||
if (v->HasConditionalOrder()) return_cmd_error(STR_ERROR_UNBUNCHING_NO_UNBUNCHING_CONDITIONAL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
*
|
||||
* This version is not yet released. The following changes are not set in stone yet.
|
||||
*
|
||||
* API additions:
|
||||
* \li AIOrder.OF_UNBUNCH_IN_DEPOT
|
||||
* \li AIOrder.ERR_ORDER_UNBUNCH
|
||||
*
|
||||
* \b 14.0
|
||||
*
|
||||
* API additions:
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
*
|
||||
* This version is not yet released. The following changes are not set in stone yet.
|
||||
*
|
||||
* API additions:
|
||||
* \li GSOrder.OF_UNBUNCH_IN_DEPOT
|
||||
* \li GSOrder.ERR_ORDER_UNBUNCH
|
||||
*
|
||||
* \b 14.0
|
||||
*
|
||||
* API additions:
|
||||
|
|
|
@ -200,13 +200,14 @@ static int ScriptOrderPositionToRealOrderPosition(VehicleID vehicle_id, ScriptOr
|
|||
((order_flags & OF_TRANSFER) == 0 || (order_flags & OF_UNLOAD) == 0) &&
|
||||
((order_flags & OF_TRANSFER) == 0 || (order_flags & OF_NO_UNLOAD) == 0) &&
|
||||
((order_flags & OF_UNLOAD) == 0 || (order_flags & OF_NO_UNLOAD) == 0) &&
|
||||
((order_flags & OF_UNLOAD) == 0 || (order_flags & OF_NO_UNLOAD) == 0) &&
|
||||
((order_flags & OF_NO_UNLOAD) == 0 || (order_flags & OF_NO_LOAD) == 0) &&
|
||||
((order_flags & OF_FULL_LOAD_ANY) == 0 || (order_flags & OF_NO_LOAD) == 0);
|
||||
|
||||
case OT_GOTO_DEPOT:
|
||||
return (order_flags & ~(OF_NON_STOP_FLAGS | OF_DEPOT_FLAGS)) == 0 &&
|
||||
((order_flags & OF_SERVICE_IF_NEEDED) == 0 || (order_flags & OF_STOP_IN_DEPOT) == 0);
|
||||
((order_flags & OF_SERVICE_IF_NEEDED) == 0 || (order_flags & OF_STOP_IN_DEPOT) == 0) &&
|
||||
((order_flags & OF_SERVICE_IF_NEEDED) == 0 || (order_flags & OF_UNBUNCH_IN_DEPOT) == 0) &&
|
||||
((order_flags & OF_STOP_IN_DEPOT) == 0 || (order_flags & OF_UNBUNCH_IN_DEPOT) == 0);
|
||||
|
||||
case OT_GOTO_WAYPOINT: return (order_flags & ~(OF_NON_STOP_FLAGS)) == 0;
|
||||
default: return false;
|
||||
|
@ -309,6 +310,7 @@ static int ScriptOrderPositionToRealOrderPosition(VehicleID vehicle_id, ScriptOr
|
|||
if (order->GetDepotOrderType() & ODTFB_SERVICE) order_flags |= OF_SERVICE_IF_NEEDED;
|
||||
if (order->GetDepotActionType() & ODATFB_HALT) order_flags |= OF_STOP_IN_DEPOT;
|
||||
if (order->GetDepotActionType() & ODATFB_NEAREST_DEPOT) order_flags |= OF_GOTO_NEAREST_DEPOT;
|
||||
if (order->GetDepotActionType() & ODATFB_UNBUNCH) order_flags |= OF_UNBUNCH_IN_DEPOT;
|
||||
break;
|
||||
|
||||
case OT_GOTO_STATION:
|
||||
|
@ -472,7 +474,9 @@ static int ScriptOrderPositionToRealOrderPosition(VehicleID vehicle_id, ScriptOr
|
|||
|
||||
EnforceCompanyModeValid(false);
|
||||
EnforcePrecondition(false, ScriptVehicle::IsPrimaryVehicle(vehicle_id));
|
||||
EnforcePrecondition(false, order_position >= 0 && order_position <= ::Vehicle::Get(vehicle_id)->GetNumManualOrders());
|
||||
|
||||
const Vehicle *v = ::Vehicle::Get(vehicle_id);
|
||||
EnforcePrecondition(false, order_position >= 0 && order_position <= v->GetNumManualOrders());
|
||||
EnforcePrecondition(false, AreOrderFlagsValid(destination, order_flags));
|
||||
|
||||
Order order;
|
||||
|
@ -480,15 +484,16 @@ static int ScriptOrderPositionToRealOrderPosition(VehicleID vehicle_id, ScriptOr
|
|||
switch (ot) {
|
||||
case OT_GOTO_DEPOT: {
|
||||
OrderDepotTypeFlags odtf = (OrderDepotTypeFlags)(ODTFB_PART_OF_ORDERS | ((order_flags & OF_SERVICE_IF_NEEDED) ? ODTFB_SERVICE : 0));
|
||||
OrderNonStopFlags onsf = (OrderNonStopFlags)(v->IsGroundVehicle() && (order_flags & OF_NON_STOP_INTERMEDIATE) ? ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS : ONSF_STOP_EVERYWHERE);
|
||||
OrderDepotActionFlags odaf = (OrderDepotActionFlags)(ODATF_SERVICE_ONLY | ((order_flags & OF_STOP_IN_DEPOT) ? ODATFB_HALT : 0));
|
||||
if (order_flags & OF_GOTO_NEAREST_DEPOT) odaf |= ODATFB_NEAREST_DEPOT;
|
||||
OrderNonStopFlags onsf = (OrderNonStopFlags)((order_flags & OF_NON_STOP_INTERMEDIATE) ? ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS : ONSF_STOP_EVERYWHERE);
|
||||
if (order_flags & OF_UNBUNCH_IN_DEPOT) odaf |= ODATFB_UNBUNCH;
|
||||
if (order_flags & OF_GOTO_NEAREST_DEPOT) {
|
||||
odaf |= ODATFB_NEAREST_DEPOT;
|
||||
order.MakeGoToDepot(INVALID_DEPOT, odtf, onsf, odaf);
|
||||
} else {
|
||||
/* Check explicitly if the order is to a station (for aircraft) or
|
||||
* to a depot (other vehicle types). */
|
||||
if (::Vehicle::Get(vehicle_id)->type == VEH_AIRCRAFT) {
|
||||
if (v->type == VEH_AIRCRAFT) {
|
||||
if (!::IsTileType(destination, MP_STATION)) return false;
|
||||
order.MakeGoToDepot(::GetStationIndex(destination), odtf, onsf, odaf);
|
||||
} else {
|
||||
|
@ -504,18 +509,18 @@ static int ScriptOrderPositionToRealOrderPosition(VehicleID vehicle_id, ScriptOr
|
|||
order.SetLoadType((OrderLoadFlags)GB(order_flags, 5, 3));
|
||||
order.SetUnloadType((OrderUnloadFlags)GB(order_flags, 2, 3));
|
||||
order.SetStopLocation(OSL_PLATFORM_FAR_END);
|
||||
if (v->IsGroundVehicle()) order.SetNonStopType((OrderNonStopFlags)GB(order_flags, 0, 2));
|
||||
break;
|
||||
|
||||
case OT_GOTO_WAYPOINT:
|
||||
order.MakeGoToWaypoint(::GetStationIndex(destination));
|
||||
if (v->type == VEH_TRAIN) order.SetNonStopType((OrderNonStopFlags)GB(order_flags, 0, 2));
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
order.SetNonStopType((OrderNonStopFlags)GB(order_flags, 0, 2));
|
||||
|
||||
int order_pos = ScriptOrderPositionToRealOrderPosition(vehicle_id, order_position);
|
||||
return ScriptObject::Command<CMD_INSERT_ORDER>::Do(0, vehicle_id, order_pos, order);
|
||||
}
|
||||
|
@ -593,23 +598,22 @@ static void _DoCommandReturnSetOrderFlags(class ScriptInstance *instance)
|
|||
EnforcePrecondition(false, IsValidVehicleOrder(vehicle_id, order_position));
|
||||
EnforcePrecondition(false, AreOrderFlagsValid(GetOrderDestination(vehicle_id, order_position), order_flags));
|
||||
|
||||
const Order *order = ::ResolveOrder(vehicle_id, order_position);
|
||||
int order_pos = ScriptOrderPositionToRealOrderPosition(vehicle_id, order_position);
|
||||
|
||||
ScriptOrderFlags current = GetOrderFlags(vehicle_id, order_position);
|
||||
|
||||
EnforcePrecondition(false, (order_flags & OF_GOTO_NEAREST_DEPOT) == (current & OF_GOTO_NEAREST_DEPOT));
|
||||
|
||||
int order_pos = ScriptOrderPositionToRealOrderPosition(vehicle_id, order_position);
|
||||
if ((current & OF_NON_STOP_FLAGS) != (order_flags & OF_NON_STOP_FLAGS)) {
|
||||
return ScriptObject::Command<CMD_MODIFY_ORDER>::Do(&::_DoCommandReturnSetOrderFlags, vehicle_id, order_pos, MOF_NON_STOP, order_flags & OF_NON_STOP_FLAGS);
|
||||
}
|
||||
|
||||
const Order *order = ::ResolveOrder(vehicle_id, order_position);
|
||||
switch (order->GetType()) {
|
||||
case OT_GOTO_DEPOT:
|
||||
if ((current & OF_DEPOT_FLAGS) != (order_flags & OF_DEPOT_FLAGS)) {
|
||||
uint data = DA_ALWAYS_GO;
|
||||
if (order_flags & OF_SERVICE_IF_NEEDED) data = DA_SERVICE;
|
||||
if (order_flags & OF_STOP_IN_DEPOT) data = DA_STOP;
|
||||
if (order_flags & OF_UNBUNCH_IN_DEPOT) data = DA_UNBUNCH;
|
||||
return ScriptObject::Command<CMD_MODIFY_ORDER>::Do(&::_DoCommandReturnSetOrderFlags, vehicle_id, order_pos, MOF_DEPOT_ACTION, data);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -34,6 +34,15 @@ public:
|
|||
|
||||
/** Aircraft has not enough range to copy/share orders. */
|
||||
ERR_ORDER_AIRCRAFT_NOT_ENOUGH_RANGE, // [STR_ERROR_AIRCRAFT_NOT_ENOUGH_RANGE]
|
||||
|
||||
/**
|
||||
* Can only have one unbunching order.
|
||||
* Cannot use full load orders when vehicle has an unbunching order.
|
||||
* Cannot unbunch a vehicle with a full load order.
|
||||
* Cannot use conditional orders when vehicle has an unbunching order.
|
||||
* Cannot unbunch a vehicle with a conditional order.
|
||||
*/
|
||||
ERR_ORDER_UNBUNCH, // [STR_ERROR_UNBUNCHING_ONLY_ONE_ALLOWED, STR_ERROR_UNBUNCHING_NO_FULL_LOAD, STR_ERROR_UNBUNCHING_NO_UNBUNCHING_FULL_LOAD, STR_ERROR_UNBUNCHING_NO_CONDITIONAL, STR_ERROR_UNBUNCHING_NO_UNBUNCHING_CONDITIONAL]
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -66,6 +75,8 @@ public:
|
|||
OF_SERVICE_IF_NEEDED = 1 << 2,
|
||||
/** Stop in the depot instead of only go there for servicing; only for depots. */
|
||||
OF_STOP_IN_DEPOT = 1 << 3,
|
||||
/** Unbunch vehicle; only for depots. */
|
||||
OF_UNBUNCH_IN_DEPOT = 1 << 4,
|
||||
/** Go to nearest depot. */
|
||||
OF_GOTO_NEAREST_DEPOT = 1 << 8,
|
||||
|
||||
|
@ -76,7 +87,7 @@ public:
|
|||
/** All flags related to loading. */
|
||||
OF_LOAD_FLAGS = OF_FULL_LOAD | OF_FULL_LOAD_ANY | OF_NO_LOAD,
|
||||
/** All flags related to depots. */
|
||||
OF_DEPOT_FLAGS = OF_SERVICE_IF_NEEDED | OF_STOP_IN_DEPOT | OF_GOTO_NEAREST_DEPOT,
|
||||
OF_DEPOT_FLAGS = OF_SERVICE_IF_NEEDED | OF_STOP_IN_DEPOT | OF_UNBUNCH_IN_DEPOT | OF_GOTO_NEAREST_DEPOT,
|
||||
|
||||
/** For marking invalid order flags */
|
||||
OF_INVALID = 0xFFFF,
|
||||
|
@ -438,6 +449,7 @@ public:
|
|||
* @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception ScriptOrder::ERR_ORDER_TOO_MANY
|
||||
* @exception ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION
|
||||
* @exception ScriptOrder::ERR_ORDER_UNBUNCH
|
||||
* @return True if and only if the order was appended.
|
||||
*/
|
||||
static bool AppendOrder(VehicleID vehicle_id, TileIndex destination, ScriptOrderFlags order_flags);
|
||||
|
@ -451,6 +463,7 @@ public:
|
|||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception ScriptOrder::ERR_ORDER_TOO_MANY
|
||||
* @exception ScriptOrder::ERR_ORDER_UNBUNCH
|
||||
* @return True if and only if the order was appended.
|
||||
*/
|
||||
static bool AppendConditionalOrder(VehicleID vehicle_id, OrderPosition jump_to);
|
||||
|
@ -468,6 +481,7 @@ public:
|
|||
* @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception ScriptOrder::ERR_ORDER_TOO_MANY
|
||||
* @exception ScriptOrder::ERR_ORDER_TOO_FAR_AWAY_FROM_PREVIOUS_DESTINATION
|
||||
* @exception ScriptOrder::ERR_ORDER_UNBUNCH
|
||||
* @return True if and only if the order was inserted.
|
||||
*/
|
||||
static bool InsertOrder(VehicleID vehicle_id, OrderPosition order_position, TileIndex destination, ScriptOrderFlags order_flags);
|
||||
|
@ -483,6 +497,7 @@ public:
|
|||
* @game @pre ScriptCompanyMode::IsValid().
|
||||
* @exception ScriptError::ERR_OWNED_BY_ANOTHER_COMPANY
|
||||
* @exception ScriptOrder::ERR_ORDER_TOO_MANY
|
||||
* @exception ScriptOrder::ERR_ORDER_UNBUNCH
|
||||
* @return True if and only if the order was inserted.
|
||||
*/
|
||||
static bool InsertConditionalOrder(VehicleID vehicle_id, OrderPosition order_position, OrderPosition jump_to);
|
||||
|
|
Loading…
Reference in New Issue