Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/packhand.c File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Macros | Functions | Variables
packhand.c File Reference
`#include <string.h>`
`#include "bitvector.h"`
`#include "capability.h"`
`#include "fcintl.h"`
`#include "log.h"`
`#include "mem.h"`
`#include "rand.h"`
`#include "string_vector.h"`
`#include "support.h"`
`#include "achievements.h"`
`#include "actions.h"`
`#include "capstr.h"`
`#include "citizens.h"`
`#include "events.h"`
`#include "extras.h"`
`#include "game.h"`
`#include "government.h"`
`#include "idex.h"`
`#include "map.h"`
`#include "name_translation.h"`
`#include "movement.h"`
`#include "multipliers.h"`
`#include "nation.h"`
`#include "packets.h"`
`#include "player.h"`
`#include "research.h"`
`#include "rgbcolor.h"`
`#include "road.h"`
`#include "spaceship.h"`
`#include "specialist.h"`
`#include "style.h"`
`#include "traderoutes.h"`
`#include "unit.h"`
`#include "unitlist.h"`
`#include "worklist.h"`
`#include "chatline_g.h"`
`#include "citydlg_g.h"`
`#include "cityrep_g.h"`
`#include "connectdlg_g.h"`
`#include "dialogs_g.h"`
`#include "editgui_g.h"`
`#include "gui_main_g.h"`
`#include "inteldlg_g.h"`
`#include "mapctrl_g.h"`
`#include "mapview_g.h"`
`#include "menu_g.h"`
`#include "messagewin_g.h"`
`#include "pages_g.h"`
`#include "plrdlg_g.h"`
`#include "ratesdlg_g.h"`
`#include "repodlgs_g.h"`
`#include "spaceshipdlg_g.h"`
`#include "voteinfo_bar_g.h"`
`#include "wldlg_g.h"`
`#include "agents.h"`
`#include "attribute.h"`
`#include "audio.h"`
`#include "client_main.h"`
`#include "climap.h"`
`#include "climisc.h"`
`#include "connectdlg_common.h"`
`#include "control.h"`
`#include "editor.h"`
`#include "goto.h"`
`#include "helpdata.h"`
`#include "mapview_common.h"`
`#include "music.h"`
`#include "options.h"`
`#include "overview_common.h"`
`#include "tilespec.h"`
`#include "update_queue.h"`
`#include "voteinfo.h"`
`#include "script_client.h"`
`#include "packhand.h"`

Go to the source code of this file.

## Macros

#define | REQEST_BACKGROUND_REFRESH (1)
#define | REQEST_BACKGROUND_FAST_AUTO_ATTACK (2)
#define | VALIDATE(_count, _maximum, _string)
#define | VALIDATE(_count, _maximum, _string)

## Functions

