Freeciv-3.3: /fast/freeciv/nightly/main/client/repodlgs_common.c File Reference

Freeciv-3.3

Loading...
Searching...
No Matches
Functions
repodlgs_common.c File Reference
`#include "fcintl.h"`
`#include "log.h"`
`#include "mem.h"`
`#include "support.h"`
`#include "game.h"`
`#include "government.h"`
`#include "unitlist.h"`
`#include "repodlgs_g.h"`
`#include "client_main.h"`
`#include "connectdlg_common.h"`
`#include "control.h"`
`#include "options.h"`
`#include <packhand_gen.h>`
`#include "repodlgs_common.h"`

Go to the source code of this file.

## Functions

void | get_economy_report_data (struct improvement_entry *entries, int *num_entries_used, int *total_cost, int *total_income)
void | get_economy_report_units_data (struct unit_entry *entries, int *num_entries_used, int *total_cost)
void | sell_all_improvements (const struct impr_type *pimprove, bool redundant_only, char *message, size_t message_sz)
void | disband_all_units (const struct unit_type *punittype, bool in_cities_only, char *message, size_t message_sz)

## Function Documentation

## ◆ disband_all_units()

void disband_all_units | ( | const struct unit_type * | punittype,
|  | bool | in_cities_only,
|  | char * | message,
|  | size_t | message_sz
| ) |  |

Disband all supported units of the given type. If in_cities_only is specified then only units inside our cities will be disbanded.

The "message" string will be filled with a GUI-friendly message about what was sold.

Definition at line 200 of file repodlgs_common.c.

Referenced by eco_report::disband_units(), and economy_report_command_callback().

## ◆ get_economy_report_data()

void get_economy_report_data | ( | struct improvement_entry * | entries,
|  | int * | num_entries_used,
|  | int * | total_cost,
|  | int * | total_income
| ) |  |

Fills out the array of struct improvement_entry given by entries. The array must be able to hold at least B_LAST entries.

Definition at line 46 of file repodlgs_common.c.

Referenced by economy_report_dialog_popup(), economy_report_update(), real_economy_report_dialog_update(), eco_report::update_report(), and fc_client::update_sidebar_tooltips().

## ◆ get_economy_report_units_data()

void get_economy_report_units_data | ( | struct unit_entry * | entries,
|  | int * | num_entries_used,
|  | int * | total_cost
| ) |  |

Returns an array of units with gold_upkeep. Number of units in the array is added to num_entries_used.

Definition at line 105 of file repodlgs_common.c.

Referenced by economy_report_update(), eco_report::update_report(), and fc_client::update_sidebar_tooltips().

## ◆ sell_all_improvements()

void sell_all_improvements | ( | const struct impr_type * | pimprove,
|  | bool | redundant_only,
|  | char * | message,
|  | size_t | message_sz
| ) |  |

Sell all improvements of the given type in all cities. If "redundant_only" is specified then only those improvements that are replaced will be sold.

The "message" string will be filled with a GUI-friendly message about what was sold.

Definition at line 160 of file repodlgs_common.c.

Referenced by economy_report_command_callback(), eco_report::sell_buildings(), and eco_report::sell_redundant().