|
Symphony Of Empires
|
A military outpost, on land serves as a "spawn" place for units When adjacent to a water tile this serves as a shipyard for spawning naval units. More...
#include <building.hpp>


Classes | |
| struct | Investment |
Public Member Functions | |
| 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) More... | |
| bool | can_build_unit () const |
| float | get_upgrade_cost () const |
| float | get_profit () const |
| float | get_operating_ratio () const |
| float | get_output_amount () const |
| float | get_max_output_amount (float max_workers) const |
| bool | is_working_on_unit () const |
| void | work_on_unit (const UnitType &unit_type) |
| void | stop_working_on_unit () |
| float | get_total_investment () const |
Public Member Functions inherited from Entity< BuildingId > | |
| constexpr | Entity () noexcept=default |
| constexpr | Entity (Entity &&) noexcept=default |
| constexpr | Entity (const Entity &) noexcept=default |
| constexpr Entity & | operator= (const Entity &) noexcept=default |
| constexpr | ~Entity () noexcept=default |
| constexpr bool | is_invalid () const |
| Checks if the current id is invalid. More... | |
| constexpr bool | is_valid () const |
| Checks if the current id is valid. More... | |
| constexpr | operator Id () const noexcept |
| constexpr | operator size_t () const noexcept |
| constexpr Id | get_id () const |
Public Attributes | |
| Investment | estate_private |
| Investment | estate_state |
| Investment | estate_collective |
| Investment | estate_individual |
| std::vector< Investment > | estate_foreign |
| float | budget = 1000.f |
| float | level = 0.f |
| float | workers = 1.f |
| float | production_scale = 1.f |
| bool | _is_wrking_on_unit = false |
| UnitTypeId | working_unit_type_id |
| std::vector< std::pair< CommodityId, float > > | req_goods_for_unit |
| std::vector< std::pair< CommodityId, float > > | req_goods |
| struct { | |
| float outputs = 0.f | |
| } | revenue |
| struct { | |
| float wages = 0.f | |
| float inputs_cost = 0.f | |
| float state_taxes = 0.f | |
| float state_dividends = 0.f | |
| float pop_dividends = 0.f | |
| float private_dividends = 0.f | |
| } | expenses |
Public Attributes inherited from Entity< BuildingId > | |
| Id | cached_id |
| Id used to speed up Id lookups on any context. More... | |
Static Public Attributes | |
| static constexpr auto | industry_production_rate = 1.f |
Additional Inherited Members | |
Public Types inherited from Entity< BuildingId > | |
| using | Id = BuildingId |
Static Public Member Functions inherited from Entity< BuildingId > | |
| constexpr static Id | invalid () |
| Returns an invalid id. More... | |
| constexpr static bool | is_invalid (Id id) |
| Checks if the id is not valid. More... | |
| constexpr static bool | is_valid (Id id) |
| Checks if the id is valid. More... | |
A military outpost, on land serves as a "spawn" place for units When adjacent to a water tile this serves as a shipyard for spawning naval units.
Definition at line 90 of file building.hpp.
|
inline |
Definition at line 93 of file building.hpp.
| bool Building::can_do_output | ( | const Province & | province, |
| const std::vector< CommodityId > & | inputs | ||
| ) | const |
Checks if the building can produce output (if it has enough input)
Definition at line 33 of file building.cpp.

|
inline |
Definition at line 121 of file building.hpp.
|
inline |
Definition at line 108 of file building.hpp.
|
inline |
Definition at line 117 of file building.hpp.
|
inline |
Definition at line 104 of file building.hpp.
|
inline |
Definition at line 156 of file building.hpp.
|
inline |
Definition at line 99 of file building.hpp.
|
inline |
Definition at line 125 of file building.hpp.
|
inline |
Definition at line 131 of file building.hpp.
| void Building::work_on_unit | ( | const UnitType & | unit_type | ) |
| bool Building::_is_wrking_on_unit = false |
Definition at line 170 of file building.hpp.
| float Building::budget = 1000.f |
Definition at line 166 of file building.hpp.
| Investment Building::estate_collective |
Definition at line 153 of file building.hpp.
| std::vector<Investment> Building::estate_foreign |
Definition at line 155 of file building.hpp.
| Investment Building::estate_individual |
Definition at line 154 of file building.hpp.
| Investment Building::estate_private |
Definition at line 151 of file building.hpp.
| Investment Building::estate_state |
Definition at line 152 of file building.hpp.
| struct { ... } Building::expenses |
|
staticconstexpr |
Definition at line 116 of file building.hpp.
| float Building::inputs_cost = 0.f |
Definition at line 187 of file building.hpp.
| float Building::level = 0.f |
Definition at line 167 of file building.hpp.
| float Building::outputs = 0.f |
Definition at line 180 of file building.hpp.
| float Building::pop_dividends = 0.f |
Definition at line 190 of file building.hpp.
| float Building::private_dividends = 0.f |
Definition at line 191 of file building.hpp.
| float Building::production_scale = 1.f |
Definition at line 169 of file building.hpp.
| std::vector<std::pair<CommodityId, float> > Building::req_goods |
Definition at line 176 of file building.hpp.
| std::vector<std::pair<CommodityId, float> > Building::req_goods_for_unit |
Definition at line 174 of file building.hpp.
| struct { ... } Building::revenue |
| float Building::state_dividends = 0.f |
Definition at line 189 of file building.hpp.
| float Building::state_taxes = 0.f |
Definition at line 188 of file building.hpp.
| float Building::wages = 0.f |
Definition at line 186 of file building.hpp.
| float Building::workers = 1.f |
Definition at line 168 of file building.hpp.
| UnitTypeId Building::working_unit_type_id |
Definition at line 171 of file building.hpp.