static void | city_packet_common (struct city *pcity, struct tile *pcenter, struct player *powner, struct tile_list *worked_tiles, bool is_new, bool popup, bool investigate)
static bool | handle_unit_packet_common (struct unit *packet_unit)
void | packhand_free (void)
static void | packhand_init (void)
static struct unit * | unpackage_unit (const struct packet_unit_info *packet)
static struct unit * | unpackage_short_unit (const struct packet_unit_short_info *packet)
void | handle_server_join_reply (bool you_can_join, const char *message, const char *capability, const char *challenge_file, int conn_id)
void | handle_city_remove (int city_id16, int city_id32)
void | handle_unit_remove (int unit_id16, int unit_id32)
void | handle_nuke_tile_info (int tile)
void | handle_team_name_info (int team_id, const char *team_name)
void | handle_unit_combat_info (const struct packet_unit_combat_info *packet)
static bool | update_improvement_from_packet (struct city *pcity, struct impr_type *pimprove, bool have_impr)
void | handle_city_info (const struct packet_city_info *packet)
void | handle_web_city_info_addition (int id16, int id32, int granary_size, int granary_turns)
void | handle_city_nationalities (const struct packet_city_nationalities *packet)
void | handle_city_rally_point (const struct packet_city_rally_point *packet)
void | handle_trade_route_info (const struct packet_trade_route_info *packet)
void | handle_city_short_info (const struct packet_city_short_info *packet)
void | handle_worker_task (const struct packet_worker_task *packet)
void | handle_new_year (int year, int fragments, int turn)
void | handle_end_phase (void)
void | handle_start_phase (int phase)
void | handle_begin_turn (void)
void | handle_end_turn (void)
void | play_sound_for_event (enum event_type type)
void | handle_chat_msg (const struct packet_chat_msg *packet)
void | handle_early_chat_msg (const struct packet_early_chat_msg *packet)
void | handle_connect_msg (const char *message)
void | handle_server_info (const char *version_label, int major_version, int minor_version, int patch_version, int emerg_version)
void | handle_page_msg (const char *caption, const char *headline, enum event_type event, int len, int parts)
void | handle_page_msg_part (const char *lines)
void | handle_unit_info (const struct packet_unit_info *packet)
static void | action_decision_handle (struct unit *punit)
void | handle_investigate_started (int unit_id16, int unit_id32, int city_id16, int city_id32)
void | handle_investigate_finished (int unit_id16, int unit_id32, int city_id16, int city_id32)
void | handle_unit_short_info (const struct packet_unit_short_info *packet)
void | handle_set_topology (int topology_id)
void | handle_map_info (int xsize, int ysize, int topology_id)
void | handle_game_info (const struct packet_game_info *pinfo)
void | handle_calendar_info (const struct packet_calendar_info *pcalendar)
void | handle_timeout_info (float seconds_to_phasedone, float last_turn_change_time)
void | set_government_choice (struct government *government)
void | start_revolution (void)
void | handle_player_remove (int playerno)
void | handle_player_info (const struct packet_player_info *pinfo)
void | handle_web_player_info_addition (int playerno, int expected_income)
void | handle_research_info (const struct packet_research_info *packet)
void | handle_unknown_research (int id)
void | handle_player_diplstate (const struct packet_player_diplstate *packet)
void | handle_conn_info (const struct packet_conn_info *pinfo)
void | handle_conn_ping_info (int connections, const int *conn_id, const float *ping_time)
void | handle_achievement_info (int id, bool gained, bool first)
static bool | spaceship_autoplace (struct player *pplayer, struct player_spaceship *ship)
void | handle_spaceship_info (const struct packet_spaceship_info *p)
void | handle_tile_info (const struct packet_tile_info *packet)
void | handle_scenario_info (const struct packet_scenario_info *packet)
void | handle_scenario_description (const char *description)
void | handle_ruleset_control (const struct packet_ruleset_control *packet)
void | handle_ruleset_summary (const struct packet_ruleset_summary *packet)
void | handle_ruleset_description_part (const struct packet_ruleset_description_part *packet)
void | handle_rulesets_ready (void)
void | handle_ruleset_unit_class (const struct packet_ruleset_unit_class *p)
void | handle_ruleset_unit (const struct packet_ruleset_unit *p)
void | handle_web_ruleset_unit_addition (int id, bv_actions utype_actions)
void | handle_ruleset_unit_bonus (const struct packet_ruleset_unit_bonus *p)
void | handle_ruleset_unit_flag (const struct packet_ruleset_unit_flag *p)
void | handle_ruleset_unit_class_flag (const struct packet_ruleset_unit_class_flag *p)
static int | unpack_tech_req (const enum tech_req r_num, const int reqs_size, const struct requirement *reqs, struct advance *a, int i)
void | handle_ruleset_tech (const struct packet_ruleset_tech *p)
void | handle_ruleset_tech_class (const struct packet_ruleset_tech_class *p)
void | handle_ruleset_tech_flag (const struct packet_ruleset_tech_flag *p)
void | handle_ruleset_building (const struct packet_ruleset_building *p)
void | handle_ruleset_multiplier (const struct packet_ruleset_multiplier *p)
void | handle_ruleset_government (const struct packet_ruleset_government *p)
void | handle_ruleset_government_ruler_title (const struct packet_ruleset_government_ruler_title *packet)
void | handle_ruleset_terrain (const struct packet_ruleset_terrain *p)
void | handle_ruleset_terrain_flag (const struct packet_ruleset_terrain_flag *p)
void | handle_ruleset_resource (const struct packet_ruleset_resource *p)
void | handle_ruleset_extra (const struct packet_ruleset_extra *p)
void | handle_ruleset_extra_flag (const struct packet_ruleset_extra_flag *p)
void | handle_ruleset_base (const struct packet_ruleset_base *p)
void | handle_ruleset_road (const struct packet_ruleset_road *p)
void | handle_ruleset_goods (const struct packet_ruleset_goods *p)
void | handle_ruleset_action (const struct packet_ruleset_action *p)
void | handle_ruleset_action_enabler (const struct packet_ruleset_action_enabler *p)
void | handle_ruleset_action_auto (const struct packet_ruleset_action_auto *p)
void | handle_ruleset_disaster (const struct packet_ruleset_disaster *p)
void | handle_ruleset_achievement (const struct packet_ruleset_achievement *p)
void | handle_ruleset_trade (const struct packet_ruleset_trade *p)
void | handle_ruleset_terrain_control (const struct packet_ruleset_terrain_control *p)
void | handle_ruleset_nation_sets (const struct packet_ruleset_nation_sets *packet)
void | handle_ruleset_nation_groups (const struct packet_ruleset_nation_groups *packet)
void | handle_ruleset_nation (const struct packet_ruleset_nation *packet)
void | handle_nation_availability (int ncount, const bool *is_pickable, bool nationset_change)
void | handle_ruleset_style (const struct packet_ruleset_style *p)
void | handle_ruleset_clause (const struct packet_ruleset_clause *p)
void | handle_ruleset_city (const struct packet_ruleset_city *packet)
void | handle_ruleset_music (const struct packet_ruleset_music *packet)
void | handle_ruleset_game (const struct packet_ruleset_game *packet)
void | handle_ruleset_specialist (const struct packet_ruleset_specialist *p)
void | handle_city_name_suggestion_info (int unit_id16, int unit_id32, const char *name)
void | handle_unit_action_answer (const struct packet_unit_action_answer *packet)
static action_id | auto_attack_act (const struct act_prob *act_probs)
static void | action_decision_maybe_auto (struct unit *actor_unit, const struct act_prob *act_probs, struct unit *target_unit, struct city *target_city, struct tile *target_tile)
void | handle_unit_actions (const struct packet_unit_actions *packet)
void | handle_city_sabotage_list (const struct packet_city_sabotage_list *packet)
void | handle_endgame_report (const struct packet_endgame_report *packet)
void | handle_endgame_player (const struct packet_endgame_player *packet)
void | handle_player_attribute_chunk (const struct packet_player_attribute_chunk *packet)
void | handle_processing_started (void)
void | handle_processing_finished (void)
void | notify_about_incoming_packet (struct connection *pc, int packet_type, int size)
void | notify_about_outgoing_packet (struct connection *pc, int packet_type, int size, int request_id)
void | handle_freeze_client (void)
void | handle_thaw_client (void)
void | handle_conn_ping (void)
void | handle_server_shutdown (void)
void | handle_ruleset_effect (const struct packet_ruleset_effect *packet)
void | handle_edit_object_created (int tag, int id)
void | handle_edit_startpos (const struct packet_edit_startpos *packet)
void | handle_edit_startpos_full (const struct packet_edit_startpos_full *packet)
void | handle_vote_remove (int vote_no)
void | handle_vote_update (int vote_no, int yes, int no, int abstain, int num_voters)
void | handle_vote_new (const struct packet_vote_new *packet)
void | handle_vote_resolve (int vote_no, bool passed)
void | handle_play_music (const char *tag)

## Variables

struct { |
struct city_list * cities |
struct player * placeholder |
} | invisible |
struct { |
int len |
enum event_type event |
char * caption |
char * headline |
char * lines |
int parts |
} | page_msg_report = { .parts = 0 } |
const char | forced_tileset_name []
static int | last_turn = 0
const action_id | auto_attack_actions []
const action_id | auto_attack_blockers []

## Macro Definition Documentation

