97 const struct player *pplayer)
108 if (
is_ai(pplayer)) {
121 const struct player *pplayer)
153 {
"" ,
Q_(
"?nation:Hostile"),
155 Q_(
"?nation:Peaceful"),
Q_(
"?nation:Friendly"),
156 Q_(
"?nation:Mysterious"),
Q_(
"?nation:Friendly(team)")};
158 {
"" ,
Q_(
"?city:Hostile"),
160 Q_(
"?city:Peaceful"),
Q_(
"?city:Friendly"),
Q_(
"?city:Mysterious"),
161 Q_(
"?city:Friendly(team)")};
212 int turns =
ds->turns_left;
217 PL_(
"Territory of %s (%s) (%d turn cease-fire)",
218 "Territory of %s (%s) (%d turn cease-fire)",
220 username, nation, turns);
222 int turns =
ds->turns_left;
227 PL_(
"Territory of %s (%s) (%d turn armistice)",
228 "Territory of %s (%s) (%d turn armistice)",
230 username, nation, turns);
262 int turns =
ds->turns_left;
267 "City: %s | %s (%s, %d turn cease-fire)",
271 int turns =
ds->turns_left;
276 "City: %s | %s (%s, %d turn armistice)",
293 " | Occupied with %d units.", count), count);
348 if (
punit && !pcity) {
383 int turns =
ds->turns_left;
388 "Unit: %s | %s (%s, %d turn cease-fire)",
391 username, nation, turns);
393 int turns =
ds->turns_left;
398 "Unit: %s | %s (%s, %d turn armistice)",
401 username, nation, turns);
435#define FAR_CITY_SQUARE_DIST (2*(6*6))
492 const char *veteran_name =
499 if (pplayer ==
owner) {
513 if (nationality !=
NULL &&
owner != nationality) {
552 int cur = 0, max = 0;
626 best =
MAX(best,
this);
668 theirs -= pplayer->client.tech_upkeep;
758 return _(
"Progress: no research");
768 "Progress: %d turns/advance",
774 "Progress: %d turns/advance loss",
790 PL_(
", %d bulb/turn from team",
803 astr_add(&
str,
_(
" (needed for technology upkeep: %d)"), upkeep);
846 "%d/%d (%d turns to loss)", turns),
890 PL_(
"%d step",
"%d steps", steps), steps);
896 PL_(
"%d turn",
"%d turns", turns), turns);
1105 }
else if (min == max) {
1110 }
else if (count == 1) {
1116 }
else if (count > 1) {
1118 "%d units selected",
1153 if (nationality !=
NULL &&
owner != nationality) {
1163 }
else if (count > 1) {
1178 top[0] = top[1] = top[2] =
NULL;
1198 for (
i = 0;
i < 2;
i++) {
1221 }
else if (
mil > 0) {
1258 struct unit_list *
punits)
1296 "Treasury contains %d gold.",
1324 struct unit_list *
punits)
1355 "Disband %d units?", count), count);
1374 "researching the current technology."));
1517 (
int) (
pship->support_rate * 100.0));
1521 (
int) (
pship->energy_rate * 100.0));
1528 if (
pship->propulsion > 0) {
1531 (
float) (0.1 * ((
int) (
pship->travel_time * 10.0))));
1539 (
int) (
pship->success_rate * 100.0));
1545 (
int)
pship->travel_time))
1628 if (!
pconn->observer
1631 if (
pconn->ping_time >= 0) {
1681 if (pplayer !=
NULL) {
1739 _(
"%d one time bonus + %d trade"),
1915 PL_(
"Cities: %d total, but no penalty for empire size.",
1916 "Cities: %d total, but no penalty for empire size.",
1921 PL_(
"%d content per city.",
1922 "%d content per city.", content),
1961 PL_(
"Cities: %d total:",
1962 "Cities: %d total:",
cities),
1968 PL_(
" %d over nearest threshold of %d city.",
1969 " %d over nearest threshold of %d cities.", last),
1973 PL_(
"%d content before penalty.",
1974 "%d content before penalty.", content),
1977 PL_(
"%d additional unhappy citizen.",
1978 "%d additional unhappy citizens.", unhappy),
1982 PL_(
"%d angry citizen.",
1983 "%d angry citizens.", angry),
1990 PL_(
" not more than %d, so no empire size penalty.",
1991 " not more than %d, so no empire size penalty.", next),
1995 PL_(
"%d content per city.",
1996 "%d content per city.", content),
2001 PL_(
"With %d more city, another citizen will become "
2003 "With %d more cities, another citizen will become "
2007 }
else if (next >=
cities) {
2012 PL_(
"With %d more city, another citizen will become "
2014 "With %d more cities, another citizen will become "
2022 _(
"More cities will not cause more unhappy citizens."));
2048 "Up to %d military units may impose martial "
2052 "unhappy citizen content.",
2053 "Each military unit makes %d "
2054 "unhappy citizens content.",
2058 _(
"Military units in the field may cause unhappiness. "));
2061 _(
"Military units have no happiness effect. "));
2079 _(
"Luxury: %d total."),
2128 static char buf[1024];
const char * action_prob_explain(const struct act_prob prob)
bool action_prob_possible(const struct act_prob probability)
enum action_target_kind action_get_target_kind(const struct action *paction)
#define action_has_result(_act_, _res_)
void astr_free(struct astring *astr)
void astr_set(struct astring *astr, const char *format,...)
const char * astr_build_and_list(struct astring *astr, const char *const *items, size_t number)
void astr_add_line(struct astring *astr, const char *format,...)
void astr_clear(struct astring *astr)
void astr_add(struct astring *astr, const char *format,...)
void astr_break_lines(struct astring *astr, size_t desired_len)
static const char * astr_str(const struct astring *astr) fc__attribute((nonnull(1)))
const char * calendar_text(void)
const char * textyear(int year)
#define citizens_foreign_iterate_end
#define citizens_foreign_iterate(_pcity, _pslot, _nationality)
int city_production_build_shield_cost(const struct city *pcity)
bool city_has_building(const struct city *pcity, const struct impr_type *pimprove)
const char * city_name_get(const struct city *pcity)
int city_airlift_max(const struct city *pcity)
struct output_type * get_output_type(Output_type_id output)
bool city_is_occupied(const struct city *pcity)
int city_tile_output(const struct city *pcity, const struct tile *ptile, bool is_celebrating, Output_type_id otype)
#define city_list_iterate(citylist, pcity)
#define city_owner(_pcity_)
#define city_list_iterate_end
bool client_is_global_observer(void)
int get_seconds_to_new_turn(void)
int get_seconds_to_turndone(void)
bool is_waiting_turn_change(void)
bool client_has_player(void)
void combat_odds_to_astr(struct astring *str, struct unit_list *punits, const struct tile *ptile, const struct unit *punit, const char *pct_str)
const char * concat_tile_activity_text(struct tile *ptile)
enum known_type client_tile_get_known(const struct tile *ptile)
void nuclear_winter_scaled(int *chance, int *rate, int max)
void global_warming_scaled(int *chance, int *rate, int max)
struct city * get_nearest_city(const struct unit *punit, int *sq_dist)
static struct fc_sockaddr_list * list
#define conn_list_iterate(connlist, pconn)
#define conn_list_iterate_end
struct unit_list * get_units_in_focus(void)
enum cursor_hover_state hover_state
struct unit * find_visible_unit(struct tile *ptile)
int city_history_gain(const struct city *pcity)
int nation_history_gain(const struct player *pplayer)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
struct unit struct city * target_city
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int cost
struct effect_list * effects[EFT_COUNT]
int get_player_output_bonus(const struct player *pplayer, const struct output_type *poutput, enum effect_type effect_type)
int get_city_bonus(const struct city *pcity, enum effect_type effect_type)
int get_city_bonus_effects(struct effect_list *plist, const struct city *pcity, const struct output_type *poutput, enum effect_type effect_type)
int get_player_bonus(const struct player *pplayer, enum effect_type effect_type)
void get_effect_list_req_text(const struct effect_list *plist, struct astring *astr)
#define PL_(String1, String2, n)
const char * population_to_text(int thousand_citizen)
int current_turn_timeout(void)
int civ_population(const struct player *pplayer)
struct city * game_city_by_number(int id)
bool goto_get_turns(int *min, int *max)
const char * ruler_title_for_player(const struct player *pplayer, char *buf, size_t buf_len)
const char * government_name_for_player(const struct player *pplayer)
bool is_improvement_visible(const struct impr_type *pimprove)
const char * improvement_name_translation(const struct impr_type *pimprove)
Impr_type_id improvement_count(void)
#define improvement_iterate_end
#define improvement_iterate(_p)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
int map_signed_latitude(const struct tile *ptile)
#define index_to_native_pos(pnat_x, pnat_y, mindex)
#define index_to_map_pos(pmap_x, pmap_y, mindex)
const char * nation_adjective_for_player(const struct player *pplayer)
struct city_list * cities
struct player * player_by_number(const int player_id)
int player_get_expected_income(const struct player *pplayer)
const char * player_name(const struct player *pplayer)
bool pplayers_at_war(const struct player *pplayer, const struct player *pplayer2)
struct city * player_city_by_number(const struct player *pplayer, int city_id)
struct player_diplstate * player_diplstate_get(const struct player *plr1, const struct player *plr2)
bool pplayers_allied(const struct player *pplayer, const struct player *pplayer2)
bool can_player_see_units_in_city(const struct player *pplayer, const struct city *pcity)
struct player * player_slot_get_player(const struct player_slot *pslot)
int research_goal_unknown_techs(const struct research *presearch, Tech_type_id goal)
bool research_goal_tech_req(const struct research *presearch, Tech_type_id goal, Tech_type_id tech)
int research_goal_bulbs_required(const struct research *presearch, Tech_type_id goal)
const char * research_advance_name_translation(const struct research *presearch, Tech_type_id tech)
struct research * research_get(const struct player *pplayer)
#define research_players_iterate(_presearch, _pplayer)
#define research_players_iterate_end
#define CLIP(lower, current, upper)
#define strvec_iterate(psv, str)
#define strvec_iterate_end
struct packet_game_info info
struct packet_timeout_info tinfo
enum borders_mode borders
enum tech_upkeep_style tech_upkeep_style
enum airlifting_style airlifting_style
enum phase_mode_type phase_mode
bool airlift_from_always_enabled
bool airlift_to_always_enabled
float last_turn_change_time
struct city_list * cities
char username[MAX_LEN_NAME]
struct conn_list * connections
struct player::@70::@73 client
struct player_economic economic
struct player_score score
struct nation_type * nation
struct research::@76::@78 client
struct goods_type * carrying
int fc_snprintf(char *str, size_t n, const char *format,...)
size_t fc_strlcpy(char *dest, const char *src, size_t n)
int cat_snprintf(char *str, size_t n, const char *format,...)
struct team * team_by_number(const int team_id)
const char * team_name_translation(const struct team *pteam)
const char * get_infrastructure_text(bv_extras extras)
const char * get_government_tooltip(void)
const char * text_happiness_cities(const struct city *pcity)
static const char * format_duration(int duration)
static void get_full_username(char *buf, int buflen, const struct player *pplayer)
const char * text_happiness_nationality(const struct city *pcity)
#define FAR_CITY_SQUARE_DIST
const char * score_tooltip(const struct player *pplayer, int score)
const char * text_happiness_wonders(const struct city *pcity)
bool get_units_upgrade_info(char *buf, size_t bufsz, struct unit_list *punits)
bool get_units_disband_info(char *buf, size_t bufsz, struct unit_list *punits)
static int turns_to_research_done(const struct research *presearch, int per_turn)
const char * get_airlift_text(const struct unit_list *punits, const struct city *pdest)
const char * get_info_label_text_popup(void)
const char * text_happiness_units(const struct city *pcity)
const char * text_happiness_luxuries(const struct city *pcity)
const char * science_dialog_text(void)
static int get_bulbs_per_turn(int *pours, bool *pteam, int *ptheirs)
const char * text_happiness_buildings(const struct city *pcity)
const char * get_ping_time_text(const struct player *pplayer)
const char * get_report_title(const char *report_name)
static int turns_to_tech_loss(const struct research *presearch, int per_turn)
const char * get_nuclear_winter_tooltip(void)
const char * get_score_text(const struct player *pplayer)
const char * get_science_target_text(double *percent)
const char * get_bulb_tooltip(void)
const char * get_timeout_label_text(void)
const char * get_nearest_city_text(struct city *pcity, int sq_dist)
const char * get_act_sel_action_custom_text(struct action *paction, const struct act_prob prob, const struct unit *actor_unit, const struct city *target_city)
const char * popup_info_text(struct tile *ptile)
const char * unit_description(struct unit *punit)
static void get_full_nation(char *buf, int buflen, const struct player *pplayer)
const char * get_global_warming_tooltip(void)
const char * get_tile_output_text(const struct tile *ptile)
const char * get_info_label_text(bool moreinfo)
const char * production_help(const struct universal *uni, char *buf, size_t bufsize)
static int turns_per_advance(const struct research *presearch, int per_turn)
const char * get_science_goal_text(Tech_type_id goal)
const char * get_unit_info_label_text2(struct unit_list *punits, int linebreaks)
const char * get_unit_info_label_text1(struct unit_list *punits)
const char * get_spaceship_descr(struct player_spaceship *pship)
const char * act_sel_action_tool_tip(const struct action *paction, const struct act_prob prob)
bool tile_has_visible_extra(const struct tile *ptile, const struct extra_type *pextra)
const char * tile_get_info_text(const struct tile *ptile, bool include_nuisances, int linebreaks)
struct city * tile_city(const struct tile *ptile)
#define tile_continent(_tile)
#define tile_owner(_tile)
bool can_cities_trade(const struct city *pc1, const struct city *pc2)
int trade_base_between_cities(const struct city *pc1, const struct city *pc2)
bool can_establish_trade_route(const struct city *pc1, const struct city *pc2)
int get_caravan_enter_city_trade_bonus(const struct city *pc1, const struct city *pc2, const struct unit_type *ut, struct goods_type *pgood, const bool establish_trade)
const struct unit_type * utype
const struct impr_type * building
enum unit_upgrade_result unit_upgrade_info(const struct civ_map *nmap, const struct unit *punit, char *buf, size_t bufsz)
struct player * unit_nationality(const struct unit *punit)
enum unit_airlift_result test_unit_can_airlift_to(const struct civ_map *nmap, const struct player *restriction, const struct unit *punit, const struct city *pdest_city)
int unit_bribe_cost(struct unit *punit, struct player *briber)
void unit_upkeep_astr(const struct unit *punit, struct astring *astr)
bool unit_can_do_action(const struct unit *punit, const action_id act_id)
void unit_activity_astr(const struct unit *punit, struct astring *astr)
enum unit_upgrade_result unit_upgrade_test(const struct civ_map *nmap, const struct unit *punit, bool is_free)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
const char * utype_veteran_name_translation(const struct unit_type *punittype, int level)
const struct unit_type * unit_type_get(const struct unit *punit)
const char * unit_name_translation(const struct unit *punit)
const struct unit_type * can_upgrade_unittype(const struct player *pplayer, const struct unit_type *punittype)
bool unit_has_type_flag(const struct unit *punit, enum unit_type_flag_id flag)
Unit_type_id utype_index(const struct unit_type *punittype)
const char * utype_name_translation(const struct unit_type *punittype)
bool utype_can_do_action(const struct unit_type *putype, const action_id act_id)
int unit_upgrade_price(const struct player *pplayer, const struct unit_type *from, const struct unit_type *to)
static bool utype_has_flag(const struct unit_type *punittype, int flag)
#define unit_type_iterate(_p)
#define unit_type_iterate_end