Freeciv21
Develop your civilization from humble roots to a global empire
text.h
Go to the documentation of this file.
1 /**************************************************************************
2  Copyright (c) 1996-2020 Freeciv21 and Freeciv contributors. This file is
3  __ __ part of Freeciv21. Freeciv21 is free software: you can
4 / \\..// \ redistribute it and/or modify it under the terms of the GNU
5  ( oo ) General Public License as published by the Free Software
6  \__/ Foundation, either version 3 of the License, or (at your
7  option) any later version. You should have received
8  a copy of the GNU General Public License along with Freeciv21. If not,
9  see https://www.gnu.org/licenses/.
10 **************************************************************************/
11 #pragma once
12 
13 #include "fc_types.h"
14 
15 #include <QString>
16 
17 #include <vector>
18 
19 struct player_spaceship;
20 
21 /****************************************************************************
22  These functions return static strings with generally useful text.
23 ****************************************************************************/
24 const QString get_tile_output_text(const struct tile *ptile);
25 const QString popup_info_text(struct tile *ptile);
26 const QString get_nearest_city_text(struct city *pcity, int sq_dist);
27 const QString unit_description(const unit *punit);
28 const QString get_airlift_text(const std::vector<unit *> &units,
29  const struct city *pdest);
30 const QString science_dialog_text();
31 const QString get_science_target_text();
32 const QString get_science_goal_text(Tech_type_id goal);
33 const QString get_info_label_text(bool moreinfo);
34 const QString get_info_label_text_popup();
35 bool get_units_upgrade_info(char *buf, size_t bufsz,
36  const std::vector<unit *> &punits);
37 const QString get_spaceship_descr(struct player_spaceship *pship);
38 QString get_score_text(const struct player *pplayer);
39 
40 const QString get_act_sel_action_custom_text(struct action *paction,
41  const struct act_prob prob,
42  const struct unit *actor_unit,
43  const struct city *target_city);
44 const QString act_sel_action_tool_tip(const struct action *paction,
45  const struct act_prob prob);
46 
47 QString text_happiness_buildings(const struct city *pcity);
48 QString text_happiness_nationality(const struct city *pcity);
49 QString text_happiness_cities(const struct city *pcity);
50 QString text_happiness_luxuries(const struct city *pcity);
51 QString text_happiness_units(const struct city *pcity);
52 QString text_happiness_wonders(const struct city *pcity);
53 int get_bulbs_per_turn(int *pours, bool *pteam, int *ptheirs);
54 int turns_to_research_done(const struct research *presearch, int per_turn);
int Tech_type_id
Definition: fc_types.h:294
Definition: city.h:291
Definition: player.h:231
Definition: tile.h:42
Definition: unit.h:134
QString text_happiness_wonders(const struct city *pcity)
Describing wonders that affect happiness.
Definition: text.cpp:1490
QString get_score_text(const struct player *pplayer)
Return text giving the score of the player.
Definition: text.cpp:1256
const QString get_nearest_city_text(struct city *pcity, int sq_dist)
Returns the text describing the city and its distance.
Definition: text.cpp:522
const QString science_dialog_text()
Returns the text to display in the science dialog.
Definition: text.cpp:812
const QString get_act_sel_action_custom_text(struct action *paction, const struct act_prob prob, const struct unit *actor_unit, const struct city *target_city)
Returns custom part of the action selection dialog button text for the specified action (given that t...
Definition: text.cpp:1274
const QString get_science_target_text()
Get the short science-target text.
Definition: text.cpp:887
const QString unit_description(const unit *punit)
Returns the unit description.
Definition: text.cpp:551
int get_bulbs_per_turn(int *pours, bool *pteam, int *ptheirs)
Return total expected bulbs.
Definition: text.cpp:714
const QString act_sel_action_tool_tip(const struct action *paction, const struct act_prob prob)
Get information about starting the action in the current situation.
Definition: text.cpp:1333
QString text_happiness_luxuries(const struct city *pcity)
Describing luxuries that affect happiness.
Definition: text.cpp:1949
const QString popup_info_text(struct tile *ptile)
Text to popup on a middle-click in the mapview.
Definition: text.cpp:137
QString text_happiness_cities(const struct city *pcity)
Describing city factors that affect happiness.
Definition: text.cpp:1754
QString text_happiness_buildings(const struct city *pcity)
Describe buildings that affect happiness (or rather, anything with a Make_Content effect).
Definition: text.cpp:1389
bool get_units_upgrade_info(char *buf, size_t bufsz, const std::vector< unit * > &punits)
Return text about upgrading these unit lists.
Definition: text.cpp:1132
const QString get_spaceship_descr(struct player_spaceship *pship)
Returns a description of the given spaceship.
Definition: text.cpp:1197
const QString get_info_label_text_popup()
Return the text for the popup label on the info panel.
Definition: text.cpp:1036
const QString get_tile_output_text(const struct tile *ptile)
Return a (static) string with a tile's food/prod/trade.
Definition: text.cpp:52
QString text_happiness_nationality(const struct city *pcity)
Describing nationality effects that affect happiness.
Definition: text.cpp:1427
int turns_to_research_done(const struct research *presearch, int per_turn)
Return turns until research complete.
Definition: text.cpp:761
const QString get_info_label_text(bool moreinfo)
Return the text for the label on the info panel.
Definition: text.cpp:981
const QString get_science_goal_text(Tech_type_id goal)
Set the science-goal-label text as if we're researching the given goal.
Definition: text.cpp:927
QString text_happiness_units(const struct city *pcity)
Describe units that affect happiness.
Definition: text.cpp:1811
const QString get_airlift_text(const std::vector< unit * > &units, const struct city *pdest)
Describe the airlift capacity of a city for the given units (from their current positions).
Definition: text.cpp:612