Cut hardcoded restrictions on scenario settings
And widen the corresponding 'soft' coded limits for the multiplayer scenario creation screen.
This commit is contained in:
parent
985ea1113a
commit
234060e08e
3 changed files with 5 additions and 11 deletions
|
@ -348,9 +348,9 @@
|
|||
maximum_value_label = _ "unlimited"
|
||||
)}
|
||||
|
||||
{_GUI_MP_CREATE_OPTION_SLIDER ( _ "Village Gold") "village_gold" 1 5 ( _ "The amount of income each village yields per turn") ()}
|
||||
{_GUI_MP_CREATE_OPTION_SLIDER ( _ "Village Gold") "village_gold" 0 8 ( _ "The amount of income each village yields per turn") ()}
|
||||
|
||||
{_GUI_MP_CREATE_OPTION_SLIDER ( _ "Village Support") "village_support" 0 4 ( _ "The number of unit levels each village can support") ()}
|
||||
{_GUI_MP_CREATE_OPTION_SLIDER ( _ "Village Support") "village_support" 0 8 ( _ "The number of unit levels each village can support") ()}
|
||||
|
||||
{_GUI_MP_CREATE_OPTION_SLIDER ( _ "Experience Modifier") "experience_modifier" 30 200 ( _ "The amount of experience a unit needs to advance") (step_size=10)}
|
||||
|
||||
|
|
|
@ -39,17 +39,17 @@ int get_turns(const std::string& value)
|
|||
|
||||
int get_village_gold(const std::string& value, const game_classification* classification)
|
||||
{
|
||||
return std::clamp<int>(lexical_cast_default<int>(value, ((classification && !classification->is_normal_mp_game()) ? 1 : 2)), 1, 5);
|
||||
return lexical_cast_default<int>(value, ((classification && !classification->is_normal_mp_game()) ? 1 : 2));
|
||||
}
|
||||
|
||||
int get_village_support(const std::string& value)
|
||||
{
|
||||
return std::clamp<int>(lexical_cast_default<int>(value, 1), 0, 4);
|
||||
return lexical_cast_default<int>(value, 1);
|
||||
}
|
||||
|
||||
int get_xp_modifier(const std::string& value)
|
||||
{
|
||||
return std::clamp<int>(lexical_cast_default<int>(value, 70), 30, 200);
|
||||
return lexical_cast_default<int>(value, 70);
|
||||
}
|
||||
|
||||
} // end namespace settings
|
||||
|
|
|
@ -51,8 +51,6 @@ namespace settings {
|
|||
* Gets the village gold.
|
||||
* If no valid value supplied, it will return a default.
|
||||
* The default is 1 for singleplayer, and 2 for multiplayer.
|
||||
* The value is also range checked.
|
||||
* When out of bounds, it will be set to the nearest bound.
|
||||
*
|
||||
* @param value string containing the village gold
|
||||
* @param classification
|
||||
|
@ -64,8 +62,6 @@ namespace settings {
|
|||
/**
|
||||
* Gets the village unit level support.
|
||||
* If no valid value supplied, it will return a default.
|
||||
* The value is also range checked.
|
||||
* When out of bounds, it will be set to the nearest bound.
|
||||
*
|
||||
* @param value string containing the village support
|
||||
*
|
||||
|
@ -76,8 +72,6 @@ namespace settings {
|
|||
/**
|
||||
* Gets the xp modifier.
|
||||
* If no valid value supplied, it will return a default.
|
||||
* The value is also range checked.
|
||||
* When out of bounds, it will be set to the nearest bound.
|
||||
*
|
||||
* @param value string containing the xp modifier
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue