mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-06 22:54:24 +00:00
apply patch #1668 by kevg, saving unit status in savefile
This commit is contained in:
parent
26b5e90873
commit
d61e77efc7
@ -114,6 +114,7 @@ Version 1.9.0-svn:
|
||||
* Fixed tab completion not working in the new lobby (bug #14730)
|
||||
* Fixed compilation for g++ 4.5
|
||||
* Cleaned up the gui2 code at various places
|
||||
* Fixed restoring and saving unit statuses (bug #15889)
|
||||
* Music and sound effects
|
||||
* New version of "Northerners" by Stephen Rozanc (TreizeCouleurs)
|
||||
|
||||
|
@ -439,8 +439,8 @@ unit::unit(const config &cfg, bool use_traits, game_state* state) :
|
||||
"support will be removed in 1.9.2.\n";
|
||||
if (!utils::string_bool(st.second, true))
|
||||
set_state("unhealable", true);
|
||||
} else if (utils::string_bool(st.second)) {
|
||||
set_state(st.first, true);
|
||||
} else {
|
||||
set_state(st.first, utils::string_bool(st.second));
|
||||
}
|
||||
}
|
||||
cfg_.clear_children("status");
|
||||
@ -1106,10 +1106,7 @@ const std::map<std::string,std::string> unit::get_states() const
|
||||
for (std::map<std::string, state_t>::const_iterator i = known_boolean_state_names_.begin(),
|
||||
i_end = known_boolean_state_names_.end(); i != i_end; ++i)
|
||||
{
|
||||
if (get_state(i->second)) {
|
||||
all_states.insert(make_pair(i->first, "yes" ));
|
||||
}
|
||||
|
||||
all_states[i->first] = get_state(i->second) ? "yes" : "no";
|
||||
}
|
||||
return all_states;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user