31 #include <unordered_set>
32 #include <unordered_map>
36 #include "eng3d/string.hpp"
56 bool can_do_diplomacy()
const {
88 void declare_war(
Nation& nation, std::vector<TreatyClause::BaseClause*> clauses = std::vector<TreatyClause::BaseClause*>());
153 std::unordered_map<std::string, float>
flags;
158 template<
bool is_const>
160 template<
bool is_serialize>
162 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.alliance);
163 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.has_war);
164 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.relation);
169 template<
bool is_const>
171 template<
bool is_serialize>
173 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.color);
174 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.name);
175 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.ideology_id);
180 template<
bool is_const>
182 template<
bool is_serialize>
184 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.cached_id);
185 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.name);
186 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.ref_name);
187 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.is_puppeted);
188 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.puppet_master_id);
189 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.prestige);
190 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.budget);
191 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.capital_id);
192 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.commodity_production);
193 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.language_acceptance);
194 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.religion_discrim);
195 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.owned_provinces);
196 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.controlled_provinces);
197 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.current_policy);
198 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.diplomatic_timer);
199 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.inbox);
200 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.client_hints);
201 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.ideology_id);
202 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.subideology_id);
203 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.research);
204 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.focus_tech_id);
205 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.flags);
TechnologyId focus_tech_id
NationId puppet_master_id
std::vector< ProvinceId > controlled_provinces
float get_tax(const Pop &pop) const
Gets the total tax applied to a POP depending on their "wealth" (not exactly like that,...
std::vector< Nation::ClientHint > client_hints
bool is_ally(const Nation &nation) const
void set_policy(const Policies &policies)
Enacts a policy on a nation.
void give_province(Province &province)
Gives this nation a specified province (for example on a treaty)
bool is_accepted_language(const Language &language) const
Checks if a LANGUAGE is part of one of our accepted languages.
SubideologyId subideology_id
uint16_t diplomatic_timer
bool can_directly_control_factories() const
std::vector< float > language_acceptance
std::vector< float > research
void make_puppet(const Nation &master)
std::vector< float > commodity_production
const Ideology::Subideology & get_subideology() const
void control_province(Province &province)
std::unordered_map< std::string, float > flags
std::deque< Event > inbox
float get_research_points() const
bool exists() const
Whetever the nation exists at all - we cannot add nations in-game so we just check if the nation "exi...
std::string client_username
bool is_accepted_religion(const Religion &relgion) const
Checks if a RELIGION is part of one of our accepted relgion.
bool is_puppeted_by(const Nation &master) const
void get_allies(std::function< void(const Nation &)> fn) const
bool can_research(const Technology &tech) const
std::vector< ProvinceId > owned_provinces
void change_research_focus(const Technology &tech)
bool is_enemy(const Nation &nation) const
void declare_war(Nation &nation, std::vector< TreatyClause::BaseClause * > clauses=std::vector< TreatyClause::BaseClause * >())
Declare war.
std::vector< float > religion_discrim
void auto_relocate_capital()
Automatically relocates the capital of a nation to another province Use this when a treaty makes a na...
const Nation::ClientHint & get_client_hint() const
A single province, which is used to simulate economy in a "bulk-tiles" way instead of doing economica...
Base class that serves as archiver, stores (in memory) the data required for serialization/deserializ...
static void deser_dynamic(Eng3D::Deser::Archive &ar, type< is_serialize > &obj)
typename Eng3D::Deser::CondConstType< is_const, Nation >::type type
typename Eng3D::Deser::CondConstType< is_const, Nation::ClientHint >::type type
static void deser_dynamic(Eng3D::Deser::Archive &ar, type< is_serialize > &obj)
typename Eng3D::Deser::CondConstType< is_const, Nation::Relation >::type type
static void deser_dynamic(Eng3D::Deser::Archive &ar, type< is_serialize > &obj)
A serializer (base class) which can be used to serialize objects and create per-object optimized clas...
A reference to a string on the global string pool.
constexpr Id get_id() const
Hints for the client on how to display the nation.
Diplomatic relations between two nations.
bool has_landpass() const
bool is_customs_union() const
An entity which can be referenced via a ref_name and also via id.