19#include <QActionGroup>
20#include <QApplication>
25#include <QStandardPaths>
98 for (
i = 0;
i < s;
i++) {
121 gui()->mapview_wdg->repaint();
132 gui()->infotab->chtwdg->append(
QString(
_(
"Adding city %1 to trade planning"))
147 if (
pcity !=
nullptr) {
159 if (
pcity !=
nullptr) {
179 gui()->infotab->chtwdg->append(
180 QString(
_(
"Removing city %1 from trade planning"))
196 if (c->
tile == ptile) {
198 gui()->infotab->chtwdg->append(
199 QString(
_(
"Removing city %1 from trade planning")).arg(c->
name));
239 int count =
cities.size();
243 for (
i = 0;
i < 100;
i++) {
248 for (
n = 0;
n < count;
n++) {
255 for (
n = 0;
n < count;
n++) {
292 PL_(
"City %s - 1 free trade route.",
293 "City %s - %d free trade routes.",
304 gui()->mapview_wdg->repaint();
350 for (
int i = j;
i > -j;
i--) {
367 ttc->pos_cities.removeOne(tc->
city);
369 ttc->poss_trade_num--;
385 for (
int i =
cities.size() - 1 ;
i >= 0;
i--) {
408 for (
int i =
cities.size() - 1 ;
i >= 0;
i--) {
411 &&
ttc->pos_cities.contains(tc->
city)
430 if (
ttc->done ||
ttc->over_max > 0
435 &&
ttc->pos_cities.contains(tc->
city)) {
439 ttc->pos_cities.removeOne(tc->
city);
441 ttc->poss_trade_num--;
443 ttc->new_tr_cities.append(
ttc->city);
451 gilles.autocaravan =
nullptr;
517 gui()->menu_bar->clear();
518 gui()->menu_bar->setup_menus();
533 gui()->menuBar()->setVisible(
true);
535 gui()->menu_bar->menus_sensitive();
536 gui()->menu_bar->update_airlift_menu();
537 gui()->menu_bar->update_roads_menu();
538 gui()->menu_bar->update_bases_menu();
541 gui()->unitinfo_wdg->update_actions(
nullptr);
544 gui()->menuBar()->setVisible(
false);
595 foreach(
action, QWidget::actions()) {
616 .replace(
"&",
"&&"));
620 QObject::connect(
action, &QAction::triggered, [
this,
i]() {
700 : QMenu(
_(
"Go to and..."),
parent)
740 .replace(
"&",
"&&"));
756#define CREATE_SUB_ITEM(_menu_, _act_id_, _sub_tgt_id_, _sub_tgt_name_) \
758 QAction *_sub_item_ = _menu_->addAction(_sub_tgt_name_); \
759 int _sub_target_id_ = _sub_tgt_id_; \
760 QObject::connect(_sub_item_, &QAction::triggered, \
761 [this, _act_id_, _sub_target_id_]() { \
762 start_go_act(_act_id_, _sub_target_id_); \
807#define ADD_OLD_SHORTCUT(wanted_action_id, sc_id) \
808 if (act_id == wanted_action_id) { \
809 item->setShortcut(QKeySequence(shortcut_to_string( \
810 fc_shortcuts::sc()->get_shortcut(sc_id)))); \
824 QObject::connect(
item, &QAction::triggered, [
this,act_id]() {
843 if (
items.isEmpty()) {
855 item->setVisible(
true);
858 item->setVisible(
false);
910 struct tile *ptile =
nullptr;
923 if (
zunit ==
nullptr) {
932 if (ptile ==
nullptr) {
984 act =
sub_menu->addAction(
_(
"Set local options"));
986 act =
sub_menu->addAction(
_(
"Server Options"));
988 act =
sub_menu->addAction(
_(
"Messages"));
990 act =
sub_menu->addAction(
_(
"Shortcuts"));
992 act =
sub_menu->addAction(
_(
"Load another tileset"));
994 act =
sub_menu->addAction(
_(
"Save Options Now"));
995 act->setIcon(style()->
standardIcon(QStyle::SP_DialogSaveButton));
997 act =
sub_menu->addAction(
_(
"Save Options on Exit"));
998 act->setCheckable(
true);
1003 act->setIcon(style()->
standardIcon(QStyle::SP_DialogSaveButton));
1006 act =
main_menu->addAction(
_(
"Save Game As..."));
1008 act->setIcon(style()->
standardIcon(QStyle::SP_DialogSaveButton));
1010 act =
main_menu->addAction(
_(
"Save Map to Image"));
1014 act->setIcon(style()->
standardIcon(QStyle::SP_DialogDiscardButton));
1017 act->setIcon(style()->
standardIcon(QStyle::SP_TitleBarCloseButton));
1022 act =
main_menu->addAction(
_(
"Center View"));
1030 act->setCheckable(
true);
1043 osd_status->setChecked(
gui()->qt_settings.show_new_turn_text);
1044 connect(
osd_status, &QAction::triggered,
this,
1062 act =
main_menu->addAction(
_(
"Zoom default"));
1076 act =
main_menu->addAction(
_(
"City Outlines"));
1077 act->setCheckable(
true);
1080 act =
main_menu->addAction(
_(
"City Output"));
1081 act->setCheckable(
true);
1089 act->setCheckable(
true);
1092 act =
main_menu->addAction(
_(
"National Borders"));
1093 act->setCheckable(
true);
1098 act =
main_menu->addAction(
_(
"Native Tiles"));
1099 act->setCheckable(
true);
1103 act =
main_menu->addAction(
_(
"City Full Bar"));
1104 act->setCheckable(
true);
1110 act->setCheckable(
true);
1115 act =
main_menu->addAction(
_(
"City Growth"));
1116 act->setCheckable(
true);
1120 act =
main_menu->addAction(
_(
"City Production"));
1121 act->setCheckable(
true);
1126 act =
main_menu->addAction(
_(
"City Buy Cost"));
1127 act->setCheckable(
true);
1130 act =
main_menu->addAction(
_(
"City Trade Routes"));
1131 act->setCheckable(
true);
1136 act =
main_menu->addAction(
_(
"Unit Stack Size"));
1137 act->setCheckable(
true);
1145 act =
main_menu->addAction(
_(
"Single Unit (Unselect Others)"));
1149 act =
main_menu->addAction(
_(
"All On Tile"));
1154 act =
main_menu->addAction(
_(
"Same Type on Tile"));
1158 act =
main_menu->addAction(
_(
"Same Type on Continent"));
1161 connect(act, &QAction::triggered,
this,
1163 act =
main_menu->addAction(
_(
"Same Type Everywhere"));
1166 connect(act, &QAction::triggered,
this,
1180 act =
main_menu->addAction(
_(
"Advanced unit selection"));
1196 act =
main_menu->addAction(
_(
"Go to Nearest City"));
1200 act =
main_menu->addAction(
_(
"Go to/Airlift to City..."));
1206 act =
main_menu->addAction(
_(
"Auto Explore"));
1213 act->setEnabled(
false);
1223 act =
main_menu->addAction(
_(
"Unsentry All On Tile"));
1239 act =
main_menu->addAction(
_(
"Unload All From Transporter"));
1247 .replace(
"&",
"&&"));
1268 act =
main_menu->addAction(
_(
"Fortify Unit"));
1274 .replace(
"&",
"&&"));
1279 .replace(
"&",
"&&"));
1304 .replace(
"&",
"&&"));
1309 act =
main_menu->addAction(
_(
"Auto Worker"));
1321 act =
main_menu->addAction(
_(
"Build Irrigation"));
1342 act =
main_menu->addAction(
_(
"Connect With Road"));
1346 act =
main_menu->addAction(
_(
"Connect With Railroad"));
1350 act =
main_menu->addAction(
_(
"Connect With Maglev"));
1354 act =
main_menu->addAction(
_(
"Connect With Irrigation"));
1359 act =
main_menu->addAction(
_(
"Transform Terrain"));
1370 .replace(
"&",
"&&"));
1375 .replace(
"&",
"&&"));
1419 act->setCheckable(
true);
1420 act->setChecked(
true);
1426 act->setCheckable(
true);
1427 act->setChecked(
false);
1433 act->setCheckable(
true);
1434 act->setChecked(
false);
1440 act->setCheckable(
true);
1441 act->setChecked(
false);
1448 act->setCheckable(
true);
1449 act->setChecked(
true);
1455 act->setCheckable(
true);
1456 act->setChecked(
false);
1462 act->setCheckable(
true);
1463 act->setChecked(
false);
1469 act->setCheckable(
true);
1470 act->setChecked(
false);
1476 act->setCheckable(
true);
1477 act->setChecked(
false);
1483 act->setCheckable(
true);
1484 act->setChecked(
false);
1490 act->setCheckable(
true);
1491 act->setChecked(
false);
1497 act->setCheckable(
true);
1498 act->setChecked(
false);
1504 act->setCheckable(
true);
1505 act->setChecked(
false);
1511 act->setCheckable(
true);
1512 act->setChecked(
false);
1518 act->setCheckable(
true);
1519 act->setChecked(
false);
1526 act =
main_menu->addAction(
_(
"Tax Rates..."));
1531 act =
main_menu->addAction(
_(
"Policies..."));
1563 act =
main_menu->addAction(
_(
"Wonders of the World"));
1572 act =
main_menu->addAction(
_(
"Demographics"));
1580 act =
main_menu->addAction(
_(
"Achievements"));
1583 act =
main_menu->addAction(
_(
"Endgame report"));
1590 act =
main_menu->addAction(
_(
"Select Battle Group 1"));
1594 act =
main_menu->addAction(
_(
"Assign Battle Group 1"));
1598 act =
main_menu->addAction(
_(
"Append to Battle Group 1"));
1602 act =
main_menu->addAction(
_(
"Select Battle Group 2"));
1606 act =
main_menu->addAction(
_(
"Assign Battle Group 2"));
1610 act =
main_menu->addAction(
_(
"Append to Battle Group 2"));
1614 act =
main_menu->addAction(
_(
"Select Battle Group 3"));
1618 act =
main_menu->addAction(
_(
"Assign Battle Group 3"));
1622 act =
main_menu->addAction(
_(
"Append to Battle Group 3"));
1626 act =
main_menu->addAction(
_(
"Select Battle Group 4"));
1630 act =
main_menu->addAction(
_(
"Assign Battle Group 4"));
1634 act =
main_menu->addAction(
_(
"Append to Battle Group 4"));
1642 QObject::connect(act, &QAction::triggered, [
this]() {
1647 QObject::connect(act, &QAction::triggered, [
this]() {
1652 QObject::connect(act, &QAction::triggered, [
this]() {
1657 QObject::connect(act, &QAction::triggered, [
this]() {
1662 QObject::connect(act, &QAction::triggered, [
this]() {
1667 QObject::connect(act, &QAction::triggered, [
this]() {
1672 QObject::connect(act, &QAction::triggered, [
this]() {
1677 QObject::connect(act, &QAction::triggered, [
this]() {
1682 QObject::connect(act, &QAction::triggered, [
this]() {
1687 QObject::connect(act, &QAction::triggered, [
this]() {
1692 QObject::connect(act, &QAction::triggered, [
this]() {
1697 QObject::connect(act, &QAction::triggered, [
this]() {
1702 QObject::connect(act, &QAction::triggered, [
this]() {
1707 QObject::connect(act, &QAction::triggered, [
this]() {
1712 QObject::connect(act, &QAction::triggered, [
this]() {
1717 QObject::connect(act, &QAction::triggered, [
this]() {
1722 QObject::connect(act, &QAction::triggered, [
this]() {
1727 QObject::connect(act, &QAction::triggered, [
this]() {
1732 QObject::connect(act, &QAction::triggered, [
this]() {
1737 QObject::connect(act, &QAction::triggered, [
this]() {
1744 QObject::connect(act, &QAction::triggered, [
this]() {
1749 QObject::connect(act, &QAction::triggered, [
this]() {
1754 QObject::connect(act, &QAction::triggered, [
this]() {
1759 QObject::connect(act, &QAction::triggered, [
this]() {
1764 QObject::connect(act, &QAction::triggered, [
this]() {
1771 QObject::connect(act, &QAction::triggered, [
this]() {
1776 QObject::connect(act, &QAction::triggered, [
this]() {
1781 QObject::connect(act, &QAction::triggered, [
this]() {
1786 for (i = 0;
i <
menus.count();
i++) {
1787 menus[
i]->setAttribute(Qt::WA_TranslucentBackground);
1810 foreach (
QAction *a,
m->actions()) {
1811 if (a->shortcut() ==
seq && a->isEnabled()) {
1812 a->activate(QAction::Trigger);
1830 gui()->mapview_wdg->menu_click =
true;
1838 foreach (
const QMenu *
m,
menus) {
1853 foreach (
QAction *a,
m->actions()) {
1854 if (a->shortcut() ==
seq &&
fcs->mouse == Qt::AllButtons) {
1874 foreach (
const QMenu *
m,
menus) {
1893 foreach (
QAction *a,
m->actions()) {
1894 if (a->shortcut() ==
seq) {
1895 *
ret = a->text() +
" ("
1896 + a->shortcut().toString(QKeySequence::NativeText) +
")";
1918 foreach (
const QMenu *
m,
menus) {
1957 .replace(
"&",
"&&"));
1958 act->setCheckable(
true);
1961 act->setChecked(
true);
1974 struct unit_list *
punits =
nullptr;
1975 bool enabled =
false;
1989 if (pextra->buildable) {
1994 .replace(
"&",
"&&"));
1997 QObject::connect(act, &QAction::triggered, [
this,
road_id]() {
2002 act->setEnabled(
true);
2005 act->setDisabled(
true);
2021 struct unit_list *
punits =
nullptr;
2022 bool enabled =
false;
2037 if (pextra->buildable) {
2042 .replace(
"&",
"&&"));
2045 QObject::connect(act, &QAction::triggered, [
this,
base_id]() {
2049 act->setEnabled(
true);
2052 act->setDisabled(
true);
2069 QMultiHash <munit, QAction *>::iterator
i;
2070 struct unit_list *
punits =
nullptr;
2076 const struct tile *ptile =
nullptr;
2088 a->setEnabled(
false);
2105 i.value()->setEnabled(
true);
2110 i.value()->setEnabled(
true);
2115 i.value()->setEnabled(
true);
2116 i.value()->setVisible(
true);
2118 i.value()->setVisible(
false);
2122 if (
gui()->is_repo_dlg_open(
"END")) {
2123 i.value()->setEnabled(
true);
2124 i.value()->setVisible(
true);
2126 i.value()->setVisible(
false);
2132 i.value()->setText(
QString(
PL_(
"Top %1 City",
"Top %1 Cities",
2136 i.value()->setText(
QString(
_(
"Top Cities")));
2182 i.value()->setEnabled(
true);
2187 i.value()->setEnabled(
true);
2193 i.value()->setEnabled(
true);
2199 i.value()->setEnabled(
true);
2205 i.value()->setEnabled(
true);
2211 i.value()->setEnabled(
true);
2217 i.value()->setEnabled(
true);
2229 if (pextra !=
nullptr) {
2234 if (pextra !=
nullptr) {
2239 .replace(
"&",
"&&"));
2241 i.value()->setText(
QString(
_(
"Build Mine")));
2244 i.value()->setText(
QString(
_(
"Build Mine")));
2251 i.value()->setEnabled(
true);
2262 if (pextra !=
nullptr) {
2267 if (pextra !=
nullptr) {
2272 .replace(
"&",
"&&"));
2274 i.value()->setText(
QString(
_(
"Build Irrigation")));
2277 i.value()->setText(
QString(
_(
"Build Irrigation")));
2284 i.value()->setEnabled(
true);
2296 .replace(
"&",
"&&"));
2298 i.value()->setText(
QString(
_(
"Cultivate")));
2301 i.value()->setText(
QString(
_(
"Cultivate")));
2307 i.value()->setEnabled(
true);
2319 .replace(
"&",
"&&"));
2321 i.value()->setText(
QString(
_(
"Plant")));
2324 i.value()->setText(
QString(
_(
"Plant")));
2330 i.value()->setEnabled(
true);
2345 .replace(
"&",
"&&"));
2347 i.value()->setText(
_(
"Transform Terrain"));
2355 i.value()->setEnabled(
true);
2361 .replace(
"&",
"&&"));
2365 .replace(
"&",
"&&"));
2374 i.value()->setEnabled(
true);
2379 if (pextra !=
nullptr) {
2384 if (pextra !=
nullptr) {
2389 .replace(
"&",
"&&"));
2396 i.value()->setEnabled(
true);
2402 i.value()->setEnabled(
true);
2408 i.value()->setEnabled(
true);
2414 i.value()->setEnabled(
true);
2420 i.value()->setEnabled(
true);
2426 i.value()->setEnabled(
true);
2428 .replace(
"&",
"&&"));
2434 i.value()->setEnabled(
true);
2440 i.value()->setEnabled(
true);
2446 i.value()->setEnabled(
true);
2452 i.value()->setEnabled(
true);
2455 i.value()->setText(
_(
"Auto Settler"));
2457 i.value()->setText(
_(
"Auto Worker"));
2462 if (
proad !=
nullptr) {
2468 i.value()->setEnabled(
true);
2474 i.value()->setEnabled(
true);
2480 if (
proad !=
nullptr) {
2486 i.value()->setEnabled(
true);
2492 if (
proad !=
nullptr) {
2498 i.value()->setEnabled(
true);
2511 i.value()->setEnabled(
true);
2519 i.value()->setEnabled(
true);
2525 i.value()->setEnabled(
true);
2532 .replace(
"&",
"&&"));
2534 i.value()->setEnabled(
true);
2540 i.value()->setEnabled(
true);
2547 .replace(
"&",
"&&"));
2549 i.value()->setEnabled(
true);
2555 i.value()->setEnabled(
true);
2561 i.value()->setEnabled(
true);
2588 if (pplayer !=
nullptr) {
2606 ::gui()->game_tab_widget->setCurrentIndex(0);
2662 if (pextra !=
nullptr) {
2691 if (
prail !=
nullptr) {
2737 if (
proad !=
nullptr) {
2893 gui()->rallies.hover_tile =
false;
2894 gui()->rallies.hover_city =
true;
2902 gui()->trade_gen.hover_city =
true;
2910 gui()->trade_gen.add_all_cities();
2918 gui()->trade_gen.calculate();
2926 gui()->trade_gen.clear_trade_planing();
2936 struct city *homecity;
2938 struct tile *dest_tile;
2944 foreach(
gilles,
gui()->trade_gen.lines) {
2946 &&
gilles.autocaravan ==
nullptr) {
2966 gui()->infotab->chtwdg->append(
_(
"Didn't find any trade route"
3059 if (
punit ==
nullptr) {
3187 if (
gui()->interface_locked) {
3192 gui()->interface_locked = !
gui()->interface_locked;
3209 for (
i = 0;
i <
lc.size(); ++
i) {
3212 for (
i = 0;
i <
lm.size(); ++
i) {
3215 for (
i = 0;
i <
lr.size(); ++
i) {
3227 gui()->apply_fullscreen();
3236 ::gui()->minimapview_wdg->show();
3238 ::gui()->minimapview_wdg->hide();
3248 gui()->qt_settings.show_new_turn_text =
true;
3250 gui()->qt_settings.show_new_turn_text =
false;
3260 gui()->qt_settings.show_battle_log =
true;
3262 gui()->qt_settings.show_battle_log =
false;
3303 gui()->map_scale =
gui()->map_scale * 1.2f;
3314 gui()->map_scale = 1.0f;
3330 gui()->map_font_scale =
true;
3336 gui()->map_font_scale =
false;
3346 gui()->map_scale =
gui()->map_scale / 1.2f;
3626 QDialog *dialog =
new QDialog(
this);
3635 sl <<
"default_tileset_overhead_name" <<
"default_tileset_iso_name"
3636 <<
"default_tileset_hex_name" <<
"default_tileset_isohex_name";
3638 dialog->setWindowTitle(
_(
"Available tilesets"));
3640 label->setText(
_(
"Some tilesets might not be compatible with current"
3642 layout->addWidget(label);
3651 but =
new QPushButton(value);
3656 dialog->setSizeGripEnabled(
true);
3657 dialog->setLayout(
layout);
3672 gui()->map_scale = 1.0f;
3673 but->parentWidget()->close();
3681 gui()->trade_gen.calculate();
3715 if (pextra->buildable && pextra->id ==
id
3731 if (pextra->buildable && pextra->id ==
id
3747 gui()->popup_client_options();
3763 gui()->pr_options->popup_server_options();
3818 path = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation);
3821 }
else if (!path.isEmpty()) {
3824 img_name = QStandardPaths::writableLocation(QStandardPaths::HomeLocation)
3829 saved->setStandardButtons(QMessageBox::Ok);
3830 saved->setDefaultButton(QMessageBox::Cancel);
3831 saved->setAttribute(Qt::WA_DeleteOnClose);
3833 saved->set_text_title(
"Image saved as:\n" +
img_name,
_(
"Success"));
3835 saved->set_text_title(
_(
"Failed to save image of the map"),
_(
"Error"));
3863 +
QString(
" (*.sav *.sav.bz2 *.sav.gz *.sav.xz)");
3864 current_file = QFileDialog::getSaveFileName(
gui()->central_wdg,
3865 _(
"Save Game As..."),
3867 if (!current_file.isEmpty()) {
3884 ask->set_text_title(
_(
"Leaving a local game will end it!"),
"Leave game");
3885 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
3886 ask->setDefaultButton(QMessageBox::Cancel);
3887 ask->setAttribute(Qt::WA_DeleteOnClose);
3889 connect(
ask, &hud_message_box::accepted, [=]() {
3891 disconnect_from_server(TRUE);
3907 ask->setIcon(QMessageBox::Warning);
3908 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Ok);
3909 ask->setDefaultButton(QMessageBox::Cancel);
3910 ask->setAttribute(Qt::WA_DeleteOnClose);
3911 return (
ask->set_text_title(
_(
"Selection will cancel current assignments!"),
3912 _(
"Confirm Disruptive Selection"),
true)
3913 == QMessageBox::Ok);
const char * action_id_name_translation(action_id act_id)
const char * action_name_translation(const struct action *paction)
enum action_sub_target_kind action_get_sub_target_kind(const struct action *paction)
bool actions_are_ready(void)
#define action_noninternal_iterate_end
static struct action * action_by_number(action_id act_id)
#define action_id_get_actor_kind(act_id)
#define action_noninternal_iterate(_act_)
#define action_id_get_target_kind(act_id)
#define action_id_has_complex_target(act_id)
bool actres_removes_extra(enum action_result result, const struct extra_type *pextra)
bool actres_creates_extra(enum action_result result, const struct extra_type *pextra)
void output_window_append(const struct ft_color color, const char *featured_text)
struct city * create_city_virtual(struct player *pplayer, struct tile *ptile, const char *name)
void destroy_city_virtual(struct city *pcity)
static bool is_non_allied_city_tile(const struct tile *ptile, const struct player *pplayer)
#define city_list_iterate(citylist, pcity)
#define city_tile(_pcity_)
#define city_list_iterate_end
static fc_font * instance()
QFont * get_font(QString name)
static fc_shortcuts * sc()
fc_shortcut * get_shortcut(shortcut_id id)
static qdef_act * action()
QList< qfc_delayed_unit_item * > unit_list
void add(qfc_delayed_unit_item *fui)
QList< struct city * > pos_cities
QList< struct city * > new_tr_cities
trade_city(struct city *pcity)
QList< struct city * > curr_tr_cities
void calculate_inner(trade_city *tc)
bool discard_one(trade_city *tc)
void add_city(struct city *pcity)
void find_certain_routes()
QList< trade_city * > cities
void find_certain_routes_inner(trade_city *tc)
trade_city * find_most_free()
void discard_trade(trade_city *tc1, trade_city *tc2)
void add_tile(struct tile *ptile)
void remove_virtual_city(struct tile *ptile)
void clear_trade_planing()
void remove_city(struct city *pcity)
bool discard_any(trade_city *tc, int freeroutes)
void check_if_done(trade_city *tc1, trade_city *tc2)
QList< struct city * > virtual_cities
int find_over_max(struct city *pcity)
bool client_is_observer(void)
enum client_states client_state(void)
bool is_waiting_turn_change(void)
void send_report_request(enum report_type type)
bool can_client_issue_orders(void)
bool client_has_player(void)
bool can_units_do_connect(struct unit_list *punits, enum unit_activity activity, struct extra_type *tgt)
void disconnect_from_server(bool leaving_sound)
@ REPORT_WONDERS_OF_THE_WORLD_LONG
void send_save_game(const char *filename)
bool is_server_running(void)
bool can_client_access_hack(void)
void key_unit_sentry(void)
void request_unit_airlift(struct unit *punit, struct city *pcity)
void key_city_output_toggle(void)
void request_unit_return(struct unit *punit)
void request_unit_caravan_action(struct unit *punit, action_id action)
void key_unit_auto_explore(void)
void key_unit_connect(enum unit_activity activity, struct extra_type *tgt)
void key_city_full_bar_toggle(void)
void key_map_native_toggle(void)
void request_unit_goto(enum unit_orders last_order, action_id act_id, int sub_tgt_id)
void key_unit_paradrop(void)
struct unit_list * get_units_in_focus(void)
void request_center_focus_unit(void)
void key_city_productions_toggle(void)
void key_unit_plant(void)
void key_unit_fortress(void)
void key_unit_pillage(void)
void request_unit_unload(struct unit *pcargo)
void request_new_unit_activity_targeted(struct unit *punit, enum unit_activity act, struct extra_type *tgt)
void key_unit_irrigate(void)
void request_unit_build_city(struct unit *punit)
void key_unit_unload_all(void)
void key_city_outlines_toggle(void)
void key_unit_homecity(void)
void set_hover_state(struct unit_list *punits, enum cursor_hover_state state, enum unit_activity activity, struct extra_type *tgt, int last_tgt, int last_sub_tgt, action_id action, enum unit_orders order)
void key_unit_patrol(void)
void key_unit_wakeup_others(void)
enum cursor_hover_state hover_state
void key_unit_stack_size_toggle(void)
void key_unit_select_battlegroup(int battlegroup, bool append)
void key_map_grid_toggle(void)
struct unit * head_of_units_in_focus(void)
void key_city_growth_toggle(void)
void key_unit_action_select_tgt(void)
void key_city_buycost_toggle(void)
int get_num_units_in_focus(void)
void key_unit_transform(void)
void request_move_unit_direction(struct unit *punit, int dir)
void key_city_trade_routes_toggle(void)
void key_city_names_toggle(void)
void request_unit_select(struct unit_list *punits, enum unit_select_type_mode seltype, enum unit_select_location_mode selloc)
void key_unit_auto_work(void)
void key_unit_airbase(void)
void control_mouse_cursor(struct tile *ptile)
void key_unit_convert(void)
void key_unit_fortify(void)
void key_unit_assign_battlegroup(int battlegroup, bool append)
void key_unit_cultivate(void)
void key_map_borders_toggle(void)
#define can_unit_do_activity_targeted_client(_punit_, _act_, _tgt_)
#define can_units_do_activity_targeted_client(_punits_, _act_, _tgt_)
#define can_units_do_activity_client(_punits_, _act_)
bool qtg_request_transport(struct unit *pcargo, struct tile *ptile)
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
int get_city_bonus(const struct city *pcity, enum effect_type effect_type)
#define PL_(String1, String2, n)
const struct ft_color ftc_client
const char * city_link(const struct city *pcity)
struct city * game_city_by_number(int id)
struct tile * tile_before_end_path(struct unit *punit, struct tile *ptile)
bool send_attack_tile(struct unit *punit, struct tile *ptile)
bool send_goto_tile(struct unit *punit, struct tile *ptile)
void enter_goto_state(struct unit_list *punits)
const char * government_name_translation(const struct government *pgovern)
bool untargeted_revolution_allowed(void)
Government_type_id government_count(void)
struct government * government_by_number(const Government_type_id gov)
bool can_change_to_government(struct player *pplayer, const struct government *gov)
static PangoLayout * layout
void city_report_dialog_popup(bool raise)
void popup_upgrade_dialog(struct unit_list *punits)
void popup_disband_dialog(struct unit_list *punits)
void popup_multiplier_dialog(void)
void popup_rates_dialog(void)
void popup_goto_dialog(void)
void popup_quit_dialog(void)
void popup_help_dialog_typed(const char *item, enum help_page_type htype)
void create_line_at_mouse_pos(void)
void update_city_descriptions(void)
void popup_messageopt_dialog(void)
void popup_players_dialog(bool raise)
void economy_report_dialog_popup(bool raise)
void popup_spaceship_dialog(struct player *pplayer)
void popup_revolution_dialog(void)
#define HELP_MUSICSET_ITEM
#define HELP_TERRAIN_ITEM
#define HELP_LANGUAGES_ITEM
#define HELP_CONNECTING_ITEM
#define HELP_TILESET_ITEM
#define HELP_CHATLINE_ITEM
#define HELP_RULESET_ITEM
#define HELP_GOVERNMENT_ITEM
#define HELP_PLAYING_ITEM
#define HELP_IMPROVEMENTS_ITEM
#define HELP_WORKLIST_EDITOR_ITEM
#define HELP_WONDERS_ITEM
#define HELP_SPACE_RACE_ITEM
#define HELP_COPYING_ITEM
#define HELP_OVERVIEW_ITEM
#define HELP_NATIONS_ITEM
#define HELP_DIPLOMACY_ITEM
#define HELP_ECONOMY_ITEM
#define HELP_CONTROLS_ITEM
Impr_type_id improvement_number(const struct impr_type *pimprove)
const char * improvement_name_translation(const struct impr_type *pimprove)
#define improvement_iterate_end
#define improvement_iterate(_p)
#define fc_assert(condition)
int get_direction_for_step(const struct civ_map *nmap, const struct tile *start_tile, const struct tile *end_tile)
bool is_tiles_adjacent(const struct tile *tile0, const struct tile *tile1)
struct terrain_misc terrain_control
bool map_canvas_resized(int width, int height)
Multiplier_type_id multiplier_count(void)
const char *const city_productions
const char *const city_names
const char * nation_plural_for_player(const struct player *pplayer)
const struct option_set * client_optset
void options_save(option_save_log_callback log_cb)
struct client_options gui_options
struct option * optset_option_by_name(const struct option_set *poptset, const char *name)
struct city_list * cities
void popup_shortcuts_dialog()
void toggle_units_report(bool)
#define players_iterate_end
#define players_iterate(_pplayer)
void qtg_science_report_dialog_popup(bool raise)
void popup_endgame_report()
struct extra_type * road_extra_get(const struct road_type *proad)
struct road_type * road_by_gui_type(enum road_gui_type gui_type)
const struct strvec * get_save_dirs(void)
void array_shuffle(int *array, int n)
char * freeciv_storage_dir(void)
QString shortcut_to_string(fc_shortcut *sc)
#define strvec_iterate(psv, str)
#define strvec_iterate_end
struct civ_game::@32::@35 client
struct packet_game_info info
struct government * government_during_revolution
bool draw_city_productions
bool draw_unit_stack_size
bool draw_city_trade_routes
bool unit_selection_clears_orders
bool save_options_on_exit
struct city_list * cities
struct terrain * cultivate_result
struct terrain * plant_result
struct terrain * transform_result
const struct unit_type * utype
int fc_snprintf(char *str, size_t n, const char *format,...)
const char * advance_name_translation(const struct advance *padvance)
Tech_type_id advance_number(const struct advance *padvance)
#define advance_iterate(_p)
#define advance_iterate_end
void tile_virtual_destroy(struct tile *vtile)
bool tile_apply_activity(struct tile *ptile, Activity_type_id act, struct extra_type *tgt)
struct tile * tile_virtual_new(const struct tile *ptile)
const char * tile_get_info_text(const struct tile *ptile, bool include_nuisances, int linebreaks)
struct city * tile_city(const struct tile *ptile)
#define tile_terrain(_tile)
struct sprite * get_government_sprite(const struct tileset *t, const struct government *gov)
int tileset_hex_width(const struct tileset *t)
const struct strvec * get_tileset_list(const struct option *poption)
bool tileset_is_isometric(const struct tileset *t)
const char * tileset_basename(const struct tileset *t)
int tileset_tile_height(const struct tileset *t)
int tileset_tile_width(const struct tileset *t)
bool tilespec_reread(const char *new_tileset_name, bool game_fully_initialized, float scale)
int city_num_trade_routes(const struct city *pcity)
unsigned max_trade_routes(const struct city *pcity)
bool can_establish_trade_route(const struct city *pc1, const struct city *pc2, int priority)
bool have_cities_trade_route(const struct city *pc1, const struct city *pc2)
#define GOODS_HIGH_PRIORITY
bool unit_can_est_trade_route_here(const struct unit *punit)
bool unit_can_add_or_build_city(const struct civ_map *nmap, const struct unit *punit)
bool can_unit_change_homecity(const struct civ_map *nmap, const struct unit *punit)
bool unit_contained_in(const struct unit *pcargo, const struct unit *ptrans)
bool can_unit_do_autoworker(const struct unit *punit)
bool can_unit_paradrop(const struct civ_map *nmap, const struct unit *punit)
bool unit_can_help_build_wonder_here(const struct civ_map *nmap, const struct unit *punit)
bool units_can_convert(const struct civ_map *nmap, const struct unit_list *punits)
bool units_are_occupied(const struct unit_list *punits)
bool units_can_unload(const struct civ_map *nmap, const struct unit_list *punits)
bool can_units_do_base_gui(const struct unit_list *punits, enum base_gui_type base_gui)
bool units_contain_cityfounder(const struct unit_list *punits)
bool can_units_do_any_road(const struct civ_map *nmap, const struct unit_list *punits)
struct unit * unit_list_find(const struct unit_list *punitlist, int unit_id)
bool units_can_upgrade(const struct civ_map *nmap, const struct unit_list *punits)
bool units_have_activity_on_tile(const struct unit_list *punits, enum unit_activity activity)
bool units_have_type_flag(const struct unit_list *punits, enum unit_type_flag_id flag, bool has_flag)
bool can_units_do(const struct unit_list *punits, bool(can_fn)(const struct unit *punit))
bool units_can_do_action(const struct unit_list *punits, action_id act_id, bool can_do)
bool units_can_load(const struct unit_list *punits)
bool can_units_do_on_map(const struct civ_map *nmap, const struct unit_list *punits, bool(can_fn)(const struct civ_map *nmap, const struct unit *punit))
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
const struct unit_type * unit_type_get(const struct unit *punit)
struct unit_type * utype_by_number(const Unit_type_id id)
Unit_type_id utype_index(const struct unit_type *punittype)
bool can_player_build_unit_now(const struct player *p, const struct unit_type *punittype)
const char * utype_name_translation(const struct unit_type *punittype)
bool utype_can_do_action(const struct unit_type *putype, const action_id act_id)
#define unit_type_iterate(_p)
#define unit_type_iterate_end
#define MAP_NATIVE_HEIGHT