Minimum number of turns reduced to 1, upon request of Mythological.
This commit is contained in:
parent
1ce985e988
commit
16f52f0e3c
5 changed files with 13 additions and 5 deletions
|
@ -26,6 +26,7 @@ Version 1.3.8+svn:
|
|||
* Charge to The Freelands
|
||||
* Meteor Lake to Fallenstar Lake
|
||||
* Triple Blitz to Alirok Marsh
|
||||
* minimum number of turns reduced to 1
|
||||
* units:
|
||||
* balancing changes:
|
||||
* created undead variations for the 'bat' and 'gryphon' race
|
||||
|
|
|
@ -31,6 +31,7 @@ Version 1.3.8+svn:
|
|||
* Charge to The Freelands
|
||||
* Meteor Lake to Fallenstar Lake
|
||||
* Triple Blitz to Alirok Marsh
|
||||
* Minimum number of turns reduced to 1.
|
||||
|
||||
* Unit changes and balancing
|
||||
* Created undead variations for the 'bat' and 'gryphon' race.
|
||||
|
|
|
@ -119,8 +119,9 @@ create::create(game_display& disp, const config &cfg, chat& c, config& gamelist)
|
|||
maps_menu_.move_selection(preferences::map());
|
||||
maps_menu_.set_numeric_keypress_selection(false);
|
||||
|
||||
turns_slider_.set_min(20);
|
||||
turns_slider_.set_max(100);
|
||||
turns_slider_.set_min(settings::turns_min);
|
||||
turns_slider_.set_max(settings::turns_max);
|
||||
turns_slider_.set_increment(settings::turns_step);
|
||||
turns_slider_.set_value(preferences::turns());
|
||||
turns_slider_.set_help_string(_("The maximum number of turns the game can last"));
|
||||
|
||||
|
|
|
@ -26,14 +26,15 @@ namespace settings {
|
|||
|
||||
int get_turns(const std::string& value)
|
||||
{
|
||||
// Special case, -1 is also allowed, which are unlimited turns
|
||||
// Special case, -1 is also allowed, which means unlimited turns
|
||||
int val = lexical_cast_default<int>(value);
|
||||
|
||||
if(val == -1) {
|
||||
return 100;
|
||||
return turns_max;
|
||||
}
|
||||
|
||||
return lexical_cast_in_range<int>(value, 100, 20, 100);
|
||||
return lexical_cast_in_range<int>
|
||||
(value, turns_default, turns_min, turns_max);
|
||||
}
|
||||
|
||||
int get_village_gold(const std::string& value)
|
||||
|
|
|
@ -39,6 +39,10 @@ namespace settings {
|
|||
* @returns the number of turns
|
||||
*/
|
||||
int get_turns(const std::string& value);
|
||||
const int turns_min = 1; //< minimum number of turns
|
||||
const int turns_max = 100; //< maximum number of turns
|
||||
const int turns_default = 100; //< default number of turns
|
||||
const int turns_step = 1; //< slider step size for turns
|
||||
|
||||
/**
|
||||
* Gets the village gold.
|
||||
|
|
Loading…
Add table
Reference in a new issue