## ◆ REQEST_BACKGROUND_FAST_AUTO_ATTACK

#define REQEST_BACKGROUND_FAST_AUTO_ATTACK (2)

Definition at line 140 of file packhand.c.

## ◆ REQEST_BACKGROUND_REFRESH

#define REQEST_BACKGROUND_REFRESH (1)

Definition at line 138 of file packhand.c.

## ◆ VALIDATE [1/2]

#define VALIDATE | ( |  | _count,
|  |  | _maximum,
|  |  | _string
| ) |  |

Value:
if (game.info._count > _maximum) { \
log_error("handle_game_info(): Too many " _string "; using %d of %d", \
_maximum, game.info._count); \
game.info._count = _maximum; \
}
game
struct civ_game game
Definition game.c:57
civ_game::info
struct packet_game_info info
Definition game.h:89

## ◆ VALIDATE [2/2]

#define VALIDATE | ( |  | _count,
|  |  | _maximum,
|  |  | _string
| ) |  |

Value:
if (game.control._count > _maximum) { \
log_error("handle_ruleset_control(): Too many " _string \
"; using %d of %d", _maximum, game.control._count); \
game.control._count = _maximum; \
}
civ_game::control
struct packet_ruleset_control control
Definition game.h:83

## Function Documentation

## ◆ action_decision_handle()

static void action_decision_handle | ( | struct unit * | punit | ) |

static

Request that the player makes a decision for the specified unit unless it may be an automatic decision. In that case check if one of the auto actions are enabled.

Definition at line 1757 of file packhand.c.

Referenced by handle_unit_packet_common().

## ◆ action_decision_maybe_auto()

static void action_decision_maybe_auto | ( | struct unit * | actor_unit,
|  | const struct act_prob * | act_probs,
|  | struct unit * | target_unit,
|  | struct city * | target_city,
|  | struct tile * | target_tile
| ) |  |

static

Do an auto action or request that the player makes a decision for the specified unit.

Definition at line 5175 of file packhand.c.

Referenced by handle_unit_actions().

## ◆ auto_attack_act()

static action_id auto_attack_act | ( | const struct act_prob * | act_probs | ) |

static

Returns a possibly legal attack action iff it is the only interesting action that currently is legal.

Definition at line 5145 of file packhand.c.

Referenced by action_decision_maybe_auto().

## ◆ city_packet_common()

static void city_packet_common | ( | struct city * | pcity,
|  | struct tile * | pcenter,
|  | struct player * | powner,
|  | struct tile_list * | worked_tiles,
|  | bool | is_new,
|  | bool | popup,
|  | bool | investigate
| ) |  |

static

A helper function for handling city-info and city-short-info packets. Naturally, both require many of the same operations to be done on the data.

Definition at line 1093 of file packhand.c.

Referenced by handle_city_info(), and handle_city_short_info().

## ◆ handle_achievement_info()

void handle_achievement_info | ( | int | id,
|  | bool | gained,
|  | bool | first
| ) |  |

Received package about gaining an achievement.

Definition at line 3161 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_begin_turn()

void handle_begin_turn | ( | void |  | ) |

Called when begin-turn packet is received. Server has finished processing turn change.

Definition at line 1571 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_calendar_info()

void handle_calendar_info | ( | const struct packet_calendar_info * | pcalendar | ) |

Packet calendar_info handler.

Definition at line 2478 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_chat_msg()

void handle_chat_msg | ( | const struct packet_chat_msg * | packet | ) |

Handle a message packet. This includes all messages - both in-game messages and chats from other players.

Definition at line 1625 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_city_info()

void handle_city_info | ( | const struct packet_city_info * | packet | ) |

A city-info packet contains all information about a city. If we receive this packet then we know everything about the city internals.

Definition at line 689 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_city_name_suggestion_info()

void handle_city_name_suggestion_info | ( | int | unit_id16,
|  | int | unit_id32,
|  | const char * | name
| ) |  |

Handle reply to our city name request.

Definition at line 4979 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_city_nationalities()

void handle_city_nationalities | ( | const struct packet_city_nationalities * | packet | ) |

Handle city nationalities packet.

Definition at line 1047 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_city_rally_point()

void handle_city_rally_point | ( | const struct packet_city_rally_point * | packet | ) |

Handle city rally point packet.

Definition at line 1073 of file packhand.c.

## ◆ handle_city_remove()

void handle_city_remove | ( | int | city_id16,
|  | int | city_id32
| ) |  |

Handles a remove-city packet, used by the server to tell us any time a city is no longer there.

Definition at line 484 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_city_sabotage_list()

void handle_city_sabotage_list | ( | const struct packet_city_sabotage_list * | packet | ) |

Handle list of potenttial buildings to sabotage.

Definition at line 5325 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_city_short_info()

void handle_city_short_info | ( | const struct packet_city_short_info * | packet | ) |

A city-short-info packet is sent to tell us about any cities we can't see the internals of. Most of the time this includes any cities owned by someone else.

Definition at line 1239 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_conn_info()

void handle_conn_info | ( | const struct packet_conn_info * | pinfo | ) |

Remove, add, or update dummy connection struct representing some connection to the server, with info from packet_conn_info. Updates player and game connection lists. Calls players_dialog_update() in case info for that has changed.

Definition at line 3032 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_conn_ping()

void handle_conn_ping | ( | void |  | ) |

Reply to 'ping' packet with 'pong'

Definition at line 5523 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_conn_ping_info()

void handle_conn_ping_info | ( | int | connections,
|  | const int * | conn_id,
|  | const float * | ping_time
| ) |  |

Handles a conn_ping_info packet from the server. This packet contains ping times for each connection.

Definition at line 3138 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_connect_msg()

void handle_connect_msg | ( | const char * | message | ) |

Handle a connect message packet. Server sends connect message to client immediately when client connects.

Definition at line 1659 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_early_chat_msg()

void handle_early_chat_msg | ( | const struct packet_early_chat_msg * | packet | ) |

