Functions | |
std::vector< game_tip > | load (const config &cfg) |
Loads the tips from a config. More... | |
std::vector< game_tip > | shuffle (const std::vector< game_tip > &tips) |
Shuffles the tips. More... | |
Loads the tips from a config.
cfg | A config with the tips. |
Definition at line 37 of file tips.cpp.
References config::child_range(), and gui2::dialogs::tip::tip.
Referenced by ai::lua_candidate_action_wrapper_external::generate_code(), lua_kernel_base::get_attribute_names(), game_launcher::load_game(), play_controller::load_game(), gui2::dialogs::mp_create_game::load_game_callback(), and gui2::dialogs::editor_edit_unit::pre_show().
Shuffles the tips.
This routine shuffles the tips and filters out the unwanted ones.
tips | The tips. |
Definition at line 48 of file tips.cpp.
References randomness::rng::default_instance(), prefs::encountered_units(), utils::erase_if(), prefs::get(), 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().