|
Symphony Of Empires
|
#include <nation.hpp>


Classes | |
| struct | ClientHint |
| Hints for the client on how to display the nation. More... | |
| struct | Relation |
| Diplomatic relations between two nations. More... | |
Public Member Functions | |
| void | declare_war (Nation &nation, std::vector< TreatyClause::BaseClause * > clauses=std::vector< TreatyClause::BaseClause * >()) |
| Declare war. More... | |
| bool | is_ally (const Nation &nation) const |
| bool | is_enemy (const Nation &nation) const |
| void | auto_relocate_capital () |
| Automatically relocates the capital of a nation to another province Use this when a treaty makes a nation lose it's capital. More... | |
| void | set_policy (const Policies &policies) |
| Enacts a policy on a nation. More... | |
| bool | is_accepted_language (const Language &language) const |
| Checks if a LANGUAGE is part of one of our accepted languages. More... | |
| bool | is_accepted_religion (const Religion &relgion) const |
| Checks if a RELIGION is part of one of our accepted relgion. More... | |
| float | get_tax (const Pop &pop) const |
| Gets the total tax applied to a POP depending on their "wealth" (not exactly like that, more like by their type/status) More... | |
| void | give_province (Province &province) |
| Gives this nation a specified province (for example on a treaty) More... | |
| void | control_province (Province &province) |
| const Nation::ClientHint & | get_client_hint () const |
| float | get_research_points () const |
| bool | can_research (const Technology &tech) const |
| void | change_research_focus (const Technology &tech) |
| void | get_allies (std::function< void(const Nation &)> fn) const |
| bool | exists () const |
| Whetever the nation exists at all - we cannot add nations in-game so we just check if the nation "exists" at all, this means that it has a presence and a goverment must own atleast 1 province. More... | |
| const Ideology::Subideology & | get_subideology () const |
| bool | can_directly_control_factories () const |
| void | make_puppet (const Nation &master) |
| bool | is_puppeted_by (const Nation &master) const |
Public Member Functions inherited from Entity< T > | |
| 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 | |
| Eng3D::StringRef | name |
| float | prestige = 0.1f |
| float | budget = 10000.f |
| bool | ai_controlled = true |
| bool | ai_do_cmd_troops = true |
| bool | is_puppeted = false |
| NationId | puppet_master_id |
| ProvinceId | capital_id |
| IdeologyId | ideology_id |
| SubideologyId | subideology_id |
| TechnologyId | focus_tech_id |
| Policies | current_policy |
| std::vector< float > | commodity_production |
| uint16_t | diplomatic_timer |
| std::vector< float > | language_acceptance |
| std::vector< float > | religion_discrim |
| std::vector< ProvinceId > | owned_provinces |
| std::vector< ProvinceId > | controlled_provinces |
| std::deque< Event > | inbox |
| std::vector< float > | research |
| std::vector< Nation::ClientHint > | client_hints |
| std::unordered_map< std::string, float > | flags |
| std::string | client_username |
Public Attributes inherited from RefnameEntity< NationId > | |
| Eng3D::StringRef | ref_name |
Public Attributes inherited from Entity< T > | |
| Id | cached_id |
| Id used to speed up Id lookups on any context. More... | |
Additional Inherited Members | |
Public Types inherited from Entity< T > | |
| using | Id = T |
Static Public Member Functions inherited from Entity< T > | |
| 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... | |
Definition at line 49 of file nation.hpp.
| void Nation::auto_relocate_capital | ( | ) |
Automatically relocates the capital of a nation to another province Use this when a treaty makes a nation lose it's capital.
Definition at line 120 of file nation.cpp.

| bool Nation::can_directly_control_factories | ( | ) | const |
Definition at line 244 of file nation.cpp.


| bool Nation::can_research | ( | const Technology & | tech | ) | const |
| void Nation::change_research_focus | ( | const Technology & | tech | ) |
| void Nation::control_province | ( | Province & | province | ) |
Definition at line 170 of file nation.cpp.


