diff options
Diffstat (limited to 'src/setup/level.py')
-rw-r--r-- | src/setup/level.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/setup/level.py b/src/setup/level.py index 907d8bd..193e8f7 100644 --- a/src/setup/level.py +++ b/src/setup/level.py @@ -1,10 +1,12 @@ ''' ''' -from lxml import etree -from utils import utils +from lxml import etree # using lxml for XML processing +from utils import strs # string constants +from utils import utils # some XML utilities -class LevelInfo(object): + +class Level(object): ''' ''' @@ -15,16 +17,17 @@ class LevelInfo(object): #open up the mlvl file and read in its basic properties root = utils.getXMLRoot(path) - self.name = root.xpath('//level-info/@name')[0] - self.description = root.xpath('//level-info/@description')[0] + self.name = root.xpath(strs.XP_LevelName)[0] + self.description = root.xpath(strs.XP_LevelName)[0] + self.path = path pass def getName(self): - '''Gets the name of this level''' + '''Returns the name of this level''' return self.name def getDescription(self): - '''Gets the description of this level''' + '''Returns the description of this level''' return self.description |