Handle an early message packet. Thease have format like other chat messages but server sends them only about events related to establishing the connection and other setup in the early phase. They are a separate packet just so that client knows thse to be already relevant when it's only setting itself up - other chat messages might be just something sent to all clients, and we might want to still consider ourselves "not connected" (not receivers of those messages) until we are fully in the game.

Definition at line 1645 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_edit_object_created()

void handle_edit_object_created | ( | int | tag,
|  | int | id
| ) |  |

Handle a notification from the server that an object was successfully created. The 'tag' was previously sent to the server when the client requested the creation. The 'id' is the identifier of the newly created object.

Definition at line 5550 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_edit_startpos()

void handle_edit_startpos | ( | const struct packet_edit_startpos * | packet | ) |

Handle start position creation/removal.

Definition at line 5558 of file packhand.c.

## ◆ handle_edit_startpos_full()

void handle_edit_startpos_full | ( | const struct packet_edit_startpos_full * | packet | ) |

Handle start position internal information.

Definition at line 5596 of file packhand.c.

## ◆ handle_end_phase()

void handle_end_phase | ( | void |  | ) |

Called by the network code when an end-phase packet is received. This signifies the end of our phase (it's not sent for other player's phases).

Definition at line 1501 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_end_turn()

void handle_end_turn | ( | void |  | ) |

Called when end-turn packet is received. Server starts processing turn change.

Definition at line 1585 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_endgame_player()

void handle_endgame_player | ( | const struct packet_endgame_player * | packet | ) |

Pass endgame report about single player.

Definition at line 5405 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_endgame_report()

void handle_endgame_report | ( | const struct packet_endgame_report * | packet | ) |

Pass the header information about things be displayed in a gui-specific endgame dialog.

Definition at line 5396 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_freeze_client()

void handle_freeze_client | ( | void |  | ) |

We have received PACKET_FREEZE_CLIENT.

Definition at line 5502 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_game_info()

void handle_game_info | ( | const struct packet_game_info * | pinfo | ) |

Packet game_info handler.

Definition at line 2402 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_investigate_finished()

void handle_investigate_finished | ( | int | unit_id16,
|  | int | unit_id32,
|  | int | city_id16,
|  | int | city_id32
| ) |  |

Receive an investigate_finished packet

Definition at line 2250 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_investigate_started()

void handle_investigate_started | ( | int | unit_id16,
|  | int | unit_id32,
|  | int | city_id16,
|  | int | city_id32
| ) |  |

Receive an investigate_started packet

Can't rely on generic packet_processing_started, as that works for the requesting connection only, and not for observers.

Definition at line 2218 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_map_info()

void handle_map_info | ( | int | xsize,
|  | int | ysize,
|  | int | topology_id
| ) |  |

Receive information about the map size and topology from the server. We initialize some global variables at the same time.

Definition at line 2366 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_nation_availability()

void handle_nation_availability | ( | int | ncount,
|  | const bool * | is_pickable,
|  | bool | nationset_change
| ) |  |

Handle nation availability info. This can change during pregame so is separate from ruleset_nation.

Definition at line 4806 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_new_year()

void handle_new_year | ( | int | year,
|  | int | fragments,
|  | int | turn
| ) |  |

Handle turn and year advancement.

Definition at line 1452 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_nuke_tile_info()

void handle_nuke_tile_info | ( | int | tile | ) |

The tile (x,y) has been nuked!

Definition at line 573 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_page_msg()

void handle_page_msg | ( | const char * | caption,
|  | const char * | headline,
|  | enum event_type | event,
|  | int | len,
|  | int | parts
| ) |  |

Page_msg header handler.

Definition at line 1684 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_page_msg_part()

void handle_page_msg_part | ( | const char * | lines | ) |

Page_msg part handler.

Definition at line 1715 of file packhand.c.

Referenced by client_handle_packet(), and handle_page_msg().

## ◆ handle_play_music()

void handle_play_music | ( | const char * | tag | ) |

Play suitable music

Definition at line 5692 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_player_attribute_chunk()

void handle_player_attribute_chunk | ( | const struct packet_player_attribute_chunk * | packet | ) |

Packet player_attribute_chunk handler.

Definition at line 5421 of file packhand.c.

## ◆ handle_player_diplstate()

void handle_player_diplstate | ( | const struct packet_player_diplstate * | packet | ) |

Packet player_diplstate handler.

Definition at line 2928 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_player_info()

void handle_player_info | ( | const struct packet_player_info * | pinfo | ) |

Handle information about a player. If the packet refers to a player slot that is not currently used, then this function will set that slot to used and update the total player count.

Definition at line 2572 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_player_remove()

void handle_player_remove | ( | int | playerno | ) |

Handle a notification that the player slot identified by 'playerno' has become unused. If the slot is already unused, then just ignore. Otherwise update the total player count and the GUI.

Definition at line 2527 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_processing_finished()

void handle_processing_finished | ( | void |  | ) |

Handle request to stop processing packet.

Definition at line 5458 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_processing_started()

void handle_processing_started | ( | void |  | ) |

Handle request to start processing packet.

Definition at line 5440 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_research_info()

void handle_research_info | ( | const struct packet_research_info * | packet | ) |

Receive a research info packet.

Definition at line 2814 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_achievement()

void handle_ruleset_achievement | ( | const struct packet_ruleset_achievement * | p | ) |

Handle a packet about a particular achievement type.

Definition at line 4630 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_action()

void handle_ruleset_action | ( | const struct packet_ruleset_action * | p | ) |

Handle a packet about a particular action.

Definition at line 4518 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_action_auto()

void handle_ruleset_action_auto | ( | const struct packet_ruleset_action_auto * | p | ) |

Handle a packet about a particular action auto performer rule.

Definition at line 4586 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_action_enabler()

void handle_ruleset_action_enabler | ( | const struct packet_ruleset_action_enabler * | p | ) |

Handle a packet about a particular action enabler.

Definition at line 4552 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_base()

void handle_ruleset_base | ( | const struct packet_ruleset_base * | p | ) |

Handle a packet about a particular base type.

Definition at line 4441 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_building()

void handle_ruleset_building | ( | const struct packet_ruleset_building * | p | ) |

Packet ruleset_building handler.

Definition at line 4048 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_city()

