Functions | |
| def | interaction_parser |
| def | interactions_parser |
| def | interactions_files_parser |
| def | get_all_actions |
| def | check_actions |
This file handles parsing of interactions files, that is to say files that describe the reactions of the game to the keyboard, and the events associated to these interactions.
| def parsing.interactions_parser.check_actions | ( | interactions, | |
| actions | |||
| ) |
Checks if all actions called by an interaction exist.
| def parsing.interactions_parser.get_all_actions | ( | interactions | ) |
Returns a list with all action names defined in ```interaction```. It is useful in order to check that no action called in an Action tagged file is never called by an interaction. No sanity check is done here, since interactions should be well-formed when it arrives here.
| def parsing.interactions_parser.interaction_parser | ( | interaction_tag | ) |
Parses one interaction tag. An interaction tag is very simple, it contains a curses keycode, a target and and event.
| def parsing.interactions_parser.interactions_files_parser | ( | interactions_files | ) |
This function parses a list of files, in order to find all interactions described in these files. It provides some safety, since it checks that every keycode is used at most once.
| def parsing.interactions_parser.interactions_parser | ( | interaction_xml | ) |
This function parses a whole file, and returns the dictionnary of all actions described in the file.
1.7.6.1