mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-20 23:14:27 +00:00
fix [lua] tags beeing lost on reload
This commit is contained in:
parent
1f3aeb6574
commit
eaa192ffa8
@ -110,6 +110,7 @@ static void copy_persistent(const config& src, config& dst)
|
||||
|
||||
static stringset tags = boost::assign::list_of
|
||||
("terrain_graphics")
|
||||
("lua")
|
||||
.convert_to_container<stringset>();
|
||||
|
||||
BOOST_FOREACH(const std::string& attr, attrs)
|
||||
@ -512,17 +513,11 @@ void play_controller::init_side_end()
|
||||
|
||||
config play_controller::to_config() const
|
||||
{
|
||||
config cfg;
|
||||
config cfg = level_;
|
||||
|
||||
cfg.merge_attributes(level_);
|
||||
cfg["replay_pos"] = saved_game_.get_replay().get_pos();
|
||||
gamestate().write(cfg);
|
||||
|
||||
// Write terrain_graphics data in snapshot, too
|
||||
BOOST_FOREACH(const config& tg, level_.child_range("terrain_graphics")) {
|
||||
cfg.add_child("terrain_graphics", tg);
|
||||
}
|
||||
|
||||
gui_->write(cfg.add_child("display"));
|
||||
|
||||
//Write the soundsources.
|
||||
|
@ -4733,8 +4733,6 @@ void game_lua_kernel::load_game(const config& level)
|
||||
*/
|
||||
void game_lua_kernel::save_game(config &cfg)
|
||||
{
|
||||
cfg.append_children(cfg, "lua");
|
||||
|
||||
lua_State *L = mState;
|
||||
|
||||
if (!luaW_getglobal(L, "wesnoth", "game_events", "on_save", NULL))
|
||||
|
Loading…
x
Reference in New Issue
Block a user