Fix for bug #22443 (Scenario settings table inaccuracies)
In the method play_controller::fire_start, added start gold amount update for all teams.
This commit is contained in:
parent
ddbdec3a61
commit
2dae3f7a3b
3 changed files with 9 additions and 0 deletions
|
@ -335,6 +335,7 @@ Version 1.13.0-dev:
|
|||
where the Second Watch picture should be used instead (bug #22537).
|
||||
* Fixed mishandling of nested subnamespaces by the [clear_global_variable]
|
||||
WML action causing an assertion failure (bug #21093).
|
||||
* Fix bug #22443: Scenario Settings table has inaccurate Start Gold info in certain cases
|
||||
|
||||
Version 1.11.11:
|
||||
* Add-ons server:
|
||||
|
|
|
@ -463,6 +463,13 @@ void play_controller::fire_start(bool execute){
|
|||
// start event may modify start turn with WML, reflect any changes.
|
||||
start_turn_ = turn();
|
||||
gamestate_.gamedata_.get_variable("turn_number") = int(start_turn_);
|
||||
|
||||
// prestart event may modify the initial gold amount, reflect any changes.
|
||||
BOOST_FOREACH(team& tm, gamestate_.board_.teams_)
|
||||
{
|
||||
tm.set_start_gold(tm.gold());
|
||||
}
|
||||
|
||||
} else {
|
||||
it_is_a_new_turn_ = false;
|
||||
}
|
||||
|
|
|
@ -188,6 +188,7 @@ public:
|
|||
void new_turn() { gold_ += total_income(); }
|
||||
void get_shared_maps();
|
||||
void set_gold(int amount) { gold_ = amount; }
|
||||
void set_start_gold(const int amount) { info_.start_gold = amount; }
|
||||
void spend_gold(const int amount) { gold_ -= amount; }
|
||||
void set_gold_add(bool b) {info_.gold_add = b; }
|
||||
void set_base_income(int amount) { info_.income = amount - game_config::base_income; }
|
||||
|
|
Loading…
Add table
Reference in a new issue