67 unit_id32 = unit_id16;
74 log_verbose(
"handle_city_name_suggestion_req() invalid unit %d",
81 log_verbose(
"handle_city_name_suggest_req(unit_pos (%d, %d))",
91 log_verbose(
"handle_city_name_suggest_req(unit_pos (%d, %d)): "
102 int city_id16,
int city_id32,
109 city_id32 = city_id16;
124 log_verbose(
"Error in specialist change request from client.");
140 int city_id16,
int city_id32,
int tile_id)
146 city_id32 = city_id16;
154 log_verbose(
"handle_city_make_specialist() bad city number %d.",
160 log_error(
"handle_city_make_specialist() bad tile number %d.", tile_id);
165 log_error(
"handle_city_make_specialist() tile (%d, %d) not in the "
176 log_verbose(
"handle_city_make_specialist() not working (%d, %d) "
191 int city_id16,
int city_id32,
int tile_id)
197 city_id32 = city_id16;
204 log_verbose(
"handle_city_make_worker() bad city number %d.", city_id32);
209 log_error(
"handle_city_make_worker() bad tile number %d.", tile_id);
214 log_error(
"handle_city_make_worker() tile (%d, %d) not in the "
226 log_verbose(
"handle_city_make_worker() already working (%d, %d) \"%s\".",
232 log_verbose(
"handle_city_make_worker() no specialists (%d, %d) \"%s\".",
238 log_verbose(
"handle_city_make_worker() cannot work here (%d, %d) \"%s\".",
271 _(
"You have already sold something here this turn."));
282 PL_(
"You sell %s in %s for %d gold.",
283 "You sell %s in %s for %d gold.", price),
306 city_id32 = city_id16;
311 if (!pcity || !pimprove) {
332 _(
"Cannot buy in city created this turn."));
338 _(
"You have already bought this turn."));
344 _(
"You don't buy %s!"),
351 _(
"Can't buy units when city is in disorder."));
373 PL_(
"%s You only have %d gold.",
392 Q_(
"?unit:You bought %s in %s."),
398 Q_(
"?improvement:You bought %s in %s."),
418 city_id32 = city_id16;
441 city_id32 = city_id16;
459 city_id32 = city_id16;
462 if (city_id32 != 0) {
480 int production_kind,
int production_value)
487 city_id32 = city_id16;
492 if (!universals_n_is_valid(production_kind)) {
493 log_error(
"[%s] bad production_kind %d.", __FUNCTION__,
495 prod.
kind = VUT_NONE;
499 if (!universals_n_is_valid(prod.
kind)) {
500 log_error(
"[%s] production_kind %d with bad production_value %d.",
501 __FUNCTION__, production_kind, production_value);
502 prod.
kind = VUT_NONE;
521 _(
"You have bought this turn, can't change."));
542 city_id32 = city_id16;
567 int city_id16,
int city_id32,
568 bv_city_options options)
573 city_id32 = city_id16;
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 has_capability(const char *cap, const char *capstr)
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_production_has_flag(const struct city *pcity, enum impr_flag_id flag)
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_can_change_build(const struct city *pcity)
void handle_city_rally_point(struct player *pplayer, const struct packet_city_rally_point *packet)
void handle_city_refresh(struct player *pplayer, int city_id16, int city_id32)
void handle_city_options_req(struct player *pplayer, int city_id16, int city_id32, bv_city_options options)
void handle_city_make_specialist(struct player *pplayer, int city_id16, int city_id32, int tile_id)
void handle_city_make_worker(struct player *pplayer, int city_id16, int city_id32, int tile_id)
void really_handle_city_buy(struct player *pplayer, struct city *pcity)
void handle_city_worklist(struct player *pplayer, int city_id16, int city_id32, const struct worklist *worklist)
void handle_city_sell(struct player *pplayer, int city_id16, int city_id32, int build_id)
void handle_city_change(struct player *pplayer, int city_id16, int city_id32, int production_kind, int production_value)
void handle_city_buy(struct player *pplayer, int city_id16, int city_id32)
void handle_city_change_specialist(struct player *pplayer, int city_id16, int city_id32, Specialist_type_id from, Specialist_type_id to)
void handle_city_name_suggestion_req(struct player *pplayer, int unit_id16, int unit_id32)
void handle_city_rename(struct player *pplayer, int city_id16, int city_id32, const char *name)
void really_handle_city_sell(struct player *pplayer, struct city *pcity, struct impr_type *pimprove)
void auto_arrange_workers(struct city *pcity)
bool city_refresh(struct city *pcity)
void city_refresh_for_player(struct player *pplayer)
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 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)
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_id16, int unit_id32, 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
bv_city_options city_options
struct universal production
citizens specialists[SP_MAX]
struct packet_game_info info
char capability[MAX_LEN_CAPSTR]
struct connection * current_conn
struct conn_list * connections
struct player_economic economic
int fc_snprintf(char *str, size_t n, const char *format,...)
#define tile_worked(_tile)
const struct unit_type * utype
const struct impr_type * building
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)