mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-29 20:16:04 +00:00
Rename [store_relative_dir] to [store_relative_direction]
This commit is contained in:
parent
e2b85cf756
commit
3103fe2561
@ -261,7 +261,7 @@ Additionally, you can use "log-debug=scripting/lua" at command line, and all lua
|
||||
[*] [elseif] inside [if] simplifies wml program flow.
|
||||
[*] [do_command] allows to execute attacks, moves, recalls, recruits .. from wml having the same effect as if a player had ordered them.
|
||||
[*] [put_to_recall_list]
|
||||
[*] [store_relative_dir]
|
||||
[*] [store_relative_direction]
|
||||
[*] [remove_event]
|
||||
[/list]
|
||||
[/section]
|
||||
|
@ -1456,21 +1456,21 @@ WML_HANDLER_FUNCTION(sound_source, /*event_info*/, cfg)
|
||||
}
|
||||
}
|
||||
|
||||
/// Store the relative direction from one hex to antoher in a WML variable.
|
||||
/// Store the relative direction from one hex to another in a WML variable.
|
||||
/// This is mainly useful as a diagnostic tool, but could be useful
|
||||
/// for some kind of scenario.
|
||||
WML_HANDLER_FUNCTION(store_relative_dir, /*event_info*/, cfg)
|
||||
WML_HANDLER_FUNCTION(store_relative_direction, /*event_info*/, cfg)
|
||||
{
|
||||
if (!cfg.child("source")) {
|
||||
WRN_NG << "No source in [store_relative_dir]" << std::endl;
|
||||
WRN_NG << "No source in [store_relative_direction]" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (!cfg.child("destination")) {
|
||||
WRN_NG << "No destination in [store_relative_dir]" << std::endl;
|
||||
WRN_NG << "No destination in [store_relative_direction]" << std::endl;
|
||||
return;
|
||||
}
|
||||
if (!cfg.has_attribute("variable")) {
|
||||
WRN_NG << "No variable in [store_relative_dir]" << std::endl;
|
||||
WRN_NG << "No variable in [store_relative_direction]" << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1487,7 +1487,7 @@ WML_HANDLER_FUNCTION(store_relative_dir, /*event_info*/, cfg)
|
||||
}
|
||||
catch(const invalid_variablename_exception&)
|
||||
{
|
||||
ERR_NG << "Cannot do [store_relative_dir] with invalid destination variable: " << variable << " with " << cfg.get_config().debug() << std::endl;
|
||||
ERR_NG << "Cannot do [store_relative_direction] with invalid destination variable: " << variable << " with " << cfg.get_config().debug() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user