Freeciv21
Develop your civilization from humble roots to a global empire
diplhand.h File Reference
#include "fc_types.h"
#include "hand_gen.h"
#include "speclist.h"
+ Include dependency graph for diplhand.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SPECLIST_TAG   treaty
 
#define SPECLIST_TYPE   struct Treaty
 
#define treaty_list_iterate(list, p)    TYPED_LIST_ITERATE(struct Treaty, list, p)
 
#define treaty_list_iterate_end   LIST_ITERATE_END
 

Functions

void establish_embassy (struct player *pplayer, struct player *aplayer)
 Create an embassy. More...
 
void diplhand_init ()
 Initialize diplhand module. More...
 
void diplhand_free ()
 Free all the resources allocated by diplhand. More...
 
void free_treaties ()
 Free all the treaties currently in treaty list. More...
 
struct Treatyfind_treaty (struct player *plr0, struct player *plr1)
 Find currently active treaty between two players. More...
 
void send_diplomatic_meetings (struct connection *dest)
 Send information on any on-going diplomatic meetings for connection's player. More...
 
void cancel_all_meetings (struct player *pplayer)
 Cancels all meetings of player. More...
 
void reject_all_treaties (struct player *pplayer)
 Reject all treaties currently being negotiated. More...
 
struct treaty_list * get_all_treaties ()
 Get treaty list. More...
 

Variables

const int TURNS_LEFT = 16
 
const int TURNS_EXTEND_CEASEFIRE = 1
 

Macro Definition Documentation

◆ SPECLIST_TAG

#define SPECLIST_TAG   treaty

Definition at line 21 of file diplhand.h.

◆ SPECLIST_TYPE

#define SPECLIST_TYPE   struct Treaty

Definition at line 22 of file diplhand.h.

◆ treaty_list_iterate

#define treaty_list_iterate (   list,
 
)     TYPED_LIST_ITERATE(struct Treaty, list, p)

Definition at line 29 of file diplhand.h.

◆ treaty_list_iterate_end

#define treaty_list_iterate_end   LIST_ITERATE_END

Definition at line 31 of file diplhand.h.

Function Documentation

◆ cancel_all_meetings()

void cancel_all_meetings ( struct player pplayer)

Cancels all meetings of player.

Definition at line 897 of file diplhand.cpp.

Referenced by kill_player(), player_set_to_ai_mode(), and player_set_under_human_control().

◆ diplhand_free()

void diplhand_free ( )

Free all the resources allocated by diplhand.

Definition at line 78 of file diplhand.cpp.

Referenced by server_quit().

◆ diplhand_init()

void diplhand_init ( )

Initialize diplhand module.

Definition at line 73 of file diplhand.cpp.

◆ establish_embassy()

void establish_embassy ( struct player pplayer,
struct player aplayer 
)

Create an embassy.

pplayer gets an embassy with aplayer.

Definition at line 689 of file diplhand.cpp.

Referenced by diplomat_embassy(), handle_diplomacy_accept_treaty_req(), and split_player().

◆ find_treaty()

◆ free_treaties()

void free_treaties ( )

Free all the treaties currently in treaty list.

Definition at line 89 of file diplhand.cpp.

Referenced by diplhand_free(), and server_game_free().

◆ get_all_treaties()

struct treaty_list* get_all_treaties ( )

Get treaty list.

Definition at line 933 of file diplhand.cpp.

Referenced by sg_load_treaties(), and sg_save_treaties().

◆ reject_all_treaties()

void reject_all_treaties ( struct player pplayer)

Reject all treaties currently being negotiated.

Definition at line 911 of file diplhand.cpp.

Referenced by handle_diplomacy_cancel_pact_explicit().

◆ send_diplomatic_meetings()

void send_diplomatic_meetings ( struct connection dest)

Send information on any on-going diplomatic meetings for connection's player.

For re-connections.

Definition at line 859 of file diplhand.cpp.

Referenced by begin_phase(), and connection_attach_real().

Variable Documentation

◆ TURNS_EXTEND_CEASEFIRE

const int TURNS_EXTEND_CEASEFIRE = 1

Definition at line 27 of file diplhand.h.

Referenced by update_diplomatics().

◆ TURNS_LEFT

const int TURNS_LEFT = 16

Definition at line 26 of file diplhand.h.

Referenced by handle_diplomacy_accept_treaty_req(), and make_contact().