Freeciv-3.3
|
Go to the source code of this file.
Data Structures | |
struct | clause_info |
struct | Clause |
struct | treaty |
Typedefs | |
typedef void(* | treaty_cb) (struct treaty *, void *data) |
#define CLAUSE_LAST CLAUSE_COUNT |
Definition at line 51 of file diptreaty.h.
#define clause_list_iterate | ( | clauselist, | |
pclause | |||
) | TYPED_LIST_ITERATE(struct Clause, clauselist, pclause) |
Definition at line 71 of file diptreaty.h.
#define clause_list_iterate_end LIST_ITERATE_END |
Definition at line 73 of file diptreaty.h.
#define is_pact_clause | ( | x | ) | ((x == CLAUSE_CEASEFIRE) || (x == CLAUSE_PEACE) || (x == CLAUSE_ALLIANCE)) |
Definition at line 53 of file diptreaty.h.
#define SPECENUM_COUNT CLAUSE_COUNT |
Definition at line 48 of file diptreaty.h.
Definition at line 25 of file diptreaty.h.
#define SPECENUM_VALUE0 CLAUSE_ADVANCE |
Definition at line 26 of file diptreaty.h.
#define SPECENUM_VALUE0NAME "Advance" |
Definition at line 27 of file diptreaty.h.
#define SPECENUM_VALUE1 CLAUSE_GOLD |
Definition at line 28 of file diptreaty.h.
#define SPECENUM_VALUE10 CLAUSE_SHARED_TILES |
Definition at line 46 of file diptreaty.h.
#define SPECENUM_VALUE10NAME "SharedTiles" |
Definition at line 47 of file diptreaty.h.
#define SPECENUM_VALUE1NAME "Gold" |
Definition at line 29 of file diptreaty.h.
#define SPECENUM_VALUE2 CLAUSE_MAP |
Definition at line 30 of file diptreaty.h.
#define SPECENUM_VALUE2NAME "Map" |
Definition at line 31 of file diptreaty.h.
#define SPECENUM_VALUE3 CLAUSE_SEAMAP |
Definition at line 32 of file diptreaty.h.
#define SPECENUM_VALUE3NAME "Seamap" |
Definition at line 33 of file diptreaty.h.
#define SPECENUM_VALUE4 CLAUSE_CITY |
Definition at line 34 of file diptreaty.h.
#define SPECENUM_VALUE4NAME "City" |
Definition at line 35 of file diptreaty.h.
#define SPECENUM_VALUE5 CLAUSE_CEASEFIRE |
Definition at line 36 of file diptreaty.h.
#define SPECENUM_VALUE5NAME "Ceasefire" |
Definition at line 37 of file diptreaty.h.
#define SPECENUM_VALUE6 CLAUSE_PEACE |
Definition at line 38 of file diptreaty.h.
#define SPECENUM_VALUE6NAME "Peace" |
Definition at line 39 of file diptreaty.h.
#define SPECENUM_VALUE7 CLAUSE_ALLIANCE |
Definition at line 40 of file diptreaty.h.
#define SPECENUM_VALUE7NAME "Alliance" |
Definition at line 41 of file diptreaty.h.
#define SPECENUM_VALUE8 CLAUSE_VISION |
Definition at line 42 of file diptreaty.h.
#define SPECENUM_VALUE8NAME "Vision" |
Definition at line 43 of file diptreaty.h.
#define SPECENUM_VALUE9 CLAUSE_EMBASSY |
Definition at line 44 of file diptreaty.h.
#define SPECENUM_VALUE9NAME "Embassy" |
Definition at line 45 of file diptreaty.h.
#define SPECLIST_TAG clause |
Definition at line 67 of file diptreaty.h.
Definition at line 67 of file diptreaty.h.
Definition at line 68 of file diptreaty.h.
Definition at line 68 of file diptreaty.h.
Definition at line 113 of file diptreaty.h.
#define treaty_list_iterate_end LIST_ITERATE_END |
Definition at line 115 of file diptreaty.h.
bool add_clause | ( | struct treaty * | ptreaty, |
struct player * | pfrom, | ||
enum clause_type | type, | ||
int | val, | ||
struct player * | client_player | ||
) |
Add clause to treaty.
Definition at line 145 of file diptreaty.c.
Referenced by client_recv_create_clause(), handle_diplomacy_create_clause_req(), sg_load_treaties(), and sg_load_treaties().
bool clause_enabled | ( | enum clause_type | type | ) |
Is clause enabled in this game? This does not consider clause requirements that may change during the game, but returned value is constant for the given clause type thought the game.
Definition at line 305 of file diptreaty.c.
Referenced by add_clause(), create_clause_menu(), create_diplomacy_dialog(), diplo_wdg::diplo_wdg(), popup_add_menu(), popup_diplomatic_objects(), and diplo_wdg::show_menu().
struct clause_info * clause_info_get | ( | enum clause_type | type | ) |
Free memory associated with clause infos.
Definition at line 292 of file diptreaty.c.
Referenced by handle_diplomacy_accept_treaty_req(), handle_ruleset_clause(), is_universal_needed(), load_ruleset_game(), save_game_ruleset(), and send_ruleset_clauses().
Free memory associated with clause infos.
Definition at line 278 of file diptreaty.c.
Referenced by game_ruleset_free().
Initialize clause info structures.
Definition at line 262 of file diptreaty.c.
Referenced by game_ruleset_init().
Free the clauses of a treaty.
Definition at line 112 of file diptreaty.c.
Referenced by free_treaties(), and treaty_remove().
Returns TRUE iff pplayer can get intelligence about aplayer.
Definition at line 84 of file diptreaty.c.
Referenced by can_intel_with_player(), is_req_knowable(), plr_widget::nation_selected(), player_info_level(), and update_intel_dialog().
Returns TRUE iff pplayer could do diplomatic meetings with aplayer.
Definition at line 64 of file diptreaty.c.
Referenced by can_meet_with_player(), dai_diplomacy_actions(), dai_diplomacy_first_contact(), dai_diplomacy_suggest(), and handle_diplomacy_init_meeting_req().
Returns TRUE iff pplayer could do diplomacy in the game at all.
Definition at line 36 of file diptreaty.c.
Referenced by could_meet_with_player(), and dai_diplomacy_actions().
Find currently active treaty between two players.
Definition at line 362 of file diptreaty.c.
Referenced by cancel_all_meetings(), clear_old_treaty(), client_init_meeting(), client_recv_accept_treaty(), client_recv_cancel_meeting(), client_recv_create_clause(), client_recv_remove_clause(), handle_diplomacy_accept_treaty_req(), handle_diplomacy_create_clause_req(), handle_diplomacy_init_meeting_req(), handle_diplomacy_remove_clause_req(), really_diplomacy_cancel_meeting(), reject_all_treaties(), plr_report::req_meeeting(), and send_diplomatic_meetings().
Free all the treaties currently in treaty list.
Definition at line 348 of file diptreaty.c.
Referenced by server_game_free(), and treaties_free().
Initialize treaty structure between two players.
Definition at line 99 of file diptreaty.c.
Referenced by client_init_meeting(), handle_diplomacy_init_meeting_req(), sg_load_treaties(), and sg_load_treaties().
bool remove_clause | ( | struct treaty * | ptreaty, |
struct player * | pfrom, | ||
enum clause_type | type, | ||
int | val | ||
) |
Remove clause from treaty
Definition at line 123 of file diptreaty.c.
Referenced by client_recv_remove_clause(), and handle_diplomacy_remove_clause_req().
Free all the resources allocated by treaties.
Definition at line 337 of file diptreaty.c.
Referenced by game_free().
Call callback for each treaty
Definition at line 396 of file diptreaty.c.
Referenced by sg_save_treaties().
Add treaty to the global list.
Definition at line 377 of file diptreaty.c.
Referenced by client_init_meeting(), handle_diplomacy_init_meeting_req(), sg_load_treaties(), and sg_load_treaties().
Remove treaty from the global list.
Definition at line 385 of file diptreaty.c.
Referenced by client_recv_cancel_meeting(), handle_diplomacy_accept_treaty_req(), and really_diplomacy_cancel_meeting().