26 #include "eng3d/serializer.hpp"
36 for(
const auto& commodity : world.commodities)
37 if(std::find(std::begin(inputs), std::end(inputs), commodity.get_id()) != std::end(inputs))
38 if(province.
products[commodity].supply == 0.f)
40 return this->
level > 0.f;
A single province, which is used to simulate economy in a "bulk-tiles" way instead of doing economica...
std::vector< Product > products
static World & get_instance()
std::vector< std::pair< CommodityId, float > > req_goods_for_unit
UnitTypeId working_unit_type_id
void work_on_unit(const UnitType &unit_type)
bool can_do_output(const Province &province, const std::vector< CommodityId > &inputs) const
Checks if the building can produce output (if it has enough input)
constexpr Id get_id() const
Defines a type of unit, it can be a tank, garrison, infantry, etc this is moddable via a lua script a...
std::vector< std::pair< CommodityId, float > > req_goods