mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-07 22:24:19 +00:00
Added small hack to ease loading of middle-of-scenario 1.6 savefiles.
To be removed for 1.10.
This commit is contained in:
parent
5d47584a12
commit
6e004820b5
@ -263,6 +263,16 @@ LEVEL_RESULT play_game(display& disp, game_state& gamestate, const config& game_
|
||||
if (!gamestate.snapshot["label"].empty()){
|
||||
gamestate.classification().label = gamestate.snapshot["label"];
|
||||
}
|
||||
// Helper for transitioning middle-of-scenario savefiles from 1.6 to 1.8.
|
||||
// To be removed for 1.10.
|
||||
if (!scenario->find_child("event", "name", "preload")) {
|
||||
LOG_NG << "Adding dummy preload event.\n";
|
||||
config &ev = gamestate.snapshot.add_child("event");
|
||||
ev["name"] = "preload";
|
||||
ev["first_time_only"] = "no";
|
||||
config &lua = ev.add_child("lua");
|
||||
lua["code"] = "wesnoth.dofile 'lua/wml-tags.lua'";
|
||||
}
|
||||
}
|
||||
|
||||
controller_map controllers;
|
||||
|
Loading…
x
Reference in New Issue
Block a user