43 : m_city(city_id), m_improvement(improvement_id), m_parent(parent)
70 QString(
PL_(
"Sell %1 for %2 gold?",
"Sell %1 for %2 gold?", price))
72 QString::number(price));
75 ask->setAttribute(Qt::WA_DeleteOnClose);
77 ask->set_text_title(buf, (
_(
"Sell Improvement?")));
78 ask->setStandardButtons(QMessageBox::Cancel | QMessageBox::Yes);
79 ask->setDefaultButton(QMessageBox::Cancel);
80 ask->button(QMessageBox::Yes)->setText(
_(
"Yes Sell"));
83 QObject::connect(ask, &hud_message_box::accepted, [=] {
107 menu->addAction(
_(
"Sell Improvement"),
const char * city_improvement_name_translation(const struct city *pcity, const struct impr_type *pimprove)
Return the extended name of the building.
int city_sell_improvement(struct city *pcity, Impr_type_id sell_id)
Change the production of a given city.
void operator()()
Asks for confirmation then sells the improvement.
improvement_seller(QWidget *parent, int city_id, int improvement_id)
Constructor.
static QAction * add_to_menu(QWidget *parent, QMenu *menu, const city *city, int improvement_id)
Adds a menu item to sell an improvement in a city.
bool can_client_issue_orders()
Returns TRUE iff the client can issue orders (such as giving unit commands).
#define PL_(String1, String2, n)
struct city * game_city_by_number(int id)
Often used function to get a city pointer from a city ID.
int impr_sell_gold(const struct impr_type *pimprove)
Returns the amount of gold received when this improvement is sold.
struct impr_type * improvement_by_number(const Impr_type_id id)
Returns the improvement type for the given index/ID.
enum test_result test_player_sell_building_now(struct player *pplayer, const city *pcity, const struct impr_type *pimprove)
Return TRUE iff the player can sell the given improvement from city.
#define fc_assert_ret(condition)
#define fc_assert_ret_val(condition, val)