23 s <<
c.r <<
"," <<
c.g <<
"," <<
c.b;
28 : lawful_bonus(cfg[
"lawful_bonus"].to_int())
31 , name(cfg[
"name"].t_str())
32 , description(cfg[
"description"].t_str())
34 , image_mask(cfg[
"mask"])
35 , color(cfg[
"red"].to_int(), cfg[
"green"].to_int(), cfg[
"blue"].to_int())
36 , sounds(cfg[
"sound"])
44 , name(
N_(
"Stub Time of Day"))
45 , description(
N_(
"This Time of Day is only a Stub!"))
66 cfg[
"sound"].write_if_not_empty(
sounds);
72 times.emplace_back(
t);
A config object defines a single node in a WML file, with access to child nodes.
child_itors child_range(config_key_type key)
Definitions for the interface to Wesnoth Markup Language (WML).
std::string id
Text to match against addon_info.tags()
Functions to load and save images from/to disk.
static void parse_times(const config &cfg, std::vector< time_of_day > &normal_times)
Parse config and add time of day entries into passed vector.
tod_color color
The color modifications that should be made to the game board to reflect the time of day.
int lawful_bonus
The % bonus lawful units receive.
void write(config &cfg, const std::string &textdomain="") const
std::string image
The image to be displayed in the game status.
time_of_day()
A default-constructed time of day object shouldn't really be used so this only loads some null values...
std::string sounds
List of "ambient" sounds associated with this time_of_day, Played at the beginning of turn.
std::string image_mask
The image that is to be laid over all images while this time of day lasts.
Small struct to store and manipulate ToD color adjusts.
static map_location::direction s
std::ostream & operator<<(std::ostream &s, const tod_color &c)