187 if (
pclause->from == pplayer) {
194 log_error(
"Requirements of a clause between %s and %s not fulfilled",
204 log_error(
"%s tried to give embassy to %s, who already "
215 log_error(
"Treaty: %s can't have tech %s",
219 _(
"The %s can't accept %s."),
227 log_error(
"Nation %s try to give unknown tech %s to nation %s.",
232 _(
"You don't have tech %s, you can't accept treaty."),
242 _(
"City you are trying to give no longer exists, "
243 "you can't accept treaty."));
248 _(
"You are not owner of %s, you can't accept treaty."),
254 _(
"Your capital (%s) is requested, "
255 "you can't accept treaty."),
276 _(
"You cannot form an alliance because you are "
277 "at war with an ally of %s."),
281 _(
"You cannot form an alliance because %s is "
282 "at war with an ally of yours."),
292 _(
"You don't have enough gold, "
293 "you can't accept treaty."));
328 PL_(
"A treaty containing %d clause was agreed upon.",
329 "A treaty containing %d clauses was agreed upon.",
333 PL_(
"A treaty containing %d clause was agreed upon.",
334 "A treaty containing %d clauses was agreed upon.",
352 _(
"Clause requirements are no longer fulfilled. "
353 "Treaty with %s canceled!"),
356 _(
"Clause requirements are no longer fulfilled. "
357 "Treaty with %s canceled!"),
369 _(
"One of the cities the %s are giving away"
370 " is destroyed! Treaty canceled!"),
373 _(
"One of the cities the %s are giving away"
374 " is destroyed! Treaty canceled!"),
380 _(
"The %s no longer control %s! "
385 _(
"The %s no longer control %s! "
393 _(
"Your capital (%s) is requested, "
394 "you can't accept treaty."),
423 _(
"The %s don't have the promised amount "
424 "of gold! Treaty canceled!"),
427 _(
"The %s don't have the promised amount "
428 "of gold! Treaty canceled!"),
457 _(
"You gave an embassy to %s."),
460 _(
"%s allowed you to create an embassy!"),
474 "that %s want to give them.",
483 _(
"You are taught the knowledge of %s."),
492 _(
"You have acquired %s thanks to the %s "
493 "treaty with the %s."),
500 Q_(
"?fromplr:The %s have acquired %s from the %s."),
518 pdest->economic.gold += received;
520 PL_(
"You get %d gold.",
521 "You get %d gold.", received), received);
528 _(
"You receive the %s worldmap."),
537 _(
"You receive the %s seamap."),
547 log_error(
"Treaty city id %d not found - skipping clause.",
553 _(
"You receive the city of %s from %s."),
557 _(
"You give the city of %s to %s."),
576 _(
"You agree on a cease-fire with %s."),
579 _(
"You agree on a cease-fire with %s."),
601 PL_(
"You agree on an armistice with the %s. In %d turn, "
602 "it will become a peace treaty. Move your "
603 "military units out of %s territory to avoid them "
605 "You agree on an armistice with the %s. In %d turns, "
606 "it will become a peace treaty. Move any "
607 "military units out of %s territory to avoid them "
615 PL_(
"You agree on an armistice with the %s. In %d turn, "
616 "it will become a peace treaty. Move your "
617 "military units out of %s territory to avoid them "
619 "You agree on an armistice with the %s. In %d turns, "
620 "it will become a peace treaty. Move any "
621 "military units out of %s territory to avoid them "
640 _(
"You agree on an alliance with %s."),
643 _(
"You agree on an alliance with %s."),
653 _(
"You give shared vision to %s."),
656 _(
"%s gives you shared vision."),
666 _(
"You share your tiles with %s."),
669 _(
"%s shares their tiles with you."),
724 int counterpart,
int giver,
757 int counterpart,
int giver,
817 _(
"%s canceled the meeting!"),
824 _(
"Meeting with %s canceled."),
864 _(
"Your diplomatic envoy was decapitated!"));
#define CALL_PLR_AI_FUNC(_func, _player,...)
bool is_capital(const struct city *pcity)
#define city_tile(_pcity_)
#define city_owner(_pcity_)
void establish_embassy(struct player *pplayer, struct player *aplayer)
void send_diplomatic_meetings(struct connection *dest)
void handle_diplomacy_remove_clause_req(struct player *pplayer, int counterpart, int giver, enum clause_type type, int value)
void handle_diplomacy_create_clause_req(struct player *pplayer, int counterpart, int giver, enum clause_type type, int value)
static void call_treaty_accepted(struct player *pplayer, struct player *aplayer, struct Treaty *ptreaty)
void reject_all_treaties(struct player *pplayer)
enum diplstate_type valid_dst_closest(struct player_diplstate *dst)
void set_diplstate_type(struct player_diplstate *state1, struct player_diplstate *state2, enum diplstate_type type)
void handle_diplomacy_init_meeting_req(struct player *pplayer, int counterpart)
void cancel_all_meetings(struct player *pplayer)
void handle_diplomacy_cancel_meeting_req(struct player *pplayer, int counterpart)
static void call_treaty_evaluate(struct player *pplayer, struct player *aplayer, struct Treaty *ptreaty)
static enum diplstate_type dst_closest(enum diplstate_type a, enum diplstate_type b)
static void really_diplomacy_cancel_meeting(struct player *pplayer, struct player *pother)
void handle_diplomacy_accept_treaty_req(struct player *pplayer, int counterpart)
void init_treaty(struct Treaty *ptreaty, struct player *plr0, struct player *plr1)
bool add_clause(struct Treaty *ptreaty, struct player *pfrom, enum clause_type type, int val, struct player *client_player)
void treaty_add(struct Treaty *ptreaty)
bool remove_clause(struct Treaty *ptreaty, struct player *pfrom, enum clause_type type, int val)
void treaty_remove(struct Treaty *ptreaty)
struct Treaty * find_treaty(struct player *plr0, struct player *plr1)
struct clause_info * clause_info_get(enum clause_type type)
bool could_meet_with_player(const struct player *pplayer, const struct player *aplayer)
#define clause_list_iterate_end
#define clause_list_iterate(clauselist, pclause)
#define is_pact_clause(x)
int get_player_bonus(const struct player *pplayer, enum effect_type effect_type)
#define PL_(String1, String2, n)
const struct ft_color ftc_server
const char * city_link(const struct city *pcity)
struct city * game_city_by_number(int id)
#define log_verbose(message,...)
#define fc_assert(condition)
#define fc_assert_action(condition, action)
#define log_error(message,...)
void give_map_from_player_to_player(struct player *pfrom, struct player *pdest)
void give_seamap_from_player_to_player(struct player *pfrom, struct player *pdest)
void give_citymap_from_player_to_player(struct city *pcity, struct player *pfrom, struct player *pdest)
bool map_is_known_and_seen(const struct tile *ptile, const struct player *pplayer, enum vision_layer vlayer)
void give_shared_vision(struct player *pfrom, struct player *pto)
const char * nation_rule_name(const struct nation_type *pnation)
const char * nation_adjective_for_player(const struct player *pplayer)
struct nation_type * nation_of_player(const struct player *pplayer)
const char * nation_plural_for_player(const struct player *pplayer)
void notify_research(const struct research *presearch, const struct player *exclude, enum event_type event, const struct ft_color color, const char *format,...)
void notify_player(const struct player *pplayer, const struct tile *ptile, enum event_type event, const struct ft_color color, const char *format,...)
void notify_research_embassies(const struct research *presearch, const struct player *exclude, enum event_type event, const struct ft_color color, const char *format,...)
void dlsend_packet_diplomacy_init_meeting(struct conn_list *dest, int counterpart, int initiated_from)
void dlsend_packet_diplomacy_remove_clause(struct conn_list *dest, int counterpart, int giver, enum clause_type type, int value)
int dsend_packet_diplomacy_create_clause(struct connection *pc, int counterpart, int giver, enum clause_type type, int value)
int dsend_packet_diplomacy_init_meeting(struct connection *pc, int counterpart, int initiated_from)
void dlsend_packet_diplomacy_create_clause(struct conn_list *dest, int counterpart, int giver, enum clause_type type, int value)
void dlsend_packet_diplomacy_accept_treaty(struct conn_list *dest, int counterpart, bool I_accepted, bool other_accepted)
void dlsend_packet_diplomacy_cancel_meeting(struct conn_list *dest, int counterpart, int initiated_from)
int dsend_packet_diplomacy_accept_treaty(struct connection *pc, int counterpart, bool I_accepted, bool other_accepted)
struct player * player_by_number(const int player_id)
int player_number(const struct player *pplayer)
enum dipl_reason pplayer_can_make_treaty(const struct player *p1, const struct player *p2, enum diplstate_type treaty)
const char * player_name(const struct player *pplayer)
bool player_has_real_embassy(const struct player *pplayer, const struct player *pplayer2)
int player_index(const struct player *pplayer)
struct player_diplstate * player_diplstate_get(const struct player *plr1, const struct player *plr2)
#define players_iterate_end
@ DIPL_ALLIANCE_PROBLEM_THEM
@ DIPL_ALLIANCE_PROBLEM_US
#define players_iterate(_pplayer)
#define player_list_iterate(playerlist, pplayer)
static bool is_barbarian(const struct player *pplayer)
#define player_list_iterate_end
void send_player_all_c(struct player *src, struct conn_list *dest)
void update_players_after_alliance_breakup(struct player *pplayer, struct player *pplayer2, const struct unit_list *pplayer_seen_units, const struct unit_list *pplayer2_seen_units)
bool are_reqs_active(const struct req_context *context, const struct player *other_player, const struct requirement_vector *reqs, const enum req_problem_type prob_type)
struct research * research_get(const struct player *pplayer)
enum tech_state research_invention_state(const struct research *presearch, Tech_type_id tech)
bool research_invention_gettable(const struct research *presearch, const Tech_type_id tech, bool allow_holes)
int research_pretty_name(const struct research *presearch, char *buf, size_t buf_len)
void script_server_signal_emit(const char *signal_name,...)
#define BAD_HEURISTIC_INIT(_ini_val_)
struct clause_list * clauses
struct packet_game_info info
struct civ_game::@31::@35 server
struct requirement_vector receiver_reqs
struct requirement_vector giver_reqs
bool tech_trade_allow_holes
enum diplstate_type max_state
struct conn_list * connections
struct player_economic economic
const struct player * player
const struct player_list * team_members(const struct team *pteam)
struct advance * advance_by_number(const Tech_type_id atype)
const char * advance_name_translation(const struct advance *padvance)
const char * advance_rule_name(const struct advance *padvance)