Allowed usage of [message]side_for=...
...when it targets the active side. (Fix for bug #17368.)
This commit is contained in:
parent
faf64021c0
commit
226a947841
1 changed files with 6 additions and 6 deletions
|
@ -2496,12 +2496,12 @@ WML_HANDLER_FUNCTION(message, event_info, cfg)
|
|||
std::string side_for_raw = cfg["side_for"];
|
||||
if (!side_for_raw.empty())
|
||||
{
|
||||
if (has_input) {
|
||||
lg::wml_error << "[message]side_for= can only be used for messages that don't query any user input.\n";
|
||||
return;
|
||||
}
|
||||
|
||||
bool side_for_show = false;
|
||||
/* Always ignore side_for when the message has some input
|
||||
boxes, but display the error message only if side_for is
|
||||
used for an inactive side. */
|
||||
bool side_for_show = has_input;
|
||||
if (has_input && side_for_raw != str_cast(resources::controller->current_side()))
|
||||
lg::wml_error << "[message]side_for= cannot query any user input out of turn.\n";
|
||||
|
||||
std::vector<std::string> side_for =
|
||||
utils::split(side_for_raw, ',', utils::STRIP_SPACES | utils::REMOVE_EMPTY);
|
||||
|
|
Loading…
Add table
Reference in a new issue