Support delayed_variable_substitution= in [on_undo], [on_redo]
This commit is contained in:
parent
0ac0981ffe
commit
ee80e66f95
2 changed files with 11 additions and 2 deletions
|
@ -13,6 +13,7 @@ Version 1.13.4+dev:
|
|||
interpolation scaling.
|
||||
* New ~SCALE_INTO_SHARP(w,h) IPF which preserves aspect ratio, using
|
||||
nearest neighbor scaling.
|
||||
* Support delayed_variable_substitution= in [on_undo], [on_redo]
|
||||
* Lua API:
|
||||
* wesnoth.match_unit can now take a location (rather than a unit) as
|
||||
the optional third parameter. This will cause the filter to consider
|
||||
|
|
|
@ -1281,12 +1281,20 @@ WML_HANDLER_FUNCTION(wml_message, cfg)
|
|||
|
||||
WML_HANDLER_FUNCTION(on_undo, cfg)
|
||||
{
|
||||
synced_context::add_undo_commands(cfg.get_parsed_config());
|
||||
if(cfg["delayed_variable_substitution"].to_bool(false)) {
|
||||
synced_context::add_undo_commands(cfg.get_config());
|
||||
} else {
|
||||
synced_context::add_undo_commands(cfg.get_parsed_config());
|
||||
}
|
||||
}
|
||||
|
||||
WML_HANDLER_FUNCTION(on_redo, cfg)
|
||||
{
|
||||
synced_context::add_redo_commands(cfg.get_parsed_config());
|
||||
if(cfg["delayed_variable_substitution"].to_bool(false)) {
|
||||
synced_context::add_redo_commands(cfg.get_config());
|
||||
} else {
|
||||
synced_context::add_redo_commands(cfg.get_parsed_config());
|
||||
}
|
||||
}
|
||||
|
||||
} // end namespace game_events
|
||||
|
|
Loading…
Add table
Reference in a new issue