66 log_verbose(
"handle_city_name_suggestion_req() invalid unit %d",
73 log_verbose(
"handle_city_name_suggest_req(unit_pos (%d, %d))",
82 log_verbose(
"handle_city_name_suggest_req(unit_pos (%d, %d)): "
105 ||
pcity->specialists[from] == 0) {
108 log_verbose(
"Error in specialist change request from client.");
112 pcity->specialists[from]--;
113 pcity->specialists[to]++;
124 int city_id,
int tile_id)
131 log_verbose(
"handle_city_make_specialist() bad city number %d.",
137 log_error(
"handle_city_make_specialist() bad tile number %d.", tile_id);
142 log_error(
"handle_city_make_specialist() tile (%d, %d) not in the "
156 log_verbose(
"handle_city_make_specialist() not working (%d, %d) "
171 int city_id,
int tile_id)
178 log_verbose(
"handle_city_make_worker() bad city number %d.",city_id);
183 log_error(
"handle_city_make_worker() bad tile number %d.", tile_id);
188 log_error(
"handle_city_make_worker() tile (%d, %d) not in the "
203 log_verbose(
"handle_city_make_worker() already working (%d, %d) \"%s\".",
209 log_verbose(
"handle_city_make_worker() no specialists (%d, %d) \"%s\".",
215 log_verbose(
"handle_city_make_worker() cannot work here (%d, %d) \"%s\".",
226 if (
pcity->specialists[
i] > 0) {
251 _(
"You have already sold something here this turn."));
262 PL_(
"You sell %s in %s for %d gold.",
263 "You sell %s in %s for %d gold.",
price),
284 if (!
pcity || !pimprove) {
304 _(
"Cannot buy in city created this turn."));
308 if (
pcity->did_buy) {
310 _(
"You have already bought this turn."));
316 _(
"You don't buy %s!"),
323 _(
"Can't buy units when city is in disorder."));
345 PL_(
"%s You only have %d gold.",
352 if (
pcity->shield_stock < total) {
355 pcity->disbanded_shields += total -
pcity->shield_stock;
356 pcity->shield_stock = total;
364 Q_(
"?unit:You bought %s in %s."),
370 Q_(
"?improvement:You bought %s in %s."),
436 int production_kind,
int production_value)
450 log_error(
"[%s] production_kind %d with bad production_value %d.",
471 _(
"You have bought this turn, can't change."));
520 pcity->city_options = options;
bool action_prob_possible(const struct act_prob probability)
struct act_prob action_prob_vs_tile(const struct civ_map *nmap, const struct unit *actor_unit, const action_id act_id, const struct tile *target_tile, const struct extra_type *target_extra)
bool is_free_worked(const struct city *pcity, const struct tile *ptile)
int city_production_build_shield_cost(const struct city *pcity)
void city_name_set(struct city *pcity, const char *new_name)
const char * city_name_get(const struct city *pcity)
bool city_can_use_specialist(const struct city *pcity, Specialist_type_id type)
bool city_map_includes_tile(const struct city *const pcity, const struct tile *map_tile)
citizens city_specialists(const struct city *pcity)
void city_rally_point_receive(const struct packet_city_rally_point *packet, struct city *pcity)
bool can_city_build_now(const struct civ_map *nmap, const struct city *pcity, const struct universal *target)
bool city_can_work_tile(const struct city *pcity, const struct tile *ptile)
bool city_production_is_genus(const struct city *pcity, enum impr_genus_id genus)
bool city_can_change_build(const struct city *pcity)
void handle_city_change(struct player *pplayer, int city_id, int production_kind, int production_value)
void handle_city_rally_point(struct player *pplayer, const struct packet_city_rally_point *packet)
void handle_city_name_suggestion_req(struct player *pplayer, int unit_id)
void handle_city_worklist(struct player *pplayer, int city_id, const struct worklist *worklist)
void handle_city_buy(struct player *pplayer, int city_id)
void handle_city_change_specialist(struct player *pplayer, int city_id, Specialist_type_id from, Specialist_type_id to)
void really_handle_city_buy(struct player *pplayer, struct city *pcity)
void handle_web_cma_set(struct player *pplayer, int id, const struct cm_parameter *param)
void handle_city_sell(struct player *pplayer, int city_id, int build_id)
void handle_city_make_worker(struct player *pplayer, int city_id, int tile_id)
void handle_city_options_req(struct player *pplayer, int city_id, bv_city_options options, enum city_wl_cancel_behavior wlcb)
void handle_city_refresh(struct player *pplayer, int city_id)
void handle_city_make_specialist(struct player *pplayer, int city_id, int tile_id)
void handle_city_rename(struct player *pplayer, int city_id, const char *name)
void really_handle_city_sell(struct player *pplayer, struct city *pcity, struct impr_type *pimprove)
void handle_web_cma_clear(struct player *pplayer, int id)
void auto_arrange_workers(struct city *pcity)
bool city_refresh(struct city *pcity)
void city_refresh_for_player(struct player *pplayer)
void cm_copy_parameter(struct cm_parameter *dest, const struct cm_parameter *const src)
void conn_list_do_unbuffer(struct conn_list *dest)
void conn_list_do_buffer(struct conn_list *dest)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction struct unit struct city * pcity
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int cost
#define PL_(String1, String2, n)
const struct ft_color ftc_server
const char * city_link(const struct city *pcity)
struct impr_type * improvement_by_number(const Impr_type_id id)
int impr_sell_gold(const struct impr_type *pimprove)
enum test_result test_player_sell_building_now(struct player *pplayer, struct city *pcity, const struct impr_type *pimprove)
const char * improvement_name_translation(const struct impr_type *pimprove)
#define fc_assert_ret(condition)
#define log_verbose(message,...)
#define log_error(message,...)
struct tile * index_to_tile(const struct civ_map *imap, int mindex)
#define fc_calloc(n, esz)
void notify_player(const struct player *pplayer, const struct tile *ptile, enum event_type event, const struct ft_color color, const char *format,...)
void dlsend_packet_city_name_suggestion_info(struct conn_list *dest, int unit_id, const char *name)
struct unit * player_unit_by_number(const struct player *pplayer, int unit_id)
struct city * player_city_by_number(const struct player *pplayer, int city_id)
bool player_owns_city(const struct player *pplayer, const struct city *pcity)
void send_player_info_c(struct player *src, struct conn_list *dest)
struct universal universal_by_number(const enum universals_n kind, const int value)
bool are_universals_equal(const struct universal *psource1, const struct universal *psource2)
#define sanity_check_city(x)
Specialist_type_id specialist_count(void)
#define specialist_type_iterate_end
#define specialist_type_iterate(sp)
#define DEFAULT_SPECIALIST
enum city_wl_cancel_behavior wlcb
struct packet_game_info info
struct conn_list * connections
struct player_economic economic
struct unit::@84::@87 server
const struct unit_type * utype
int fc_snprintf(char *str, size_t n, const char *format,...)
#define tile_worked(_tile)
void illegal_action_msg(struct player *pplayer, const enum event_type event, struct unit *actor, const action_id stopped_action, const struct tile *target_tile, const struct city *target_city, const struct unit *target_unit)
const char * utype_name_translation(const struct unit_type *punittype)
void worklist_copy(struct worklist *dst, const struct worklist *src)