Object which defines a time of day with associated bonuses, image, sounds etc. More...
#include <time_of_day.hpp>
Public Member Functions | |
time_of_day () | |
A default-constructed time of day object shouldn't really be used so this only loads some null values. More... | |
time_of_day (const config &cfg) | |
Construct a time of day from config. More... | |
bool | operator== (const time_of_day &o) const |
void | write (config &cfg, std::string textdomain="") const |
Static Public Member Functions | |
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. More... | |
Public Attributes | |
int | lawful_bonus |
The % bonus lawful units receive. More... | |
int | bonus_modified |
std::string | image |
The image to be displayed in the game status. More... | |
t_string | name |
t_string | description |
std::string | id |
std::string | image_mask |
The image that is to be laid over all images while this time of day lasts. More... | |
tod_color | color |
The color modifications that should be made to the game board to reflect the time of day. More... | |
std::string | sounds |
List of "ambient" sounds associated with this time_of_day, Played at the beginning of turn. More... | |
Object which defines a time of day with associated bonuses, image, sounds etc.
Definition at line 56 of file time_of_day.hpp.
time_of_day::time_of_day | ( | ) |
A default-constructed time of day object shouldn't really be used so this only loads some null values.
Ideally, there should be getters for properties that would emit a warning when such an object is actually used, but it does not seem necessary at the moment.
Definition at line 40 of file time_of_day.cpp.
|
explicit |
Construct a time of day from config.
Definition at line 27 of file time_of_day.cpp.
|
inline |
Definition at line 69 of file time_of_day.hpp.
References bonus_modified, id, image, image_mask, lawful_bonus, name, and sounds.
|
static |
Parse config and add time of day entries into passed vector.
Definition at line 69 of file time_of_day.cpp.
References config::child_range(), and t.
Referenced by tod_manager::add_time_area(), tod_manager::replace_schedule(), and tod_manager::tod_manager().
void time_of_day::write | ( | config & | cfg, |
std::string | textdomain = "" |
||
) | const |
Definition at line 53 of file time_of_day.cpp.
References tod_color::b, color, description, config::empty(), tod_color::g, id, image, image_mask, lawful_bonus, name, tod_color::r, and sounds.
Referenced by tod_manager::to_config().
int time_of_day::bonus_modified |
Definition at line 84 of file time_of_day.hpp.
Referenced by tod_manager::get_illuminated_time_of_day(), luaW_push_tod(), operator==(), time_of_day_at(), and unit_box_at().
tod_color time_of_day::color |
The color modifications that should be made to the game board to reflect the time of day.
Definition at line 102 of file time_of_day.hpp.
Referenced by gui2::dialogs::custom_tod::color_slider_callback(), display::draw_overlays_at(), display::get_terrain_images(), luaW_push_tod(), unit_box_at(), gui2::dialogs::custom_tod::update_selected_tod_info(), display::update_tod(), and write().
t_string time_of_day::description |
Definition at line 89 of file time_of_day.hpp.
Referenced by gui2::dialogs::custom_tod::update_selected_tod_info(), and write().
std::string time_of_day::id |
Definition at line 90 of file time_of_day.hpp.
Referenced by display::draw_hex(), ai::readonly_context_impl::is_active(), luaW_push_tod(), terrain_filter::match_internal(), operator==(), time_of_day_at(), tod_manager::to_config(), gui2::dialogs::custom_tod::update_selected_tod_info(), and write().
std::string time_of_day::image |
The image to be displayed in the game status.
Definition at line 87 of file time_of_day.hpp.
Referenced by luaW_push_tod(), operator==(), time_of_day_at(), gui2::dialogs::tod_getter_image(), unit_box_at(), gui2::dialogs::custom_tod::update_selected_tod_info(), and write().
std::string time_of_day::image_mask |
The image that is to be laid over all images while this time of day lasts.
Definition at line 96 of file time_of_day.hpp.
Referenced by display::draw_hex(), luaW_push_tod(), game_display::new_turn(), operator==(), gui2::dialogs::tod_getter_mask(), gui2::dialogs::custom_tod::update_selected_tod_info(), and write().
int time_of_day::lawful_bonus |
The % bonus lawful units receive.
Chaotics receive -lawful_bonus.
Definition at line 83 of file time_of_day.hpp.
Referenced by combat_modifier(), wfl::gamestate::DEFINE_WFL_FUNCTION(), tod_manager::get_illuminated_time_of_day(), luaW_push_tod(), terrain_filter::match_internal(), operator==(), ai::readonly_context_impl::power_projection(), time_of_day_at(), unit_box_at(), gui2::dialogs::custom_tod::update_selected_tod_info(), and write().
t_string time_of_day::name |
Definition at line 88 of file time_of_day.hpp.
Referenced by luaW_push_tod(), operator==(), time_of_day_at(), unit_box_at(), gui2::dialogs::custom_tod::update_selected_tod_info(), and write().
std::string time_of_day::sounds |
List of "ambient" sounds associated with this time_of_day, Played at the beginning of turn.
Definition at line 108 of file time_of_day.hpp.
Referenced by play_controller::init_side_end(), luaW_push_tod(), operator==(), gui2::dialogs::tod_getter_sound(), gui2::dialogs::custom_tod::update_selected_tod_info(), and write().