Freeciv-3.2
|
#include <limits.h>
#include "bitvector.h"
#include "fcintl.h"
#include "log.h"
#include "shared.h"
#include "support.h"
#include "events.h"
#include "game.h"
#include "government.h"
#include "map.h"
#include "movement.h"
#include "nation.h"
#include "terrain.h"
#include "research.h"
#include "unitlist.h"
#include "aiiface.h"
#include "citytools.h"
#include "cityturn.h"
#include "connecthand.h"
#include "gamehand.h"
#include <hand_gen.h>
#include "maphand.h"
#include "plrhand.h"
#include "notify.h"
#include "sanitycheck.h"
#include "stdinhand.h"
#include "techtools.h"
#include "unittools.h"
#include "mapgen_utils.h"
#include "savemain.h"
#include "edithand.h"
Go to the source code of this file.
Variables | |
static bool | need_continents_reassigned = FALSE |
static struct tile_hash * | modified_tile_table = NULL |
static bool * | unfogged_players |
Do the potentially slow checks required after one or several tiles' terrain has change.
Definition at line 147 of file edithand.c.
Referenced by check_leaving_edit_mode(), and handle_edit_check_tiles().
Do any necessary checks after leaving edit mode to ensure that the game is in a consistent state.
Definition at line 169 of file edithand.c.
Referenced by handle_edit_mode().
|
static |
Base function to edit the extras property of a tile. Returns TRUE if the extra state has changed.
Definition at line 258 of file edithand.c.
Referenced by handle_edit_tile(), and handle_edit_tile_extra().
|
static |
Base function to edit the terrain property of a tile. Returns TRUE if the terrain has changed.
Definition at line 226 of file edithand.c.
Referenced by handle_edit_tile_terrain().
Free all memory used by data structures required for edit mode.
Definition at line 96 of file edithand.c.
Referenced by server_quit().
Initialize data structures required for edit mode.
Definition at line 78 of file edithand.c.
Referenced by srv_prepare().
Send the needed packets for connections entering in the editing mode.
Definition at line 112 of file edithand.c.
Referenced by connection_attach_real(), and handle_edit_mode().
void handle_edit_check_tiles | ( | struct connection * | pc | ) |
Run any pending tile checks.
Definition at line 1322 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_city | ( | struct connection * | pc, |
const struct packet_edit_city * | packet | ||
) |
Handle a request to change the internal state of a city.
Definition at line 746 of file edithand.c.
Referenced by server_handle_packet().
Allows the editing client to create a city at the given position and of size 'size'.
Definition at line 690 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_city_remove | ( | struct connection * | pc, |
int | id | ||
) |
Remove any city at the given location.
Definition at line 1305 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_game | ( | struct connection * | pc, |
const struct packet_edit_game * | packet | ||
) |
Handle edit requests to the main game data structure.
Definition at line 1441 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_mode | ( | struct connection * | pc, |
bool | is_edit_mode | ||
) |
Handles a request by the client to enter edit mode.
Definition at line 193 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_player | ( | struct connection * | pc, |
const struct packet_edit_player * | packet | ||
) |
Handle editing of any or all player properties.
Definition at line 1009 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_player_create | ( | struct connection * | pc, |
int | tag | ||
) |
Handle a request to create a new player.
Definition at line 906 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_player_remove | ( | struct connection * | pc, |
int | id | ||
) |
Handle a request to remove a player.
Definition at line 985 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_player_vision | ( | struct connection * | pc, |
int | plr_no, | ||
int | tile, | ||
bool | known, | ||
int | size | ||
) |
Handles vision editing requests from client.
Definition at line 1225 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_recalculate_borders | ( | struct connection * | pc | ) |
Client editor requests us to recalculate borders. Note that this does not necessarily extend borders to their maximum due to the way the borders code is written. This may be considered a feature or limitation.
Definition at line 1297 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_scenario_desc | ( | struct connection * | pc, |
const char * | scenario_desc | ||
) |
Handle edit requests to scenario description
Definition at line 1504 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_startpos | ( | struct connection * | pconn, |
const struct packet_edit_startpos * | packet | ||
) |
Create or remove a start position at a tile.
Definition at line 1365 of file edithand.c.
Referenced by client_handle_packet(), and server_handle_packet().
void handle_edit_startpos_full | ( | struct connection * | pconn, |
const struct packet_edit_startpos_full * | packet | ||
) |
Setup which nations can start at a start position.
Definition at line 1403 of file edithand.c.
Referenced by client_handle_packet(), and server_handle_packet().
void handle_edit_tile | ( | struct connection * | pc, |
const struct packet_edit_tile * | packet | ||
) |
Handles tile information from the client, to make edits to tiles.
Definition at line 380 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_tile_extra | ( | struct connection * | pc, |
int | tile, | ||
int | id, | ||
bool | removal, | ||
int | eowner, | ||
int | size | ||
) |
Handle a request to change one or more tiles' extras. The 'remove' argument controls whether to remove or add the given extra from the tile.
Definition at line 340 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_tile_terrain | ( | struct connection * | pc, |
int | tile, | ||
Terrain_type_id | terrain, | ||
int | size | ||
) |
Handles a client request to change the terrain of the tile at the given x, y coordinates. The 'size' parameter indicates that all tiles in a square of "radius" 'size' should be affected. So size=1 corresponds to the single tile case.
Definition at line 303 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_toggle_fogofwar | ( | struct connection * | pc, |
int | plr_no | ||
) |
Temporarily remove fog-of-war for the player with player number 'plr_no'. This will only stay in effect while the server is in edit mode and the connection is editing. Has no effect if fog-of-war is disabled globally.
Definition at line 1332 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_unit | ( | struct connection * | pc, |
const struct packet_edit_unit * | packet | ||
) |
Handles unit information from the client, to make edits to units.
Definition at line 613 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_unit_create | ( | struct connection * | pc, |
int | owner, | ||
int | tile, | ||
Unit_type_id | utid, | ||
int | count, | ||
int | tag | ||
) |
Handle a request to create 'count' units of type 'utid' at the tile given by the x, y coordinates and owned by player with number 'owner'.
Definition at line 438 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_unit_remove | ( | struct connection * | pc, |
int | owner, | ||
int | tile, | ||
Unit_type_id | utid, | ||
int | count | ||
) |
Remove 'count' units of type 'utid' owned by player number 'owner' at tile (x, y).
Definition at line 541 of file edithand.c.
Referenced by server_handle_packet().
void handle_edit_unit_remove_by_id | ( | struct connection * | pc, |
Unit_type_id | id | ||
) |
Handle a request to remove a unit given by its id.
Definition at line 596 of file edithand.c.
Referenced by server_handle_packet().
void handle_save_scenario | ( | struct connection * | pc, |
const char * | name | ||
) |
Make scenario file out of current game.
Definition at line 1516 of file edithand.c.
Referenced by server_handle_packet().
Definition at line 68 of file edithand.c.
Referenced by check_edited_tile_terrains(), edit_tile_terrain_handling(), edithand_free(), and edithand_init().
Definition at line 64 of file edithand.c.
Referenced by check_edited_tile_terrains(), edit_tile_terrain_handling(), and edithand_init().
|
static |
Definition at line 73 of file edithand.c.
Referenced by check_leaving_edit_mode(), edithand_free(), edithand_init(), edithand_send_initial_packets(), and handle_edit_toggle_fogofwar().