MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / getOrder

Method getOrder

game/ui/general/transactioncontrol.cpp:859–870  ·  view source on GitHub ↗

* Get shipment order. * @param from - 0-7 for bases, 8 for economy * @param to - 0-7 for bases, 8 for economy * @return - the shipment order */

Source from the content-addressed store, hash-verified

857 * @return - the shipment order
858 */
859int TransactionControl::Trade::getOrder(const int from, const int to) const
860{
861 if (shipments.find(from) != shipments.end())
862 {
863 auto &order = shipments.at(from);
864 if (order.find(to) != order.end())
865 {
866 return order.at(to);
867 }
868 }
869 return 0;
870}
871
872/**
873 * Cancel shipment order.

Callers 1

executeOrdersMethod · 0.80

Calls 1

endMethod · 0.80

Tested by

no test coverage detected