52 const std::string&
id()
const {
return id_; }
101 return (underlying.empty()
102 || (underlying.size() == 1 && underlying.front() ==
id));
A config object defines a single node in a WML file, with access to child nodes.
const std::string & editor_group() const
bool has_default_base() const
bool hide_help() const
For instances created from a [terrain_type] tag, the value in the tag (with default false).
const t_string & income_description_enemy() const
const std::string & minimap_image() const
const std::string & icon_image() const
t_string income_description_
const t_translation::ter_list & vision_type() const
const t_string & income_description() const
const t_string & name() const
std::string editor_image_
The image used in the editor palette if not defined in WML it will be initialized with the value of m...
t_translation::terrain_code editor_default_base_
bool is_combined() const
True for instances created by the terrain_code(base, overlay) constructor.
int unit_height_adjust() const
t_translation::terrain_code terrain_with_default_base() const
Return the overlay part of this terrain, on the default_base().
const std::string & editor_image() const
t_translation::ter_list mvt_type_
bool is_nonnull() const
True if this object represents some sentinel values.
std::string minimap_image_overlay_
const t_string & income_description_ally() const
t_string help_topic_text_
t_translation::terrain_code number_
t_string income_description_ally_
std::string icon_image_
The image used as symbol icon.
const std::string & id() const
bool is_mvt_indivisible() const
t_translation::ter_list union_type_
t_translation::ter_list def_type_
void set_editor_group(const std::string &str)
const t_string & description() const
std::string minimap_image_
The image used in the minimap.
terrain_type()
Creates an instance for which is_nonnull() returns false.
const t_string & help_topic_text() const
std::string editor_group_
const t_translation::ter_list & def_type() const
const t_translation::ter_list & mvt_type() const
The underlying type of the terrain.
double unit_submerge() const
int light_bonus(int base) const
Returns the light (lawful) bonus for this terrain when the time of day gives a base bonus.
t_string income_description_own_
bool hide_if_impassable() const
t_translation::ter_list vision_type_
const t_translation::ter_list & union_type() const
static bool is_indivisible(t_translation::terrain_code id, const t_translation::ter_list &underlying)
Returns true if a terrain has no underlying types other than itself, in respect of either union,...
const t_string & editor_name() const
int gives_healing() const
t_translation::terrain_code default_base() const
Overlay terrains defined by a [terrain_type] can declare a fallback base terrain, for use when the ov...
const t_string & income_description_own() const
bool hide_in_editor() const
t_string income_description_enemy_
const std::string & minimap_image_overlay() const
bool is_indivisible() const
Returns true if this terrain has no underlying types other than itself.
t_translation::terrain_code number() const
bool operator==(const terrain_type &other) const
Returns true if most of the data matches.
Definitions for the interface to Wesnoth Markup Language (WML).
General math utility functions.
constexpr int bounded_add(int base, int increment, int max_sum, int min_sum=0)
Returns base + increment, but will not increase base above max_sum, nor decrease it below min_sum.
const terrain_code VOID_TERRAIN
VOID_TERRAIN is used for shrouded hexes.
std::vector< terrain_code > ter_list
const terrain_code NONE_TERRAIN
A terrain string which is converted to a terrain is a string with 1 or 2 layers the layers are separa...