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

Method shipmentsTotal

game/ui/general/transactioncontrol.cpp:840–851  ·  view source on GitHub ↗

* Get total shipment orders from(+) and to(-) the base (economy). * @param baseIdx - 0-7 for bases, 8 for economy * @return - total sum of shipment orders */

Source from the content-addressed store, hash-verified

838 * @return - total sum of shipment orders
839 */
840int TransactionControl::Trade::shipmentsTotal(const int baseIdx) const
841{
842 int total = 0;
843 if (shipments.find(baseIdx) != shipments.end())
844 {
845 for (auto &s : shipments.at(baseIdx))
846 {
847 total += s.second;
848 }
849 }
850 return total;
851}
852
853/**
854 * Get shipment order.

Callers 7

getCrewDeltaMethod · 0.80
getCargoDeltaMethod · 0.80
getBioDeltaMethod · 0.80
getPriceDeltaMethod · 0.80
executeOrdersMethod · 0.80
executeOrdersMethod · 0.80
isClosableMethod · 0.80

Calls 1

endMethod · 0.80

Tested by

no test coverage detected