Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/setup/level.py
blob: 193e8f77b2035704b6774670206dfe23f4dca3ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
'''

'''
from lxml import etree  # using lxml for XML processing
from utils import strs  # string constants
from utils import utils # some XML utilities


class Level(object):
    '''
    '''

    def __init__(self, path):
        '''
        Constructor
        '''
        
        #open up the mlvl file and read in its basic properties
        root = utils.getXMLRoot(path)
        self.name = root.xpath(strs.XP_LevelName)[0]
        self.description = root.xpath(strs.XP_LevelName)[0]
        self.path = path
        pass
    
    def getName(self):
        '''Returns the name of this level'''
        return self.name
    
    def getDescription(self):
        '''Returns the description of this level'''
        return self.description