| void Nation::declare_war | ( | Nation & | nation, |
| std::vector< TreatyClause::BaseClause * > | clauses = std::vector<TreatyClause::BaseClause*>() |
||
| ) |
Declare war.
Definition at line 43 of file nation.cpp.


|
inline |
Whetever the nation exists at all - we cannot add nations in-game so we just check if the nation "exists" at all, this means that it has a presence and a goverment must own atleast 1 province.
Definition at line 107 of file nation.hpp.
| void Nation::get_allies | ( | std::function< void(const Nation &)> | fn | ) | const |
| const Nation::ClientHint & Nation::get_client_hint | ( | ) | const |
| float Nation::get_research_points | ( | ) | const |
| const Ideology::Subideology & Nation::get_subideology | ( | ) | const |
Definition at line 239 of file nation.cpp.


| float Nation::get_tax | ( | const Pop & | pop | ) | const |
Gets the total tax applied to a POP depending on their "wealth" (not exactly like that, more like by their type/status)
Definition at line 147 of file nation.cpp.
| void Nation::give_province | ( | Province & | province | ) |
Gives this nation a specified province (for example on a treaty)
Definition at line 156 of file nation.cpp.

| bool Nation::is_accepted_language | ( | const Language & | language | ) | const |
Checks if a LANGUAGE is part of one of our accepted languages.
Definition at line 136 of file nation.cpp.
| bool Nation::is_accepted_religion | ( | const Religion & | relgion | ) | const |
Checks if a RELIGION is part of one of our accepted relgion.
Definition at line 141 of file nation.cpp.
| bool Nation::is_ally | ( | const Nation & | nation | ) | const |
Definition at line 108 of file nation.cpp.


| bool Nation::is_enemy | ( | const Nation & | nation | ) | const |
|
inline |
|
inline |
| void Nation::set_policy | ( | const Policies & | policies | ) |
Enacts a policy on a nation.
Definition at line 130 of file nation.cpp.

| bool Nation::ai_controlled = true |
Definition at line 131 of file nation.hpp.
| bool Nation::ai_do_cmd_troops = true |
Definition at line 132 of file nation.hpp.
| float Nation::budget = 10000.f |
Definition at line 129 of file nation.hpp.
| ProvinceId Nation::capital_id |
Definition at line 136 of file nation.hpp.
| std::vector<Nation::ClientHint> Nation::client_hints |
Definition at line 152 of file nation.hpp.
| std::string Nation::client_username |
Definition at line 154 of file nation.hpp.
| std::vector<float> Nation::commodity_production |
Definition at line 141 of file nation.hpp.
| std::vector<ProvinceId> Nation::controlled_provinces |
Definition at line 149 of file nation.hpp.
| Policies Nation::current_policy |
Definition at line 140 of file nation.hpp.
| uint16_t Nation::diplomatic_timer |
Definition at line 142 of file nation.hpp.
| std::unordered_map<std::string, float> Nation::flags |
Definition at line 153 of file nation.hpp.
| TechnologyId Nation::focus_tech_id |
Definition at line 139 of file nation.hpp.
| IdeologyId Nation::ideology_id |
Definition at line 137 of file nation.hpp.
| std::deque<Event> Nation::inbox |
Definition at line 150 of file nation.hpp.
| bool Nation::is_puppeted = false |
Definition at line 134 of file nation.hpp.
| std::vector<float> Nation::language_acceptance |
Definition at line 145 of file nation.hpp.
| Eng3D::StringRef Nation::name |
Definition at line 125 of file nation.hpp.
| std::vector<ProvinceId> Nation::owned_provinces |
Definition at line 148 of file nation.hpp.
| float Nation::prestige = 0.1f |
Definition at line 126 of file nation.hpp.
| NationId Nation::puppet_master_id |
Definition at line 135 of file nation.hpp.
| std::vector<float> Nation::religion_discrim |
Definition at line 146 of file nation.hpp.
| std::vector<float> Nation::research |
Definition at line 151 of file nation.hpp.
| SubideologyId Nation::subideology_id |
Definition at line 138 of file nation.hpp.