void handle_ruleset_city | ( | const struct packet_ruleset_city * | packet | ) |

Handle city style packet.

Definition at line 4859 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_clause()

void handle_ruleset_clause | ( | const struct packet_ruleset_clause * | p | ) |

Handle a packet about a particular clause.

Definition at line 4836 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_control()

void handle_ruleset_control | ( | const struct packet_ruleset_control * | packet | ) |

Take arrival of ruleset control packet to indicate that current allocated governments should be free'd, and new memory allocated for new size. The same for nations.

Definition at line 3557 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_description_part()

void handle_ruleset_description_part | ( | const struct packet_ruleset_description_part * | packet | ) |

Next part of ruleset description.

Definition at line 3674 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_disaster()

void handle_ruleset_disaster | ( | const struct packet_ruleset_disaster * | p | ) |

Handle a packet about a particular disaster type.

Definition at line 4608 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_effect()

void handle_ruleset_effect | ( | const struct packet_ruleset_effect * | packet | ) |

Add effect data to ruleset cache.

Definition at line 5539 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_extra()

void handle_ruleset_extra | ( | const struct packet_ruleset_extra * | p | ) |

Handle a packet about a particular extra type.

Definition at line 4283 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_extra_flag()

void handle_ruleset_extra_flag | ( | const struct packet_ruleset_extra_flag * | p | ) |

Packet ruleset_extra_flag handler.

Definition at line 4415 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_game()

void handle_ruleset_game | ( | const struct packet_ruleset_game * | packet | ) |

Packet ruleset_game handler.

Definition at line 4908 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_goods()

void handle_ruleset_goods | ( | const struct packet_ruleset_goods * | p | ) |

Handle a packet about a particular goods type.

Definition at line 4493 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_government()

void handle_ruleset_government | ( | const struct packet_ruleset_government * | p | ) |

Packet ruleset_government handler.

Definition at line 4125 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_government_ruler_title()

void handle_ruleset_government_ruler_title | ( | const struct packet_ruleset_government_ruler_title * | packet | ) |

Packet ruleset_government_ruler_title handler.

Definition at line 4151 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_multiplier()

void handle_ruleset_multiplier | ( | const struct packet_ruleset_multiplier * | p | ) |

Packet ruleset_multiplier handler.

Definition at line 4097 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_music()

void handle_ruleset_music | ( | const struct packet_ruleset_music * | packet | ) |

Handle music style packet.

Definition at line 4885 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_nation()

void handle_ruleset_nation | ( | const struct packet_ruleset_nation * | packet | ) |

Handle initial ruleset nation info.

Definition at line 4716 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_nation_groups()

void handle_ruleset_nation_groups | ( | const struct packet_ruleset_nation_groups * | packet | ) |

Handle the list of nation groups, sent as part of the ruleset.

Definition at line 4694 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_nation_sets()

void handle_ruleset_nation_sets | ( | const struct packet_ruleset_nation_sets * | packet | ) |

Handle the list of nation sets, sent as part of the ruleset.

Definition at line 4673 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_resource()

void handle_ruleset_resource | ( | const struct packet_ruleset_resource * | p | ) |

Handle a packet about a particular terrain resource.

Definition at line 4264 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_road()

void handle_ruleset_road | ( | const struct packet_ruleset_road * | p | ) |

Handle a packet about a particular road type.

Definition at line 4462 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_specialist()

void handle_ruleset_specialist | ( | const struct packet_ruleset_specialist * | p | ) |

Handle info about a single specialist.

Definition at line 4953 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_style()

void handle_ruleset_style | ( | const struct packet_ruleset_style * | p | ) |

Handle a packet about a particular style.

Definition at line 4824 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_summary()

void handle_ruleset_summary | ( | const struct packet_ruleset_summary * | packet | ) |

Ruleset summary.

Definition at line 3656 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_tech()

void handle_ruleset_tech | ( | const struct packet_ruleset_tech * | p | ) |

Packet ruleset_tech handler.

Definition at line 3945 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_tech_class()

void handle_ruleset_tech_class | ( | const struct packet_ruleset_tech_class * | p | ) |

Packet ruleset_tech_class handler.

Definition at line 4010 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_tech_flag()

void handle_ruleset_tech_flag | ( | const struct packet_ruleset_tech_flag * | p | ) |

Packet ruleset_tech_flag handler.

Definition at line 4023 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_terrain()

void handle_ruleset_terrain | ( | const struct packet_ruleset_terrain * | p | ) |

Packet ruleset_terrain handler.

Definition at line 4166 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_terrain_control()

void handle_ruleset_terrain_control | ( | const struct packet_ruleset_terrain_control * | p | ) |

Handle the terrain control ruleset packet sent by the server.

Definition at line 4660 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_terrain_flag()

void handle_ruleset_terrain_flag | ( | const struct packet_ruleset_terrain_flag * | p | ) |

Packet ruleset_terrain_flag handler.

Definition at line 4239 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_trade()

void handle_ruleset_trade | ( | const struct packet_ruleset_trade * | p | ) |

Handle a packet about a particular trade route type.

Definition at line 4646 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_unit()

void handle_ruleset_unit | ( | const struct packet_ruleset_unit * | p | ) |

Packet ruleset_unit handler.

Definition at line 3756 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_unit_bonus()

void handle_ruleset_unit_bonus | ( | const struct packet_ruleset_unit_bonus * | p | ) |

Packet ruleset_unit_bonus handler.

Definition at line 3838 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_unit_class()

void handle_ruleset_unit_class | ( | const struct packet_ruleset_unit_class * | p | ) |

Packet ruleset_unit_class handler.

Definition at line 3738 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_unit_class_flag()

void handle_ruleset_unit_class_flag | ( | const struct packet_ruleset_unit_class_flag * | p | ) |

Packet ruleset_unit_class_flag handler.

Definition at line 3883 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_ruleset_unit_flag()

void handle_ruleset_unit_flag | ( | const struct packet_ruleset_unit_flag * | p | ) |

Packet ruleset_unit_flag handler.

Definition at line 3858 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_rulesets_ready()

