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)")};
195 }
else if (cont < 0) {
240 if (plr !=
nullptr &&
owner == plr) {
242 }
else if (
owner !=
nullptr && plr ==
nullptr) {
245 }
else if (
owner !=
nullptr) {
249 int turns =
ds->turns_left;
254 PL_(
"Territory of %s (%s) (%d turn cease-fire)",
255 "Territory of %s (%s) (%d turn cease-fire)",
257 username, nation, turns);
259 int turns =
ds->turns_left;
264 PL_(
"Territory of %s (%s) (%d turn armistice)",
265 "Territory of %s (%s) (%d turn armistice)",
267 username, nation, turns);
282 if (
pcity !=
nullptr) {
292 if (plr ==
nullptr ||
owner == plr) {
300 int turns =
ds->turns_left;
305 "City: %s | %s (%s, %d turn cease-fire)",
309 int turns =
ds->turns_left;
314 "City: %s | %s (%s, %d turn armistice)",
332 " | Occupied with %d units.", count), count);
371 hcity)->replace_priority)) {
399 if (plr ==
nullptr ||
owner == plr) {
408 if (
hcity !=
nullptr) {
419 }
else if (
hcity !=
nullptr) {
423 }
else if (
owner !=
nullptr) {
427 int turns =
ds->turns_left;
432 "Unit: %s | %s (%s, %d turn cease-fire)",
435 username, nation, turns);
437 int turns =
ds->turns_left;
442 "Unit: %s | %s (%s, %d turn armistice)",
445 username, nation, turns);
470 if ((plr ==
nullptr ||
owner == plr)
482#define FAR_CITY_SQUARE_DIST (2*(6*6))
539 const char *veteran_name =
546 if (pplayer ==
owner) {
560 if (nationality !=
NULL &&
owner != nationality) {
599 int cur = 0, max = 0;
673 best =
MAX(best,
this);
715 theirs -= pplayer->client.tech_upkeep;
805 return _(
"Progress: no research");
815 "Progress: %d turns/advance",
821 "Progress: %d turns/advance loss",
837 PL_(
", %d bulb/turn from team",
850 astr_add(&
str,
_(
" (needed for technology upkeep: %d)"), upkeep);
893 "%d/%d (%d turns to loss)", turns),
937 PL_(
"%d step",
"%d steps", steps), steps);
943 PL_(
"%d turn",
"%d turns", turns), turns);
1152 }
else if (min == max) {
1157 }
else if (count == 1) {
1163 }
else if (count > 1) {
1165 "%d units selected",
1200 if (nationality !=
NULL &&
owner != nationality) {
1210 }
else if (count > 1) {
1225 top[0] = top[1] = top[2] =
NULL;
1245 for (
i = 0;
i < 2;
i++) {
1268 }
else if (
mil > 0) {
1305 struct unit_list *
punits)
1343 "Treasury contains %d gold.",
1371 struct unit_list *
punits)
1402 "Disband %d units?", count), count);
1421 "researching the current technology."));
1564 (
int) (
pship->support_rate * 100.0));
1568 (
int) (
pship->energy_rate * 100.0));
1575 if (
pship->propulsion > 0) {
1578 (
float) (0.1 * ((
int) (
pship->travel_time * 10.0))));
1586 (
int) (
pship->success_rate * 100.0));
1592 (
int)
pship->travel_time))
1675 if (!
pconn->observer
1678 if (
pconn->ping_time >= 0) {
1728 if (pplayer !=
NULL) {
1786 _(
"%d one time bonus + %d trade"),
1962 PL_(
"Cities: %d total, but no penalty for empire size.",
1963 "Cities: %d total, but no penalty for empire size.",
1968 PL_(
"%d content per city.",
1969 "%d content per city.", content),
2008 PL_(
"Cities: %d total:",
2009 "Cities: %d total:",
cities),
2015 PL_(
" %d over nearest threshold of %d city.",
2016 " %d over nearest threshold of %d cities.", last),
2020 PL_(
"%d content before penalty.",
2021 "%d content before penalty.", content),
2024 PL_(
"%d additional unhappy citizen.",
2025 "%d additional unhappy citizens.", unhappy),
2029 PL_(
"%d angry citizen.",
2030 "%d angry citizens.", angry),
2037 PL_(
" not more than %d, so no empire size penalty.",
2038 " not more than %d, so no empire size penalty.", next),
2042 PL_(
"%d content per city.",
2043 "%d content per city.", content),
2048 PL_(
"With %d more city, another citizen will become "
2050 "With %d more cities, another citizen will become "
2054 }
else if (next >=
cities) {
2059 PL_(
"With %d more city, another citizen will become "
2061 "With %d more cities, another citizen will become "
2069 _(
"More cities will not cause more unhappy citizens."));
2096 "Up to %d military units may impose martial "
2100 "unhappy citizen content.",
2101 "Each military unit makes %d "
2102 "unhappy citizens content.",
2106 _(
"Military units in the field may cause unhappiness. "));
2109 _(
"Military units have no happiness effect. "));
2127 _(
"Luxury: %d total."),
2176 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 struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction struct unit struct city * pcity
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)
signed short Continent_id
#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 get_continent_size(Continent_id id)
int map_signed_latitude(const struct tile *ptile)
int get_ocean_size(Continent_id id)
int get_island_surrounder(Continent_id id)
int get_lake_surrounder(Continent_id id)
#define is_whole_continent_known(cont)
#define is_whole_ocean_known(ocean)
#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_economic economic
struct player_score score
struct nation_type * nation
struct player::@73::@76 client
struct research::@79::@81 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)
struct goods_type * unit_current_goods(const struct unit *punit, const struct city *homecity)
bool can_establish_trade_route(const struct city *pc1, const struct city *pc2, int priority)
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)
int unit_bribe_cost(const struct unit *punit, const struct player *briber, const struct unit *briber_unit)
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)
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)
bool is_flagless_to_player(const struct unit *punit, const struct player *pplayer)
#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