OpenTTD Source
20241108-master-g80f628063a
|
Base class for orders. More...
#include "order_type.h"
#include "core/pool_type.hpp"
#include "core/bitmath_func.hpp"
#include "cargo_type.h"
#include "depot_type.h"
#include "station_type.h"
#include "vehicle_type.h"
#include "timer/timer_game_tick.h"
#include "saveload/saveload.h"
Go to the source code of this file.
Data Structures | |
struct | Order |
struct | OrderList |
Shared order list linking together the linked list of orders and the list of vehicles sharing this order list. More... | |
Typedefs | |
typedef Pool< Order, OrderID, 256, 0xFF0000 > | OrderPool |
typedef Pool< OrderList, OrderListID, 128, 64000 > | OrderListPool |
Functions | |
void | InsertOrder (Vehicle *v, Order *new_o, VehicleOrderID sel_ord) |
Insert a new order but skip the validation. More... | |
void | DeleteOrder (Vehicle *v, VehicleOrderID sel_ord) |
Delete an order but skip the parameter validation. More... | |
Variables | |
OrderPool | _order_pool |
OrderListPool | _orderlist_pool |
Base class for orders.
Definition in file order_base.h.
void DeleteOrder | ( | Vehicle * | v, |
VehicleOrderID | sel_ord | ||
) |
Delete an order but skip the parameter validation.
v | The vehicle to delete the order from. |
sel_ord | The id of the order to be deleted. |
Definition at line 1037 of file order_cmd.cpp.
References BaseConsist::cur_real_order_index, Vehicle::current_order, OrderList::DeleteOrderAt(), DeleteOrderWarnings(), Vehicle::FirstShared(), Order::IsType(), Vehicle::NextShared(), and Vehicle::orders.
Referenced by CmdDeleteOrder().
void InsertOrder | ( | Vehicle * | v, |
Order * | new_o, | ||
VehicleOrderID | sel_ord | ||
) |
Insert a new order but skip the validation.
v | The vehicle to insert the order to. |
new_o | The new order. |
sel_ord | The position the order should be inserted at. |
Definition at line 912 of file order_cmd.cpp.
References BaseConsist::cur_implicit_order_index, BaseConsist::cur_real_order_index, DeleteOrderWarnings(), Vehicle::FirstShared(), OrderList::InsertOrderAt(), Vehicle::IsGroundVehicle(), Vehicle::NextShared(), and Vehicle::orders.