void handle_rulesets_ready | ( | void |  | ) |

Received packet indicating that all rulesets have now been received.

Definition at line 3684 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_scenario_description()

void handle_scenario_description | ( | const char * | description | ) |

Received packet containing description of current scenario

Definition at line 3545 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_scenario_info()

void handle_scenario_info | ( | const struct packet_scenario_info * | packet | ) |

Received packet containing info about current scenario

Definition at line 3524 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_server_info()

void handle_server_info | ( | const char * | version_label,
|  | int | major_version,
|  | int | minor_version,
|  | int | patch_version,
|  | int | emerg_version
| ) |  |

Handle server info packet. Server sends info packet as soon as it knows client to be compatible.

Definition at line 1668 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_server_join_reply()

void handle_server_join_reply | ( | bool | you_can_join,
|  | const char * | message,
|  | const char * | capability,
|  | const char * | challenge_file,
|  | int | conn_id
| ) |  |

After we send a join packet to the server we receive a reply. This function handles the reply.

Definition at line 416 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_server_shutdown()

void handle_server_shutdown | ( | void |  | ) |

Handle server shutdown.

Definition at line 5531 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_set_topology()

void handle_set_topology | ( | int | topology_id | ) |

Server requested topology change.

Definition at line 2344 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_spaceship_info()

void handle_spaceship_info | ( | const struct packet_spaceship_info * | p | ) |

Packet spaceship_info handler.

Definition at line 3217 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_start_phase()

void handle_start_phase | ( | int | phase | ) |

Called by the network code when an start-phase packet is received. This may be the start of our phase or someone else's phase.

Definition at line 1512 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_team_name_info()

void handle_team_name_info | ( | int | team_id,
|  | const char * | team_name
| ) |  |

The name of team 'team_id'

Definition at line 581 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_thaw_client()

void handle_thaw_client | ( | void |  | ) |

We have received PACKET_THAW_CLIENT

Definition at line 5512 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_tile_info()

void handle_tile_info | ( | const struct packet_tile_info * | packet | ) |

Packet tile_info handler.

Definition at line 3262 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_timeout_info()

void handle_timeout_info | ( | float | seconds_to_phasedone,
|  | float | last_turn_change_time
| ) |  |

Sets the remaining turn time.

Definition at line 2486 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_trade_route_info()

void handle_trade_route_info | ( | const struct packet_trade_route_info * | packet | ) |

A trade route-info packet contains information about one end of a trade route

Definition at line 1195 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_unit_action_answer()

void handle_unit_action_answer | ( | const struct packet_unit_action_answer * | packet | ) |

Handle the requested follow up question about an action

The action can be a valid action or the special value ACTION_NONE. ACTION_NONE indicates that performing the action is impossible.

Definition at line 5022 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_unit_actions()

void handle_unit_actions | ( | const struct packet_unit_actions * | packet | ) |

Handle reply to possible actions.

Note that a reply to a foreground request (a reply where request_kind is REQEST_PLAYER_INITIATED) must result in its clean up.

Definition at line 5243 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_unit_combat_info()

void handle_unit_combat_info | ( | const struct packet_unit_combat_info * | packet | ) |

A combat packet. The server tells us the attacker and defender as well as both of their hitpoints after the combat is over (in most combat, one unit always dies and their HP drops to zero). If make_winner_veteran is set then the surviving unit becomes veteran.

Definition at line 596 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_unit_info()

void handle_unit_info | ( | const struct packet_unit_info * | packet | ) |

Packet unit_info.

Definition at line 1741 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_unit_packet_common()

static bool handle_unit_packet_common | ( | struct unit * | packet_unit | ) |

static

Called to do basic handling for a unit_info or short_unit_info packet.

Both owned and foreign units are handled; you may need to check unit owner, or if unit equals focus unit, depending on what you are doing.

Note: Normally the server informs client about a new "activity" here. For owned units, the new activity can be a result of:

- The player issued a command (a request) with the client.
- The server side AI did something.
- An enemy encounter caused a sentry to idle. (See "Wakeup Focus").

Depending on what caused the change, different actions may be taken. Therefore, this function is a bit of a jungle, and it is advisable to read thoroughly before changing.

Definition at line 1795 of file packhand.c.

Referenced by handle_unit_info(), and handle_unit_short_info().

## ◆ handle_unit_remove()

void handle_unit_remove | ( | int | unit_id16,
|  | int | unit_id32
| ) |  |

Handle a remove-unit packet, sent by the server to tell us any time a unit is no longer there.

Definition at line 513 of file packhand.c.

Referenced by client_handle_packet(), and handle_unit_packet_common().

## ◆ handle_unit_short_info()

void handle_unit_short_info | ( | const struct packet_unit_short_info * | packet | ) |

Receive a short_unit info packet.

Definition at line 2258 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_unknown_research()

void handle_unknown_research | ( | int | id | ) |

Received a packet indicating we don't know the research details any more.

Definition at line 2898 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_vote_new()

void handle_vote_new | ( | const struct packet_vote_new * | packet | ) |

Create a new vote and add it to the queue. Refresh the GUI.

Definition at line 5657 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_vote_remove()

void handle_vote_remove | ( | int | vote_no | ) |

A vote no longer exists. Remove from queue and update gui.

Definition at line 5627 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_vote_resolve()

void handle_vote_resolve | ( | int | vote_no,
|  | bool | passed
| ) |  |

Update the vote's status and refresh the GUI.

Definition at line 5674 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_vote_update()

void handle_vote_update | ( | int | vote_no,
|  | int | yes,
|  | int | no,
|  | int | abstain,
|  | int | num_voters
| ) |  |

Find and update the corresponding vote and refresh the GUI.

Definition at line 5636 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_web_city_info_addition()

void handle_web_city_info_addition | ( | int | id16,
|  | int | id32,
|  | int | granary_size,
|  | int | granary_turns
| ) |  |

This is a packet that only the web-client needs. The regular client has no use for it. TODO: Do not generate code calling this in the C-client.

Definition at line 1039 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_web_player_info_addition()

void handle_web_player_info_addition | ( | int | playerno,
|  | int | expected_income
| ) |  |

