Classes | |
class | mt_rng |
class | rng |
this class does not give synced random results derived classes might do. More... | |
class | rng_deterministic |
This rng is used when the normal synced rng is not available this is currently only he case at the very start of the scenario (random generation of starting units traits). More... | |
class | rng_proxy |
class | set_random_determinstic |
RAII class to use rng_deterministic in the current scope. More... | |
class | synced_rng |
Variables | |
rng * | generator = &rng::default_instance() |
This generator is automatically synced during synced context. More... | |
rng * randomness::generator = &rng::default_instance() |
This generator is automatically synced during synced context.
Calling this rng during a synced context automatically makes undoing impossible. Outside a synced context this has the same effect as rand()
Definition at line 60 of file random.cpp.
Referenced by mapgen_lua_kernel::create_map(), mapgen_lua_kernel::create_scenario(), wfl::operator_expression::dice_roll(), ai::default_recruitment::recruitment::do_randomness(), generate_gender(), help::generate_sections(), help::generate_topic_text(), help::generate_topics(), unit::generate_traits(), ai::default_recruitment::recruitment::get_random_pattern_type_if_exists(), ai::helper_advance_unit(), game_state::init(), context_free_grammar_generator::init_seed(), lua_mathx::intf_random(), leave_synced_context::leave_synced_context(), lua_kernel_base::lua_kernel_base(), markov_generate_name(), random_generate_map(), random_generate_scenario(), mapgen_lua_kernel::run_generator(), randomness::set_random_determinstic::set_random_determinstic(), saved_game::set_random_seed(), set_scontext_synced_base::set_scontext_synced_base(), gui2::slider::set_value_labels(), mapgen_lua_kernel::user_config(), leave_synced_context::~leave_synced_context(), randomness::set_random_determinstic::~set_random_determinstic(), and set_scontext_synced_base::~set_scontext_synced_base().