![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include "fc_types.h"#include "map.h"#include "packets.h"#include "terrain.h"#include "vision.h"#include "hand_gen.h"
Include dependency graph for maphand.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| struct | player_tile |
Functions | |
| void | global_warming (int effect) |
| Wrapper for climate_change(). More... | |
| void | nuclear_winter (int effect) |
| Wrapper for climate_change(). More... | |
| void | climate_change (bool warming, int effect) |
| Do a climate change. More... | |
| bool | upgrade_city_extras (struct city *pcity, struct extra_type **gained) |
| Check city for extra upgrade. More... | |
| void | upgrade_all_city_extras (struct player *pplayer, bool discovery) |
| To be called when a player gains some better extra building tech for the first time. More... | |
| void | give_map_from_player_to_player (struct player *pfrom, struct player *pdest) |
| Give information about whole map (all tiles) from player to player. More... | |
| void | give_seamap_from_player_to_player (struct player *pfrom, struct player *pdest) |
| Give information about all oceanic tiles from player to player. More... | |
| void | give_citymap_from_player_to_player (struct city *pcity, struct player *pfrom, struct player *pdest) |
| Give information about tiles within city radius from player to player. More... | |
| void | send_all_known_tiles (struct conn_list *dest) |
| Send all tiles known to specified clients. More... | |
| bool | send_tile_suppression (bool now) |
| Suppress send_tile_info() during game_load() More... | |
| void | send_tile_info (struct conn_list *dest, struct tile *ptile, bool send_unknown) |
| Send tile information to all the clients in dest which know and see the tile. More... | |
| void | send_map_info (struct conn_list *dest) |
| Send basic map information: map size, topology, and is_earth. More... | |
| void | map_show_tile (struct player *pplayer, struct tile *ptile) |
| Shows the area to the player. More... | |
| void | map_hide_tile (struct player *pplayer, struct tile *ptile) |
| Hides the area to the player. More... | |
| void | map_show_circle (struct player *pplayer, struct tile *ptile, int radius_sq) |
| Shows the area to the player. More... | |
| void | map_vision_update (struct player *pplayer, struct tile *ptile, const v_radius_t old_radius_sq, const v_radius_t new_radius_sq, bool can_reveal_tiles) |
| There doesn't have to be a city. More... | |
| void | map_set_border_vision (struct player *pplayer, const bool is_enabled) |
| Turn a players ability to see inside his borders on or off. More... | |
| void | map_show_all (struct player *pplayer) |
| Shows the area to the player. More... | |
| bool | map_is_known_and_seen (const struct tile *ptile, const struct player *pplayer, enum vision_layer vlayer) |
| Returns whether the layer 'vlayer' of the tile 'ptile' is known and seen by the player 'pplayer'. More... | |
| bool | map_is_known (const struct tile *ptile, const struct player *pplayer) |
| Return whether the player knows the tile. More... | |
| void | map_set_known (struct tile *ptile, struct player *pplayer) |
| Set known status of the tile. More... | |
| void | map_clear_known (struct tile *ptile, struct player *pplayer) |
| Clear known status of the tile. More... | |
| void | map_know_and_see_all (struct player *pplayer) |
| Call this function to unfog all tiles. More... | |
| void | show_map_to_all () |
| Unfogs all tiles for all players. More... | |
| void | player_map_init (struct player *pplayer) |
| Allocate space for map, and initialise the tiles. More... | |
| void | player_map_free (struct player *pplayer) |
| Free a player's private map. More... | |
| void | remove_player_from_maps (struct player *pplayer) |
| Remove all knowledge of a player from main map and other players' private maps, and send updates to connected clients. More... | |
| struct vision_site * | map_get_player_city (const struct tile *ptile, const struct player *pplayer) |
| Returns city located at given tile from player map. More... | |
| struct vision_site * | map_get_player_site (const struct tile *ptile, const struct player *pplayer) |
| Returns site located at given tile from player map. More... | |
| struct player_tile * | map_get_player_tile (const struct tile *ptile, const struct player *pplayer) |
| Players' information of tiles is tracked so that fogged area can be kept consistent even when the client disconnects. More... | |
| bool | update_player_tile_knowledge (struct player *pplayer, struct tile *ptile) |
| Give pplayer the correct knowledge about tile; return TRUE iff knowledge changed. More... | |
| void | update_tile_knowledge (struct tile *ptile) |
| Update playermap knowledge for everybody who sees the tile, and send a packet to everyone whose info is changed. More... | |
| void | update_player_tile_last_seen (struct player *pplayer, struct tile *ptile) |
| Remember that tile was last seen this year. More... | |
| void | give_shared_vision (struct player *pfrom, struct player *pto) |
| Starts shared vision between two players. More... | |
| void | remove_shared_vision (struct player *pfrom, struct player *pto) |
| Removes shared vision from between two players. More... | |
| bool | really_gives_vision (struct player *me, struct player *them) |
| Return TRUE iff the player me really gives shared vision to player them. More... | |
| void | enable_fog_of_war () |
| Turns FoW on for everyone. More... | |
| void | disable_fog_of_war () |
| Turns FoW off for everyone. More... | |
| void | enable_fog_of_war_player (struct player *pplayer) |
| Turns FoW on for player. More... | |
| void | disable_fog_of_war_player (struct player *pplayer) |
| Turns FoW off for player. More... | |
| void | map_calculate_borders () |
| Update borders for all sources. More... | |
| void | map_claim_border (struct tile *ptile, struct player *powner, int radius_sq) |
| Update borders for this source. More... | |
| void | map_claim_ownership (struct tile *ptile, struct player *powner, struct tile *psource, bool claim_bases) |
| Claim ownership of a single tile. More... | |
| void | map_clear_border (struct tile *ptile) |
| Remove border for this source. More... | |
| void | map_update_border (struct tile *ptile, struct player *owner, int old_radius_sq, int new_radius_sq) |
| Update borders for this source. More... | |
| void | tile_claim_bases (struct tile *ptile, struct player *powner) |
| Claim ownership of bases on single tile. More... | |
| void | map_claim_base (struct tile *ptile, const extra_type *pextra, struct player *powner, struct player *ploser) |
| Claim base to player's ownership. More... | |
| void | terrain_changed (struct tile *ptile) |
| Handle local side effects for a terrain change. More... | |
| void | check_terrain_change (struct tile *ptile, struct terrain *oldter) |
| Handles local and global side effects for a terrain change for a single tile. More... | |
| void | fix_tile_on_terrain_change (struct tile *ptile, struct terrain *oldter, bool extend_rivers) |
| Handles local side effects for a terrain change (tile and its surroundings). More... | |
| bool | need_to_reassign_continents (const struct terrain *oldter, const struct terrain *newter) |
| Returns TRUE if the terrain change from 'oldter' to 'newter' may require expensive reassignment of continents. More... | |
| void | bounce_units_on_terrain_change (struct tile *ptile) |
| Check ptile and nearby tiles to see if all units can remain at their current locations, and move or disband any that cannot. More... | |
| void | vision_change_sight (struct vision *vision, const v_radius_t radius_sq) |
| Change the sight points for the vision source, fogging or unfogging tiles as needed. More... | |
| void | vision_clear_sight (struct vision *vision) |
| Clear all sight points from this vision source. More... | |
| void | change_playertile_site (struct player_tile *ptile, struct vision_site *new_site) |
| Changes site information for player tile. More... | |
| void | create_extra (struct tile *ptile, const extra_type *pextra, struct player *pplayer) |
| Create extra to tile. More... | |
| void | destroy_extra (struct tile *ptile, struct extra_type *pextra) |
| Remove extra from tile. More... | |
| void | give_distorted_map (struct player *pfrom, struct player *pto, int prob, bool reveal_cities) |
| Transfer (random parts of) player pfrom's world map to pto. More... | |
| void bounce_units_on_terrain_change | ( | struct tile * | ptile | ) |
Check ptile and nearby tiles to see if all units can remain at their current locations, and move or disband any that cannot.
Call this after terrain or specials change on ptile.
Definition at line 1802 of file maphand.cpp.
Referenced by create_extra(), terrain_changed(), and unit_activity_complete().
| void change_playertile_site | ( | struct player_tile * | ptile, |
| struct vision_site * | new_site | ||
| ) |
Changes site information for player tile.
Definition at line 1122 of file maphand.cpp.
Referenced by really_give_tile_info_from_player_to_player(), remove_player_from_maps(), sg_load_player_vision(), and update_dumb_city().
Handles local and global side effects for a terrain change for a single tile.
Call this in the server immediately after calling tile_change_terrain. Assumes an in-game terrain change (e.g., by workers/engineers).
Definition at line 1875 of file maphand.cpp.
Referenced by climate_change(), and unit_activity_complete().
| void climate_change | ( | bool | warming, |
| int | effect | ||
| ) |
Do a climate change.
Global warming occurred if 'warming' is TRUE, else there is a nuclear winter.
Definition at line 123 of file maphand.cpp.
Referenced by api_edit_climate_change(), global_warming(), and nuclear_winter().
| void create_extra | ( | struct tile * | ptile, |
| const extra_type * | pextra, | ||
| struct player * | pplayer | ||
| ) |
Create extra to tile.
Definition at line 2405 of file maphand.cpp.
Referenced by api_edit_create_owned_extra(), begin_phase(), and unit_activity_complete().
| void destroy_extra | ( | struct tile * | ptile, |
| struct extra_type * | pextra | ||
| ) |
Remove extra from tile.
Definition at line 2478 of file maphand.cpp.
Referenced by create_city(), create_extra(), do_nuke_tile(), unit_activity_complete(), and unit_enter_hut().
| void disable_fog_of_war | ( | ) |
Turns FoW off for everyone.
Definition at line 1736 of file maphand.cpp.
Referenced by begin_turn().
| void disable_fog_of_war_player | ( | struct player * | pplayer | ) |
Turns FoW off for player.
Definition at line 1720 of file maphand.cpp.
Referenced by check_leaving_edit_mode(), disable_fog_of_war(), and handle_edit_toggle_fogofwar().
| void enable_fog_of_war | ( | ) |
| void enable_fog_of_war_player | ( | struct player * | pplayer | ) |
Turns FoW on for player.
Definition at line 1695 of file maphand.cpp.
Referenced by check_leaving_edit_mode(), enable_fog_of_war(), and handle_edit_toggle_fogofwar().
| void fix_tile_on_terrain_change | ( | struct tile * | ptile, |
| struct terrain * | oldter, | ||
| bool | extend_rivers | ||
| ) |
Handles local side effects for a terrain change (tile and its surroundings).
Does not handle global side effects (such as reassigning continents). For in-game terrain changes 'extend_rivers' should be TRUE; for edits it should be FALSE.
Definition at line 1856 of file maphand.cpp.
Referenced by api_edit_change_terrain(), check_terrain_change(), and edit_tile_terrain_handling().
| void give_citymap_from_player_to_player | ( | struct city * | pcity, |
| struct player * | pfrom, | ||
| struct player * | pdest | ||
| ) |
Give information about tiles within city radius from player to player.
Definition at line 408 of file maphand.cpp.
Referenced by handle_diplomacy_create_clause_req(), and transfer_city().
| void give_distorted_map | ( | struct player * | pfrom, |
| struct player * | pto, | ||
| int | prob, | ||
| bool | reveal_cities | ||
| ) |
Transfer (random parts of) player pfrom's world map to pto.
| pfrom | player that is the source of the map |
| pto | player that receives the map |
| prob | probability for the transfer each known tile |
| reveal_cities | if the map of all known cities should be transferred |
Definition at line 2558 of file maphand.cpp.
Referenced by kill_unit(), and spy_steal_some_maps().
Give information about whole map (all tiles) from player to player.
Takes care of shared vision chains.
Definition at line 368 of file maphand.cpp.
Referenced by handle_diplomacy_accept_treaty_req(), and split_player().
Give information about all oceanic tiles from player to player.
Definition at line 387 of file maphand.cpp.
Referenced by handle_diplomacy_accept_treaty_req().
Starts shared vision between two players.
Definition at line 1568 of file maphand.cpp.
Referenced by handle_diplomacy_accept_treaty_req(), sg_load_players(), and srv_ready().
| void global_warming | ( | int | effect | ) |
| void map_calculate_borders | ( | ) |
Update borders for all sources.
Call this on turn end.
Definition at line 2244 of file maphand.cpp.
Referenced by end_turn(), handle_edit_recalculate_borders(), player_limit_to_max_rates(), and sg_load_players().
| void map_claim_base | ( | struct tile * | ptile, |
| const extra_type * | pextra, | ||
| struct player * | powner, | ||
| struct player * | ploser | ||
| ) |
Claim base to player's ownership.
Definition at line 2273 of file maphand.cpp.
Referenced by create_extra(), maybe_claim_base(), and tile_claim_bases().
Update borders for this source.
Call this for each new source.
If radius_sq is -1, get value from the border source on tile.
Definition at line 2155 of file maphand.cpp.
Referenced by city_change_size(), city_populate(), create_city(), map_calculate_borders(), map_claim_base(), map_update_border(), and transfer_city().
| void map_claim_ownership | ( | struct tile * | ptile, |
| struct player * | powner, | ||
| struct tile * | psource, | ||
| bool | claim_bases | ||
| ) |
Claim ownership of a single tile.
Definition at line 2070 of file maphand.cpp.
Referenced by create_city(), kill_player(), map_claim_border(), map_clear_border(), map_update_border(), sg_load_map_owner(), sg_load_player_cities(), and transfer_city().
| void map_clear_border | ( | struct tile * | ptile | ) |
Remove border for this source.
Definition at line 2102 of file maphand.cpp.
Referenced by check_terrain_change(), destroy_extra(), map_claim_base(), map_claim_border(), remove_city(), and transfer_city().
Clear known status of the tile.
Definition at line 1141 of file maphand.cpp.
Referenced by create_barbarian_player(), map_hide_tile(), and remove_player_from_maps().
| struct vision_site* map_get_player_city | ( | const struct tile * | ptile, |
| const struct player * | pplayer | ||
| ) |
Returns city located at given tile from player map.
Definition at line 1317 of file maphand.cpp.
Referenced by mapimg_server_tile_city(), package_dumb_city(), sg_save_player_vision(), spy_send_sabotage_list(), and update_dumb_city().
| struct vision_site* map_get_player_site | ( | const struct tile * | ptile, |
| const struct player * | pplayer | ||
| ) |
Returns site located at given tile from player map.
Definition at line 1330 of file maphand.cpp.
Referenced by find_closest_city(), map_get_player_city(), maybe_cancel_patrol_due_to_enemy(), send_all_known_cities(), send_city_info_at_tile(), and send_tile_info().
| struct player_tile* map_get_player_tile | ( | const struct tile * | ptile, |
| const struct player * | pplayer | ||
| ) |
Players' information of tiles is tracked so that fogged area can be kept consistent even when the client disconnects.
This function returns the player tile information for the given tile and player.
Definition at line 1341 of file maphand.cpp.
Referenced by do_paradrop(), handle_unit_get_actions(), is_airunit_refuel_point(), map_change_own_seen(), map_change_seen(), map_get_own_seen(), map_get_player_site(), map_get_seen(), mapimg_server_tile_owner(), mapimg_server_tile_terrain(), player_tile_free(), player_tile_init(), reality_check_city(), really_give_tile_info_from_player_to_player(), remove_dumb_city(), remove_player_from_maps(), send_tile_info(), server_plr_tile_city_id_get(), sg_load_player_vision(), sg_save_player_vision(), update_dumb_city(), update_player_tile_knowledge(), and update_player_tile_last_seen().
Hides the area to the player.
Callers may wish to buffer_shared_vision before calling this function.
Definition at line 802 of file maphand.cpp.
Referenced by handle_edit_player_vision().
Return whether the player knows the tile.
Knowing a tile means you've seen it once (as opposed to seeing a tile which means you can see it now).
Definition at line 884 of file maphand.cpp.
Referenced by action_not_enabled_reason(), adv_data_phase_init(), calculate_want_for_paratrooper(), city_desirability(), cityresult_fill(), explorer_desirable(), find_best_tile_to_paradrop_to(), find_closest_city(), find_something_to_bomb(), find_something_to_kill(), give_shared_vision(), likely_native(), map_change_seen(), map_claim_border(), map_hide_tile(), map_is_known_and_seen(), notify_conn_packet(), really_give_tile_info_from_player_to_player(), send_city_info_at_tile(), send_tile_info(), sg_load_player_vision(), sg_save_map_known(), and try_summon_barbarians().
| bool map_is_known_and_seen | ( | const struct tile * | ptile, |
| const struct player * | pplayer, | ||
| enum vision_layer | vlayer | ||
| ) |
Returns whether the layer 'vlayer' of the tile 'ptile' is known and seen by the player 'pplayer'.
Definition at line 894 of file maphand.cpp.
Referenced by action_not_enabled_reason(), adv_danger_at(), create_city(), dai_consider_tile_dangerous(), destroy_extra(), do_paradrop(), find_best_tile_to_paradrop_to(), find_rampage_target(), find_something_to_bomb(), found_new_tech(), handle_diplomacy_create_clause_req(), is_city_surrounded_by_our_spies(), map_show_tile(), need_war_player_hlp(), really_give_tile_info_from_player_to_player(), remove_allied_visibility(), remove_city(), see_combat_unit(), send_bombardment(), send_city_info_at_tile(), send_combat(), send_tile_info(), sg_load_player_vision(), try_summon_barbarians(), unit_move(), and update_tile_knowledge().
| void map_know_and_see_all | ( | struct player * | pplayer | ) |
Call this function to unfog all tiles.
This should only be called when a player dies or at the end of the game as it will result in permanent vision of the whole map.
Definition at line 1151 of file maphand.cpp.
Referenced by kill_player(), sg_load_player_vision(), and show_map_to_all().
| void map_set_border_vision | ( | struct player * | pplayer, |
| const bool | is_enabled | ||
| ) |
Turn a players ability to see inside his borders on or off.
It is safe to set the current value.
Definition at line 714 of file maphand.cpp.
Referenced by do_border_vision_effect().
Set known status of the tile.
Definition at line 1133 of file maphand.cpp.
Referenced by map_change_seen(), map_show_tile(), really_give_tile_info_from_player_to_player(), and sg_load_map_known().
| void map_show_all | ( | struct player * | pplayer | ) |
Shows the area to the player.
Unless the tile is "seen", it will remain fogged and units will be hidden.
Definition at line 870 of file maphand.cpp.
Referenced by do_reveal_effects(), and srv_ready().
Shows the area to the player.
Unless the tile is "seen", it will remain fogged and units will be hidden.
Definition at line 852 of file maphand.cpp.
Referenced by do_paradrop(), handle_edit_unit_create(), illegal_action_pay_price(), place_starting_unit(), try_summon_barbarians(), and unleash_barbarians().
Shows the area to the player.
Unless the tile is "seen", it will remain fogged and units will be hidden.
Callers may wish to buffer_shared_vision before calling this function.
Definition at line 743 of file maphand.cpp.
Referenced by do_reveal_effects(), handle_edit_city_create(), handle_edit_player_vision(), map_show_all(), map_show_circle(), and send_city_info_at_tile().
| void map_update_border | ( | struct tile * | ptile, |
| struct player * | owner, | ||
| int | old_radius_sq, | ||
| int | new_radius_sq | ||
| ) |
Update borders for this source.
Changes the radius without temporary clearing.
Definition at line 2121 of file maphand.cpp.
Referenced by city_reduce_size().
| void map_vision_update | ( | struct player * | pplayer, |
| struct tile * | ptile, | ||
| const v_radius_t | old_radius_sq, | ||
| const v_radius_t | new_radius_sq, | ||
| bool | can_reveal_tiles | ||
| ) |
There doesn't have to be a city.
Definition at line 652 of file maphand.cpp.
Referenced by destroy_extra(), map_claim_base(), and vision_change_sight().
Returns TRUE if the terrain change from 'oldter' to 'newter' may require expensive reassignment of continents.
Definition at line 1819 of file maphand.cpp.
Referenced by api_edit_change_terrain(), check_terrain_change(), and edit_tile_terrain_handling().
| void nuclear_winter | ( | int | effect | ) |
| void player_map_free | ( | struct player * | pplayer | ) |
Free a player's private map.
Definition at line 1191 of file maphand.cpp.
Referenced by player_limit_to_max_rates(), and server_player_init().
| void player_map_init | ( | struct player * | pplayer | ) |
Allocate space for map, and initialise the tiles.
Uses current map.xsize and map.ysize.
Definition at line 1177 of file maphand.cpp.
Referenced by server_player_init(), sg_load_map_known(), and srv_ready().
Return TRUE iff the player me really gives shared vision to player them.
Definition at line 325 of file maphand.cpp.
Referenced by buffer_shared_vision(), create_vision_dependencies(), give_shared_vision(), give_tile_info_from_player_to_player(), handle_edit_player_vision(), map_hide_tile(), map_show_tile(), remove_shared_vision(), shared_vision_change_seen(), and unbuffer_shared_vision().
| void remove_player_from_maps | ( | struct player * | pplayer | ) |
Remove all knowledge of a player from main map and other players' private maps, and send updates to connected clients.
Frees all vision_sites associated with that player.
Definition at line 1210 of file maphand.cpp.
Referenced by player_limit_to_max_rates().
Removes shared vision from between two players.
Definition at line 1634 of file maphand.cpp.
Referenced by dai_diplomacy_actions(), dai_go_to_war(), handle_diplomacy_cancel_pact_explicit(), kill_player(), and player_limit_to_max_rates().
| void send_all_known_tiles | ( | struct conn_list * | dest | ) |
Send all tiles known to specified clients.
If dest is nullptr means game.est_connections.
Note for multiple connections this may change "sent" multiple times for single player. This is ok, because "sent" data is just optimised calculations, so it will be correct before this, for each connection during this, and at end.
Definition at line 436 of file maphand.cpp.
Referenced by api_edit_change_terrain(), check_edited_tile_terrains(), check_terrain_change(), and send_all_info().
| void send_map_info | ( | struct conn_list * | dest | ) |
Send basic map information: map size, topology, and is_earth.
Definition at line 617 of file maphand.cpp.
Referenced by send_all_info().
| void send_tile_info | ( | struct conn_list * | dest, |
| struct tile * | ptile, | ||
| bool | send_unknown | ||
| ) |
Send tile information to all the clients in dest which know and see the tile.
If dest is nullptr, sends to all clients (game.est_connections) which know and see tile.
Note that this function does not update the playermap. For that call update_tile_knowledge().
Definition at line 485 of file maphand.cpp.
Referenced by api_edit_tile_set_label(), city_map_update_empty(), city_map_update_tile_direct(), city_map_update_worker(), destroy_extra(), found_new_tech(), handle_edit_tile(), map_change_seen(), map_claim_border_ownership(), map_hide_tile(), map_show_tile(), really_give_tile_info_from_player_to_player(), remove_city(), remove_player_from_maps(), send_all_known_tiles(), and update_tile_knowledge().
| bool send_tile_suppression | ( | bool | now | ) |
Suppress send_tile_info() during game_load()
Definition at line 469 of file maphand.cpp.
Referenced by savegame2_load(), and savegame3_load().
| void show_map_to_all | ( | ) |
Unfogs all tiles for all players.
See map_know_and_see_all.
Definition at line 1167 of file maphand.cpp.
Referenced by srv_scores().
| void terrain_changed | ( | struct tile * | ptile | ) |
Handle local side effects for a terrain change.
Definition at line 1837 of file maphand.cpp.
Referenced by edit_tile_extra_handling(), and fix_tile_on_terrain_change().
Claim ownership of bases on single tile.
Definition at line 2083 of file maphand.cpp.
Referenced by map_claim_ownership(), sg_load_map_owner(), sg_load_player_units(), and unit_move().
Give pplayer the correct knowledge about tile; return TRUE iff knowledge changed.
Note that unlike update_tile_knowledge, this function will not send any packets to the client. Callers may want to call send_tile_info() if this function returns TRUE.
Definition at line 1357 of file maphand.cpp.
Referenced by destroy_extra(), found_new_tech(), map_change_seen(), map_show_tile(), sg_load_player_vision(), and update_tile_knowledge().
Remember that tile was last seen this year.
Definition at line 1427 of file maphand.cpp.
Referenced by map_change_seen(), map_hide_tile(), map_show_tile(), and sg_load_player_vision().
| void update_tile_knowledge | ( | struct tile * | ptile | ) |
Update playermap knowledge for everybody who sees the tile, and send a packet to everyone whose info is changed.
Note this only checks for changing of the terrain, special, or resource for the tile, since these are the only values held in the playermap.
A tile's owner always can see terrain changes in his or her territory.
Definition at line 1395 of file maphand.cpp.
Referenced by api_edit_change_terrain(), api_edit_create_owned_extra(), api_edit_remove_extra(), begin_phase(), check_terrain_change(), climate_change(), create_city(), do_nuke_tile(), edit_tile_extra_handling(), edit_tile_terrain_handling(), end_turn(), handle_edit_tile(), map_claim_border_ownership(), place_pollution(), place_starting_unit(), transfer_city(), try_summon_barbarians(), unit_activity_complete(), unit_enter_hut(), and upgrade_all_city_extras().
| void upgrade_all_city_extras | ( | struct player * | pplayer, |
| bool | discovery | ||
| ) |
To be called when a player gains some better extra building tech for the first time.
Sends a message, and upgrades all city squares to new extras. "discovery" just affects the message: set to 1 if the tech is a "discovery", 0 if otherwise acquired (conquer/trade/GLib). –dwp
Definition at line 251 of file maphand.cpp.
Referenced by found_new_tech().
| bool upgrade_city_extras | ( | struct city * | pcity, |
| struct extra_type ** | gained | ||
| ) |
Check city for extra upgrade.
Returns whether anything was done. gained will be set if there's exactly one kind of extra added.
Definition at line 214 of file maphand.cpp.
Referenced by create_city(), result_defense_bonus(), terrain_changed(), transfer_city(), and upgrade_all_city_extras().
| void vision_change_sight | ( | struct vision * | vision, |
| const v_radius_t | radius_sq | ||
| ) |
Change the sight points for the vision source, fogging or unfogging tiles as needed.
See documentation in vision.h.
Definition at line 2383 of file maphand.cpp.
Referenced by city_refresh_vision(), transfer_city(), unit_move_data(), unit_refresh_vision(), and vision_clear_sight().
| void vision_clear_sight | ( | struct vision * | vision | ) |
Clear all sight points from this vision source.
See documentation in vision.h.
Definition at line 2395 of file maphand.cpp.
Referenced by remove_city(), server_remove_unit_full(), transfer_city(), unit_change_homecity_handling(), and unit_move().