This is a packet that only the web-client needs. The regular client has no use for it. TODO: Do not generate code calling this in the C-client.

Definition at line 2807 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_web_ruleset_unit_addition()

void handle_web_ruleset_unit_addition | ( | int | id,
|  | bv_actions | utype_actions
| ) |  |

This is a packet that only the web-client needs. The regular client has no use for it. TODO: Do not generate code calling this in the C-client.

Definition at line 3831 of file packhand.c.

Referenced by client_handle_packet().

## ◆ handle_worker_task()

void handle_worker_task | ( | const struct packet_worker_task * | packet | ) |

Handle worker task assigned to the city

Definition at line 1389 of file packhand.c.

## ◆ notify_about_incoming_packet()

void notify_about_incoming_packet | ( | struct connection * | pc,
|  | int | packet_type,
|  | int | size
| ) |  |

Notify interested parties about incoming packet.

Definition at line 5478 of file packhand.c.

Referenced by make_connection().

## ◆ notify_about_outgoing_packet()

void notify_about_outgoing_packet | ( | struct connection * | pc,
|  | int | packet_type,
|  | int | size,
|  | int | request_id
| ) |  |

Notify interested parties about outgoing packet.

Definition at line 5488 of file packhand.c.

Referenced by make_connection().

## ◆ packhand_free()

void packhand_free | ( | void |  | ) |

Called below, and by client/client_main.c client_game_free()

Definition at line 215 of file packhand.c.

Referenced by client_game_free(), client_game_reset(), and packhand_init().

## ◆ packhand_init()

static void packhand_init | ( | void |  | ) |

static

Called only by handle_map_info() below.

Definition at line 236 of file packhand.c.

Referenced by handle_map_info().

## ◆ play_sound_for_event()

void play_sound_for_event | ( | enum event_type | type | ) |

Plays sound associated with event

Definition at line 1612 of file packhand.c.

Referenced by handle_event(), and handle_page_msg_part().

## ◆ set_government_choice()

void set_government_choice | ( | struct government * | government | ) |

Sets the target government. This will automatically start a revolution if the target government differs from the current one.

Definition at line 2503 of file packhand.c.

Referenced by government_dlg_callback(), revolution_response(), and revolution_response().

## ◆ spaceship_autoplace()

static bool spaceship_autoplace | ( | struct player * | pplayer,
|  | struct player_spaceship * | ship
| ) |  |

static

Ideally the client should let the player choose which type of modules and components to build, and (possibly) where to extend structurals. The protocol now makes this possible, but the client is not yet that good (would require GUI improvements) so currently the client choices stuff automatically if there is anything unplaced.

This function makes a choice (sends spaceship_action) and returns 1 if we placed something, else 0.

Do things one at a time; the server will send us an updated spaceship_info packet, and we'll be back here to do anything which is left.

Definition at line 3198 of file packhand.c.

Referenced by handle_spaceship_info().

## ◆ start_revolution()

void start_revolution | ( | void |  | ) |

Begin a revolution by telling the server to start it. This also clears the current government choice.

Definition at line 2516 of file packhand.c.

Referenced by revolution_response(), and revolution_response().

## ◆ unpack_tech_req()

static int unpack_tech_req | ( | const enum tech_req | r_num,
|  | const int | reqs_size,
|  | const struct requirement * | reqs,
|  | struct advance * | a,
|  | int | i
| ) |  |

static

Unpack a traditional tech req from a standard requirement vector (that still is in the network serialized format rather than a proper requirement vector).

Returns the position in the requirement vector after unpacking. It will increase if a tech req was extracted.

Definition at line 3915 of file packhand.c.

Referenced by handle_ruleset_tech().

## ◆ unpackage_short_unit()

static struct unit * unpackage_short_unit | ( | const struct packet_unit_short_info * | packet | ) |

static

Unpackage a short_unit_info packet. This extracts a limited amount of information about the unit, and is sent for units we shouldn't know everything about (like our enemies' units).

Information for the client must also be processed in handle_unit_packet_common()! Especially notice that unit structure filled here is just temporary one. Values must be copied to real unit in handle_unit_packet_common().

Definition at line 369 of file packhand.c.

Referenced by handle_unit_short_info().

## ◆ unpackage_unit()

static struct unit * unpackage_unit | ( | const struct packet_unit_info * | packet | ) |

static

Unpackage the unit information into a newly allocated unit structure.

Information for the client must also be processed in handle_unit_packet_common()! Especially notice that unit structure filled here is just temporary one. Values must be copied to real unit in handle_unit_packet_common().

Definition at line 261 of file packhand.c.

Referenced by handle_unit_info().

## ◆ update_improvement_from_packet()

static bool update_improvement_from_packet | ( | struct city * | pcity,
|  | struct impr_type * | pimprove,
|  | bool | have_impr
| ) |  |

static

Updates a city's list of improvements from packet data. "have_impr" specifies whether the improvement should be added (TRUE) or removed (FALSE). Returns TRUE if the improvement has been actually added or removed.

Definition at line 667 of file packhand.c.

Referenced by handle_city_info(), handle_city_sabotage_list(), and handle_city_short_info().

## Variable Documentation

## ◆ auto_attack_actions

const action_id auto_attack_actions[]

Initial value:
= {
ACTION_CAPTURE_UNITS,
ACTION_BOMBARD, ACTION_BOMBARD2, ACTION_BOMBARD3,
ACTION_NUKE, ACTION_NUKE_CITY, ACTION_NUKE_UNITS,
ACTION_ATTACK, ACTION_SUICIDE_ATTACK,
ACTION_CONQUER_CITY, ACTION_CONQUER_CITY2,
ACTION_CONQUER_CITY3, ACTION_CONQUER_CITY4,
ACTION_STRIKE_PRODUCTION,
ACTION_CONQUER_EXTRAS, ACTION_CONQUER_EXTRAS2,
ACTION_CONQUER_EXTRAS3, ACTION_CONQUER_EXTRAS4,
ACTION_NONE
}
ACTION_NONE
#define ACTION_NONE
Definition actions.h:293

