mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-17 21:41:29 +00:00
Don't lock side configurations if map settings are not in use.
This commit is contained in:
parent
e9fad7130e
commit
a011e6e894
@ -150,14 +150,13 @@ configure::configure(game_display& disp, const config &cfg, chat& c, config& gam
|
||||
xp_modifier_slider_.set_increment(10);
|
||||
xp_modifier_slider_.set_help_string(_("The amount of experience a unit needs to advance"));
|
||||
|
||||
use_map_settings_.set_check(preferences::use_map_settings());
|
||||
use_map_settings_.set_help_string(_("Use scenario specific settings"));
|
||||
const bool side_configurations_lock =
|
||||
parameters_.scenario_data["side_configurations_lock"].to_bool();
|
||||
if (side_configurations_lock) {
|
||||
if (parameters_.scenario_data["side_configurations_lock"].to_bool()) {
|
||||
use_map_settings_.enable(false);
|
||||
use_map_settings_.set_check(true);
|
||||
} else {
|
||||
use_map_settings_.set_check(preferences::use_map_settings());
|
||||
}
|
||||
use_map_settings_.set_help_string(_("Use scenario specific settings"));
|
||||
|
||||
random_start_time_.set_check(preferences::random_start_time());
|
||||
random_start_time_.set_help_string(_("Randomize time of day in begin"));
|
||||
|
@ -87,8 +87,14 @@ connect_engine::connect_engine(game_display& disp, game_state& state,
|
||||
return;
|
||||
}
|
||||
|
||||
side_configurations_lock_ = params_.saved_game ? true :
|
||||
level()["side_configurations_lock"].to_bool(!first_scenario);
|
||||
if (params_.saved_game) {
|
||||
side_configurations_lock_ = true;
|
||||
} else if (!params_.use_map_settings) {
|
||||
side_configurations_lock_ = false;
|
||||
} else {
|
||||
side_configurations_lock_ =
|
||||
level()["side_configurations_lock"].to_bool(!first_scenario);
|
||||
}
|
||||
|
||||
// Original level sides.
|
||||
config::child_itors sides = current_config()->child_range("side");
|
||||
|
Loading…
x
Reference in New Issue
Block a user