Freeciv21
Develop your civilization from humble roots to a global empire
nation_type Struct Reference

#include <nation.h>

+ Collaboration diagram for nation_type:

Public Member Functions

 nation_type ()
 Allocate resources associated with the given nation. More...
 
 ~nation_type ()
 De-allocate resources associated with the given nation. More...
 

Public Attributes

Nation_type_id item_number = 0
 
char * translation_domain = nullptr
 
struct name_translation adjective
 
struct name_translation noun_plural
 
char flag_graphic_str [MAX_LEN_NAME]
 
char flag_graphic_alt [MAX_LEN_NAME]
 
struct nation_leader_list * leaders = nullptr
 
struct nation_stylestyle = nullptr
 
char * legend = nullptr
 
bool is_playable = true
 
enum barbarian_type barb_type = NOT_A_BARBARIAN
 
struct nation_set_list * sets
 
struct nation_group_list * groups
 
struct playerplayer = nullptr
 
int init_techs [MAX_NUM_TECH_LIST]
 
int init_buildings [MAX_NUM_BUILDING_LIST]
 
governmentinit_government
 
std::array< unit_type *, MAX_NUM_UNIT_LISTinit_units = {nullptr}
 
union {
   struct {
      struct nation_city_list *   default_cities
 
      struct nation_list *   civilwar_nations
 
      struct nation_list *   parent_nations
 
      struct nation_list *   conflicts_with
 
      struct rgbcolor *   rgb
 
      struct trait_limits *   traits
 
      bool   no_startpos
 
   }   server
 
   struct {
      bool   is_pickable
 
   }   client
 
}; 
 

Detailed Description

Definition at line 77 of file nation.h.

Constructor & Destructor Documentation

◆ nation_type()

nation_type::nation_type ( )

Allocate resources associated with the given nation.

Constructor for nation_type

Definition at line 474 of file nation.cpp.

◆ ~nation_type()

nation_type::~nation_type ( )

De-allocate resources associated with the given nation.

Destructor for nation_type

Definition at line 499 of file nation.cpp.

Member Data Documentation

◆ 

union { ... }

◆ adjective

◆ barb_type

enum barbarian_type nation_type::barb_type = NOT_A_BARBARIAN

Definition at line 88 of file nation.h.

Referenced by handle_ruleset_nation(), load_ruleset_nations(), pick_a_nation(), and save_nation().

◆ civilwar_nations

struct nation_list* nation_type::civilwar_nations

Definition at line 115 of file nation.h.

◆ 

struct { ... } nation_type::client

◆ conflicts_with

struct nation_list* nation_type::conflicts_with

Definition at line 120 of file nation.h.

◆ default_cities

struct nation_city_list* nation_type::default_cities

Definition at line 111 of file nation.h.

◆ flag_graphic_alt

char nation_type::flag_graphic_alt[MAX_LEN_NAME]

Definition at line 83 of file nation.h.

Referenced by handle_ruleset_nation(), save_nation(), and tileset_setup_nation_flag().

◆ flag_graphic_str

char nation_type::flag_graphic_str[MAX_LEN_NAME]

Definition at line 82 of file nation.h.

Referenced by handle_ruleset_nation(), save_nation(), and tileset_setup_nation_flag().

◆ groups

struct nation_group_list* nation_type::groups

Definition at line 95 of file nation.h.

Referenced by handle_ruleset_nation(), nation_is_in_group(), nation_type(), and ~nation_type().

◆ init_buildings

int nation_type::init_buildings[MAX_NUM_BUILDING_LIST]

◆ init_government

government* nation_type::init_government
Initial value:
=
nullptr

Definition at line 103 of file nation.h.

Referenced by final_ruleset_adjustments(), handle_ruleset_nation(), helptext_nation(), init_government_of_nation(), and save_nation().

◆ init_techs

int nation_type::init_techs[MAX_NUM_TECH_LIST]

◆ init_units

std::array<unit_type *, MAX_NUM_UNIT_LIST> nation_type::init_units = {nullptr}

Definition at line 105 of file nation.h.

Referenced by handle_ruleset_nation(), helptext_nation(), init_new_game(), and save_nation().

◆ is_pickable

bool nation_type::is_pickable

Definition at line 142 of file nation.h.

◆ is_playable

bool nation_type::is_playable = true

Definition at line 88 of file nation.h.

Referenced by handle_ruleset_nation(), is_nation_playable(), and save_nation().

◆ item_number

Nation_type_id nation_type::item_number = 0

Definition at line 78 of file nation.h.

Referenced by nations_alloc().

◆ leaders

struct nation_leader_list* nation_type::leaders = nullptr

◆ legend

char* nation_type::legend = nullptr

◆ no_startpos

bool nation_type::no_startpos

Definition at line 128 of file nation.h.

◆ noun_plural

struct name_translation nation_type::noun_plural

◆ parent_nations

struct nation_list* nation_type::parent_nations

Definition at line 116 of file nation.h.

◆ player

struct player* nation_type::player = nullptr

◆ rgb

struct rgbcolor* nation_type::rgb

Definition at line 123 of file nation.h.

◆ 

◆ sets

struct nation_set_list* nation_type::sets

Definition at line 92 of file nation.h.

Referenced by handle_ruleset_nation(), nation_is_in_set(), nation_type(), and ~nation_type().

◆ style

struct nation_style* nation_type::style = nullptr

Definition at line 85 of file nation.h.

Referenced by handle_ruleset_nation(), save_nation(), and style_of_nation().

◆ traits

struct trait_limits* nation_type::traits

Definition at line 125 of file nation.h.

◆ translation_domain

char* nation_type::translation_domain = nullptr