26 #define ERR_G LOG_STREAM(err, lg::general())
27 #define WRN_G LOG_STREAM(warn, lg::general())
28 #define LOG_G LOG_STREAM(info, lg::general())
29 #define DBG_G LOG_STREAM(debug, lg::general())
38 minimap_image_overlay_(),
51 height_adjust_set_(false),
54 light_modification_(0),
58 income_description_(),
59 income_description_ally_(),
60 income_description_enemy_(),
61 income_description_own_(),
70 hide_in_editor_(false),
71 hide_if_impassable_(false)
75 icon_image_(cfg[
"icon_image"]),
76 minimap_image_(cfg[
"symbol_image"]),
77 minimap_image_overlay_(),
78 editor_image_(cfg[
"editor_image"].empty() ?
"terrain/" + minimap_image_ +
".png" :
"terrain/" + cfg[
"editor_image"].str() +
".png"),
80 name_(cfg[
"name"].t_str()),
81 editor_name_(cfg[
"editor_name"].t_str()),
82 description_(cfg[
"description"].t_str()),
83 help_topic_text_(cfg[
"help_topic_text"].t_str()),
89 height_adjust_(cfg[
"unit_height_adjust"]),
90 height_adjust_set_(!cfg[
"unit_height_adjust"].empty()),
91 submerge_(cfg[
"submerge"].to_double()),
92 submerge_set_(!cfg[
"submerge"].empty()),
93 light_modification_(cfg[
"light"]),
94 max_light_(cfg[
"max_light"].to_int(light_modification_)),
95 min_light_(cfg[
"min_light"].to_int(light_modification_)),
97 income_description_(),
98 income_description_ally_(),
99 income_description_enemy_(),
100 income_description_own_(),
101 editor_group_(cfg[
"editor_group"]),
102 village_(cfg[
"gives_income"].to_bool()),
103 castle_(cfg[
"recruit_onto"].to_bool()),
104 keep_(cfg[
"recruit_from"].to_bool()),
108 hide_help_(cfg[
"hide_help"].to_bool(false)),
109 hide_in_editor_(cfg[
"hidden"].to_bool(false)),
110 hide_if_impassable_(cfg[
"hide_if_impassable"].to_bool(false))
149 if(!mvt_alias.empty()) {
154 if(!def_alias.empty()) {
159 if(!vision_alias.empty()) {
210 minimap_image_(base.minimap_image_),
211 minimap_image_overlay_(
overlay.minimap_image_),
212 editor_image_(base.editor_image_ +
"~BLIT(" +
overlay.editor_image_ +
")"),
215 editor_name_((base.editor_name_.empty() ? base.name_ : base.editor_name_) +
" / " + (
overlay.editor_name_.empty() ?
overlay.name_ :
overlay.editor_name_)),
216 description_(
overlay.description()),
220 vision_type_(
overlay.vision_type_),
223 height_adjust_(base.height_adjust_),
224 height_adjust_set_(base.height_adjust_set_),
225 submerge_(base.submerge_),
226 submerge_set_(base.submerge_set_),
227 light_modification_(base.light_modification_ +
overlay.light_modification_),
228 max_light_(std::max(base.max_light_,
overlay.max_light_)),
229 min_light_(std::min(base.min_light_,
overlay.min_light_)),
230 heals_(std::max<int>(base.heals_,
overlay.heals_)),
231 income_description_(),
232 income_description_ally_(),
233 income_description_enemy_(),
234 income_description_own_(),
236 village_(base.village_ ||
overlay.village_),
237 castle_(base.castle_ ||
overlay.castle_),
238 keep_(base.keep_ ||
overlay.keep_),
241 editor_default_base_(),
243 hide_in_editor_(base.hide_in_editor_ ||
overlay.hide_in_editor_),
244 hide_if_impassable_(base.hide_if_impassable_ ||
overlay.hide_if_impassable_)
250 if(
overlay.height_adjust_set_) {
341 for(
i = first.begin();
i != first.end(); ++
i) {
371 first.insert(insert_it, second.begin(), second.end());
A config object defines a single node in a WML file, with access to child nodes.
std::string base_str() const
t_string income_description_
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_
t_translation::terrain_code terrain_with_default_base() const
t_translation::ter_list mvt_type_
std::string minimap_image_overlay_
t_translation::terrain_code number_
t_string income_description_ally_
t_translation::ter_list union_type_
t_translation::ter_list def_type_
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.
t_string income_description_own_
t_translation::ter_list vision_type_
t_string income_description_enemy_
bool operator==(const terrain_type &other) const
Returns true if all most of the data matches.
std::string deprecated_message(const std::string &elem_name, DEP_LEVEL level, const version_info &version, const std::string &detail)
Interfaces for manipulating version numbers of engine, add-ons, etc.
static std::string _(const char *str)
Standard logging facilities (interface).
void remove()
Removes a tip.
terrain_code read_terrain_code(std::string_view str, const ter_layer filler)
Reads a single terrain from a string.
const terrain_code VOID_TERRAIN
VOID_TERRAIN is used for shrouded hexes.
std::vector< terrain_code > ter_list
ter_list read_list(std::string_view str, const ter_layer filler)
Reads a list of terrains from a string, when reading the.
std::string write_terrain_code(const terrain_code &tcode)
Writes a single terrain code to a string.
const terrain_code NONE_TERRAIN
std::string::const_iterator iterator
A terrain string which is converted to a terrain is a string with 1 or 2 layers the layers are separa...
void merge_alias_lists(t_translation::ter_list &first, const t_translation::ter_list &second)
Insert second vector into first when the terrain _ref^base is encountered.
static lg::log_domain log_config("config")
std::string missing_mandatory_wml_key(const std::string §ion, const std::string &key, const std::string &primary_key, const std::string &primary_value)
Returns a standard message for a missing wml key.
#define VALIDATE(cond, message)
The macro to use for the validation of WML.