Freeciv-3.3
|
#include "fc_types.h"
Go to the source code of this file.
Macros | |
#define | MAX_NUM_TEAM_SLOTS (MAX_NUM_PLAYER_SLOTS + 1) |
#define | team_slots_iterate(_tslot) |
#define | team_slots_iterate_end |
#define | teams_iterate(_pteam) |
#define | teams_iterate_end |
#define MAX_NUM_TEAM_SLOTS (MAX_NUM_PLAYER_SLOTS + 1) |
#define teams_iterate_end |
Set a player to a team. Removes the previous team affiliation if necessary.
Definition at line 467 of file team.c.
Referenced by handle_player_info(), server_player_init(), sg_load_players_basic(), sg_load_players_basic(), and team_command().
Return struct team pointer for the given team index.
Definition at line 400 of file team.c.
Referenced by get_info_label_text(), init_new_game(), map_generate_fair_islands(), research_iter_team_valid(), research_name_translation(), research_player_iter_init(), research_pretty_name(), and research_rule_name().
Return the current number of teams.
Definition at line 375 of file team.c.
Referenced by begin_turn(), check_for_game_over(), get_info_label_text(), handle_start_phase(), init_new_game(), package_player_common(), report_top_cities(), report_wonders_of_the_world(), and report_wonders_of_the_world_long().
Destroys a team.
Definition at line 356 of file team.c.
Referenced by team_remove_player(), and team_slots_free().
Return the team index.
Definition at line 383 of file team.c.
Referenced by sg_save_player_main(), and show_teams().
Returns the member list of the team.
Definition at line 456 of file team.c.
Referenced by check_for_game_over(), create_conn_menu(), establish_embassy(), init_new_game(), kill_player(), map_generate_fair_islands(), rank_users(), research_player_iter_init(), research_pretty_name(), send_city_info(), sg_load_player_vision(), sg_load_player_vision(), show_teams(), fc_client::start_page_menu(), and team_has_embassy().
Returns the name (translated) of the team.
Definition at line 420 of file team.c.
Referenced by check_for_game_over(), col_team(), get_full_nation(), get_info_label_text(), real_conn_list_dialog_update(), research_name_translation(), show_players(), show_teams(), team_pretty_name(), and fc_client::update_start_page().
Creates a new team for the slot. If slot is NULL, it will lookup to a free slot. If the slot is already used, then just return the team.
Definition at line 317 of file team.c.
Referenced by handle_player_info(), sg_load_players_basic(), sg_load_players_basic(), team_add_player(), and team_command().
Return the team index/number/id.
Definition at line 391 of file team.c.
Referenced by conn_menu_team_chosen(), conn_menu_team_chosen(), create_conn_menu(), init_new_game(), is_player_phase(), map_generate_fair_islands(), package_player_common(), player_preferred_color(), research_get(), and team_index().
Set in 'buf' the name of the team 'pteam' in a format like "team <team_name>". To avoid to see "team Team 0", it only prints the the team number when the name of this team is not defined in the ruleset.
Definition at line 432 of file team.c.
Referenced by report_top_cities(), report_wonders_of_the_world(), report_wonders_of_the_world_long(), and research_pretty_name().
Remove the player from the team. This should only be called when deleting a player; since every player must always be on a team.
Note in some very rare cases a player may not be on a team. It's safe to call this function anyway.
Definition at line 502 of file team.c.
Referenced by connection_attach_real(), create_command_pregame(), player_clear(), and team_add_player().
Returns the name (untranslated) of the team.
Definition at line 410 of file team.c.
Referenced by init_new_game(), map_generate_fair_islands(), research_rule_name(), team_add_player(), and team_remove_player().
Return the possibly unused and uninitialized team slot.
Definition at line 175 of file team.c.
Referenced by handle_player_info(), handle_team_name_info(), load_ruleset_game(), save_game_ruleset(), sg_load_players_basic(), sg_load_players_basic(), team_by_number(), team_command(), team_slot_name_translation(), and team_slot_rule_name().
Does a linear search for a (defined) team name. Returns NULL when none match.
Definition at line 189 of file team.c.
Referenced by team_command().
Returns the total number of team slots (including used slots).
Definition at line 112 of file team.c.
Referenced by compat_load_020600(), load_ruleset_game(), researches_init(), team_slot_by_number(), team_slot_next(), and team_slots_init().
Returns the name defined in the ruleset for this slot. It may return NULL if the ruleset didn't defined a such name.
Definition at line 277 of file team.c.
Referenced by send_ruleset_team_names().
Returns the team corresponding to the slot. If the slot is not used, it will return NULL. See also team_slot_is_used().
Definition at line 150 of file team.c.
Referenced by create_conn_menu(), and team_by_number().
Returns the index of the team slots.
Definition at line 138 of file team.c.
Referenced by conn_menu_team_chosen(), conn_menu_team_chosen(), send_ruleset_team_names(), team_new(), team_number(), team_slot_create_default_name(), team_slot_name_translation(), and team_slot_rule_name().
Returns TRUE is this slot is "used" i.e. corresponds to a valid, initialized team that exists in the game.
Definition at line 162 of file team.c.
Referenced by create_conn_menu(), fc_client::start_page_menu(), and team_new().
Returns the name (translated) of the slot. Creates a default one if it doesn't exist currently.
Definition at line 253 of file team.c.
Referenced by create_conn_menu(), fc_client::start_page_menu(), team_command(), team_name_translation(), and team_pretty_name().
Returns the name (untranslated) of the slot. Creates a default one if it doesn't exist currently.
Definition at line 233 of file team.c.
Referenced by conn_menu_team_chosen(), conn_menu_team_chosen(), save_game_ruleset(), fc_client::start_page_menu(), team_rule_name(), team_slot_by_rule_name(), and team_slot_name_translation().
Set the name defined in the ruleset for this slot.
Definition at line 288 of file team.c.
Referenced by handle_team_name_info(), and load_ruleset_game().
Returns TRUE if the team slots have been initialized.
Definition at line 77 of file team.c.
Referenced by research_iter_team_next(), team_destroy(), team_new(), team_slot_by_number(), team_slot_defined_name(), team_slot_get_team(), team_slot_index(), team_slot_is_used(), team_slot_name_translation(), team_slot_rule_name(), and team_slot_set_defined_name().