35#ifdef FREECIV_ENABLE_NLS
65 tslot->defined_name =
nullptr;
66 tslot->rule_name =
nullptr;
67#ifdef FREECIV_ENABLE_NLS
68 tslot->name_translation =
nullptr;
88 if (
tslot->team !=
nullptr) {
91 if (
tslot->defined_name !=
nullptr) {
94 if (
tslot->rule_name !=
nullptr) {
97#ifdef FREECIV_ENABLE_NLS
98 if (
tslot->name_translation !=
nullptr) {
167 return tslot->team !=
nullptr;
209#ifdef FREECIV_ENABLE_NLS
216#ifdef FREECIV_ENABLE_NLS
221 log_verbose(
"No name defined for team %d! Creating a default name: %s.",
233 if (
tslot->rule_name ==
nullptr) {
241 return tslot->rule_name;
250#ifdef FREECIV_ENABLE_NLS
253 if (
tslot->name_translation ==
nullptr) {
261 return tslot->name_translation;
275 return tslot->defined_name;
282 const char *team_name)
286 if (
tslot->defined_name !=
nullptr) {
291 if (
tslot->rule_name !=
nullptr) {
296#ifdef FREECIV_ENABLE_NLS
297 if (
tslot->name_translation !=
nullptr) {
314 if (
tslot ==
nullptr) {
322 if (
tslot ==
nullptr) {
325 }
else if (
tslot->team !=
nullptr) {
359 tslot->team =
nullptr;
420 if (
pteam !=
nullptr) {
421 if (
pteam->slot->defined_name !=
nullptr) {
444 return pteam->plrlist;
453 if (
pteam ==
nullptr) {
460 if (
pteam ==
nullptr) {
488 if (pplayer->
team !=
nullptr) {
491 log_debug(
"Removing player %d/%s from team %s (%d)",
501 pplayer->
team =
nullptr;
#define fc_assert_ret(condition)
#define log_verbose(message,...)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define log_debug(message,...)
#define fc_calloc(n, esz)
int player_number(const struct player *pplayer)
const char * player_name(const struct player *pplayer)
char username[MAX_LEN_NAME]
struct player_list * plrlist
int fc_snprintf(char *str, size_t n, const char *format,...)
size_t fc_strlcpy(char *dest, const char *src, size_t n)
int fc_strcasecmp(const char *str0, const char *str1)
int team_index(const struct team *pteam)
struct team * team_by_number(const int team_id)
const char * team_name_translation(const struct team *pteam)
struct team_slot * team_slot_by_number(int team_id)
void team_slots_free(void)
const char * team_rule_name(const struct team *pteam)
static void team_slot_create_default_name(struct team_slot *tslot)
struct team * team_slot_get_team(const struct team_slot *tslot)
const char * team_slot_name_translation(const struct team_slot *tslot)
static struct @82 team_slots
struct team_slot * team_slot_first(void)
const char * team_slot_defined_name(const struct team_slot *tslot)
int team_number(const struct team *pteam)
void team_destroy(struct team *pteam)
bool team_slots_initialised(void)
struct team_slot * team_slot_next(struct team_slot *tslot)
bool team_add_player(struct player *pplayer, struct team *pteam)
struct team * team_new(struct team_slot *tslot)
int team_pretty_name(const struct team *pteam, char *buf, size_t buf_len)
int team_slot_index(const struct team_slot *tslot)
struct team_slot * team_slot_by_rule_name(const char *team_name)
const struct player_list * team_members(const struct team *pteam)
void team_slots_init(void)
void team_remove_player(struct player *pplayer)
int team_slot_count(void)
bool team_slot_is_used(const struct team_slot *tslot)
void team_slot_set_defined_name(struct team_slot *tslot, const char *team_name)
const char * team_slot_rule_name(const struct team_slot *tslot)
#define team_slots_iterate_end
#define team_slots_iterate(_tslot)
#define MAX_NUM_TEAM_SLOTS