bindings: add support for action "require_screen"

This commit is contained in:
Andrzej Rybczak
2012-09-16 04:33:52 +02:00
parent f0a0734728
commit 8ac1a38213
5 changed files with 72 additions and 5 deletions

View File

@@ -127,6 +127,16 @@ Action *parseActionLine(const std::string &line, F error)
else
error() << "empty argument passed to push_characters\n";
}
else if (action_name == "require_screen")
{
// require screen of given type
std::string arg = getEnclosedString(line, '"', '"', 0);
ScreenType screen_type = stringToScreenType(arg);
if (screen_type != ScreenType::Unknown)
result = new RequireScreen(screen_type);
else
error() << "unknown screen passed to require_screen: '" << arg << "'\n";
}
else if (action_name == "require_runnable")
{
// require that given action is runnable