Definition at line 143 of file packhand.c.

Referenced by action_decision_handle(), and auto_attack_act().

## ◆ auto_attack_blockers

const action_id auto_attack_blockers[]

Definition at line 158 of file packhand.c.

Referenced by auto_attack_act().

## ◆ caption

char* caption

Definition at line 127 of file packhand.c.

Referenced by handle_page_msg().

## ◆ cities

struct city_list* cities

Definition at line 117 of file packhand.c.

Referenced by adjust_improvement_wants_by_effects(), buy_production_in_selected_cities(), city_incite_cost(), city_model_fill(), city_waste(), collect_production_targets(), dai_war_desire(), debug_command(), city_widget::display_list_menu(), kill_something_with(), load_city_name_list(), player_base_citizen_happiness(), player_distance_to_player(), city_model::populate(), process_attacker_want(), text_happiness_cities(), unit_bribe_cost(), update_city_activities(), and update_source_label().

## ◆ event

enum event_type event

Definition at line 126 of file packhand.c.

Referenced by handle_page_msg().

## ◆ forced_tileset_name

const char forced_tileset_name[]

extern

Definition at line 136 of file client_main.c.

Referenced by client_main(), default_tileset_select(), and handle_set_topology().

## ◆ headline

char* headline

Definition at line 128 of file packhand.c.

Referenced by handle_page_msg().

## ◆ [struct]

struct { ... } invisible

Initial value:
= {
.cities = NULL,
.placeholder = NULL
}

Referenced by handle_city_info(), handle_city_short_info(), handle_tile_info(), packhand_free(), and packhand_init().

## ◆ last_turn

int last_turn = 0

static

Definition at line 135 of file packhand.c.

Referenced by handle_new_year().

## ◆ len

int len

Definition at line 125 of file packhand.c.

Referenced by activated_topic(), add_connection_data(), add_new_worklist_callback(), allowtake_callback(), astr_add_line(), base_fc_utf8_strlcpy_rep(), base_fc_utf8_strlcpy_trunc(), boot_help_texts(), capitalized_string(), cat_snprintf(), cat_utf8_snprintf_rep(), cat_utf8_snprintf_trunc(), chain2text(), check_include(), check_strlen(), citizens_callback(), citizens_callback(), client_handle_packet(), cma_get_parameter(), compat_load_020600(), connection_send_data(), convert_utf8_str_to_const_surface_width(), create_md5sum(), create_new_line_utf8strs(), create_races_dialog(), del_chain(), edit_field(), edit_worklist_callback(), effectivestrlenquote(), end_of_strn(), expand_dir(), extract_sequence_text(), fc_chomp(), fc_gethostname(), fc_strcspn(), fc_strrep(), fc_strrep_resize(), fc_utf8_strlcat_rep(), fc_utf8_strlcat_trunc(), fc_utf8_strlen(), fc_vsnprintf(), featured_text_apply_tag(), featured_text_to_plain_text(), fileinfolist(), fileinfolist_infix(), form_chat_name(), fz_fgets(), fz_fprintf(), fz_from_file(), generate_packets::get_choices(), generate_packets.Variant::get_cmp(), get_conv(), get_conv(), generate_packets.Variant::get_delta_receive_body(), generate_packets.Variant::get_delta_send_body(), generate_packets.Variant::get_hash(), get_infrastructure_text(), get_internal_string_length(), get_option_malloc(), generate_packets::get_packet_handlers_fill_capability(), generate_packets::get_packet_handlers_fill_initial(), generate_packets.Variant::get_receive(), generate_packets.Variant::get_send(), get_tokens(), handle_page_msg(), handle_ruleset_choices(), handle_ruleset_nation(), handle_ruleset_summary(), help_command_callback(), help_update_tech(), html_special_chars(), init_datum_string(), init_nls(), is_on_allowed_list(), is_valid_demography(), load_city_name_list(), load_ruleset_game(), loud_strlcpy(), luascript_report(), generate_packets::main(), mapimg_define_arg(), match_prefix_full(), md5_buffer(), message_dlg::message_dlg(), packet_check(), page_conn_etype(), generate_packets::parse_fields(), player_name_check(), popup_races_dialog(), popup_worklist_editor(), qtg_get_gui_specific_themes_directories(), receive_packet_page_msg_100(), redraw_edit(), refresh_worklist_count_label(), remove_clause_widget_from_list(), remove_packet_from_buffer(), remove_trailing_spaces(), save_script_lua(), script_server_load_file(), secfile_entry_by_path(), secfile_sections_by_name_prefix(), send_packet_data(), server_sniff_all_input(), setting_bitwise_to_str(), setting_match_prefix_base(), sg_load_player_city(), sg_load_player_unit(), sg_load_player_unit(), sg_save_player_cities(), sg_save_player_units(), startunits_callback(), generate_packets::strip_c_comment(), strvec_to_str(), text2chain(), text_tag_replace_text(), text_tag_start_sequence(), text_tag_stop_sequence(), tileset_read_toplevel(), update_clauses_list(), update_info_label(), and version_message().

## ◆ lines

char* lines

Definition at line 129 of file packhand.c.

Referenced by client_handle_packet(), compat_load_020400(), chatwdg::default_size(), draw_trade_route_line(), handle_page_msg_part(), notify_dialog::notify_dialog(), notify_goto::notify_goto(), notify_goto_data_new(), page_conn(), page_conn_etype(), popup_notify_dialog(), popup_notify_goto_dialog(), receive_packet_page_msg_part_100(), set_new_order_widget_start_pos(), sg_load_map_known(), sg_load_map_known(), sg_save_map_known(), and trade_route_to_canvas_lines().

## ◆ [struct]

struct { ... } page_msg_report

Referenced by handle_page_msg(), and handle_page_msg_part().

## ◆ parts

int parts

Definition at line 130 of file packhand.c.

Referenced by client_handle_packet(), handle_page_msg(), receive_packet_page_msg_100(), sg_load_player_attributes(), sg_load_player_attributes(), and sg_save_player_attributes().

## ◆ placeholder

struct player* placeholder

Definition at line 118 of file packhand.c.