50 const struct player *pplayer2)
105 static char buf[100];
109 return QStringLiteral(
"-");
112 if (pds->
type == DS_CEASEFIRE || pds->
type == DS_ARMISTICE) {
114 diplstate_type_translated_name(pds->
type),
118 return diplstate_type_translated_name(pds->
type);
134 static int diplstate_cmp_lookup[DS_LAST];
135 diplstate_cmp_lookup[DS_TEAM] = 1 << 16;
136 diplstate_cmp_lookup[DS_ALLIANCE] = 2 << 16;
137 diplstate_cmp_lookup[DS_PEACE] = 3 << 16;
138 diplstate_cmp_lookup[DS_ARMISTICE] = 4 << 16;
139 diplstate_cmp_lookup[DS_CEASEFIRE] = 5 << 16;
140 diplstate_cmp_lookup[DS_WAR] = 6 << 16;
141 diplstate_cmp_lookup[DS_NO_CONTACT] = 7 << 16;
153 ds_value = diplstate_cmp_lookup[pds->
type];
155 if (pds->
type == DS_ARMISTICE || pds->
type == DS_CEASEFIRE) {
166 const struct player *player2)
178 return QStringLiteral(
"-");
189 const struct player *player2)
209 return love1 - love2;
232 bool consider_tb =
false;
235 return QLatin1String(
"");
239 if (opt !=
nullptr) {
254 return _(
"blocking");
273 static char buf[100];
288 const struct player *player2)
312 const struct player *player2)
314 return player1->
client.culture - player2->
client.culture;
322 if (them ==
nullptr || !them->
is_alive) {
325 return QString::number(them->
client.culture);
344 const struct player *player2)
354 if (them ==
nullptr || !them->
is_alive) {
368 const struct player *player2)
378 if (them ==
nullptr || !them->
is_alive) {
392 const struct player *player2)
402 if (them ==
nullptr || !them->
is_alive) {
416 const struct player *player2)
426 if (them ==
nullptr || !them->
is_alive) {
440 if (them ==
nullptr || !them->
is_alive) {
446 return QStringLiteral(
"%1 (%2/-)")
452 return QStringLiteral(
"%1 (%2/%3)")
471 {
true,
COL_FLAG,
N_(
"Flag"),
nullptr,
nullptr,
nullptr,
"flag"},
473 {
true,
COL_COLOR,
N_(
"Border"),
nullptr,
nullptr,
nullptr,
"border"},
490 nullptr,
"government"},
bool BV_ISSET(const BV &bv, int bit)
const char * get_vision_status(const struct player *me, const struct player *them)
Return a string indicating one nation's shaed vision status with another.
const char * get_embassy_status(const struct player *me, const struct player *them)
Return a string indicating one nation's embassy status with another.
bool is_player_phase(const struct player *pplayer, int phase)
Return TRUE if it is this player's phase.
const char * government_name_for_player(const struct player *pplayer)
Return the (translated) name of the given government of a player.
const char * nation_adjective_for_player(const struct player *pplayer)
Return the (translated) adjective for the given nation of a player.
const struct option_set * server_optset
struct option * optset_option_by_name(const struct option_set *poptset, const char *name)
Returns the option corresponding of the name in this option set.
bool option_bool_get(const struct option *poption)
Returns the current value of this boolean option.
int player_number(const struct player *pplayer)
Return the player index/number/id.
const char * love_text(const int love)
Return a text describing an AI's love for you.
int player_index(const struct player *pplayer)
Return the player index.
const char * player_name(const struct player *pplayer)
Return the leader name of the player.
struct player_diplstate * player_diplstate_get(const struct player *plr1, const struct player *plr2)
Returns diplomatic state type between two players.
struct research * research_get(const struct player *pplayer)
Returns the research structure associated with the player.
QString research_advance_name_translation(const struct research *presearch, Tech_type_id tech)
Store the translated name of the given tech (including A_FUTURE) in 'buf'.
struct packet_game_info info
The base class for options.
int love[MAX_NUM_PLAYER_SLOTS]
struct player_ai ai_common
struct player::@65::@68 client
char username[MAX_LEN_NAME]
struct player_economic economic
struct player_score score
struct research::@71::@73 client
int fc_snprintf(char *str, size_t n, const char *format,...)
See also fc_utf8_snprintf_trunc(), fc_utf8_snprintf_rep().
int fc_stricoll(const char *str0, const char *str1)
Wrapper function for stricoll().
const char * team_name_translation(const struct team *pteam)
Returns the name (translated) of the team.
QString get_score_text(const struct player *pplayer)
Return text giving the score of the player.
static QString col_team(const struct player *player)
The name of the player's team (or empty) for the plrdlg.
static int cmp_name(const struct player *pplayer1, const struct player *pplayer2)
Compares the names of two players in players dialog.
QString col_tax(const struct player *them)
Show player's tax to me if I am allowed to know it.
static bool col_ai(const struct player *plr)
TRUE if the player is AI-controlled.
static int cmp_culture(const struct player *player1, const struct player *player2)
Compare culture of two players in players dialog, needed to sort column.
static int cmp_diplstate(const struct player *player1, const struct player *player2)
Compares diplomatic status of two players in players dialog.
QString plrdlg_col_state(const struct player *plr)
Returns a translated string giving the player's "state".
static int cmp_score(const struct player *player1, const struct player *player2)
Compare scores of two players in players dialog.
static int cmp_tax(const struct player *player1, const struct player *player2)
Compare tax of two players in players dialog, needed to sort column.
static QString col_username(const struct player *player)
The username (connection name) column of the plrdlg.
static QString col_vision(const struct player *player)
Returns a translated string giving our shared-vision status.
static QString col_love(const struct player *player)
Return a string displaying the AI's love (or not) for you...
QString col_research(const struct player *them)
Show player's research to me if I am allowed to know it.
QString col_culture(const struct player *pplayer)
Player's culture value.
static QString col_embassy(const struct player *player)
Returns a translated string giving the embassy status (none/with us/with them/both).
QString col_gold(const struct player *them)
Show player's gold to me if I am allowed to know it.
static int diplstate_value(const struct player *plr)
Return a numerical value suitable for ordering players by their diplomatic status in the players dial...
static int cmp_luxury(const struct player *player1, const struct player *player2)
Compare luxury of two players in players dialog, needed to sort column.
struct player_dlg_column player_dlg_columns[]
...
static int cmp_gold(const struct player *player1, const struct player *player2)
Compare gold of two players in players dialog, needed to sort column.
static int cmp_science(const struct player *player1, const struct player *player2)
Compare science of two players in players dialog, needed to sort column.
QString col_science(const struct player *them)
Show player's science to me if I am allowed to know it.
void init_player_dlg_common()
Translate all titles.
static QString col_diplstate(const struct player *player)
Returns a translated string giving the diplomatic status ("war" or "ceasefire (5)").
static QString col_idle(const struct player *plr)
Returns a string telling how many turns the player has been idle.
QString col_luxury(const struct player *them)
Show player's luxury to me if I am allowed to know it.
QString col_government(const struct player *them)
The name of the player's government.
QString get_culture_info(const struct player *them)
Show others player's culture to me if I am allowed to know it.
static QString col_name(const struct player *player)
The player-name (aka nation leader) column of the plrdlg.
static QString col_nation(const struct player *player)
The name of the player's nation for the plrdlg.
static int cmp_love(const struct player *player1, const struct player *player2)
Compares ai's attitude toward the player.
const int num_player_dlg_columns