The Battle for Wesnoth  1.19.0-dev
gui2::tip_of_the_day Namespace Reference


std::vector< game_tipload (const config &cfg)
 Loads the tips from a config. More...
std::vector< game_tipshuffle (const std::vector< game_tip > &tips)
 Shuffles the tips. More...

Function Documentation

◆ load()

std::vector< game_tip > gui2::tip_of_the_day::load ( const config cfg)

◆ shuffle()

std::vector< game_tip > gui2::tip_of_the_day::shuffle ( const std::vector< game_tip > &  tips)

Shuffles the tips.

This routine shuffles the tips and filters out the unwanted ones.

tipsThe tips.
The filtered tips in random order.

Definition at line 47 of file tips.cpp.

References preferences::encountered_units(), gui2::dialogs::tip::tip, and gui2::settings::tips.

Referenced by choose_track(), default_map_generator_job::generate_river_internal(), ai::default_recruitment::recruitment::get_best_leader_from_ratio_scores(), gui2::dialogs::title_screen::init_callbacks(), and editor::editor_action_shuffle_area::perform_without_undo().