mkRPG
 All Classes Namespaces Functions
Functions
parsing::entity_parser Namespace Reference

Functions

def get_characteristics
def parse_entity
def get_names
def parse_entities
def parse_multiple_entities
def check_entity

Detailed Description

This module handles the parsing of entities.
The entities, if present, are present in the files tagged by Entity in the
world.xml file.
It is possible to present several Entity files, for example for a clearer
separation for the Dungeon Master.

An entity may have a default position, an one or more characteristics.
These characteristics are independent of the game generator, and though are
handled by a dictionary. However, it always have a name. Moreover,
it always have a picture, its grpahical representation in the GUI client

Function Documentation

def parsing.entity_parser.check_entity (   entities_found,
  entities_listed 
)
Checks if all entities found in files world.xml, and cell.xml and others
are present in entites tagged files.
def parsing.entity_parser.get_characteristics (   _characteristics)
Iterate over all characteristics.
Be careful ! This assume that each characteristic is a leaf of the
tree. Is it legit?
It returns a dictionnary which keys are characteristic names, and values
are the characteristics.
Each characteristic should be an integer.
def parsing.entity_parser.get_names (   entities)
Get the names of the entities.
Parses an entity file, and returns the entities described in the file.
def parsing.entity_parser.parse_entity (   entity_element)
Parses an entity element from the xml tree.
Parses a list of entities, and return the dictionary of all data,
without redundancy.
 All Classes Namespaces Functions