def __init__(self, configuration):
     """Initialise the room"""
     self.min_row_multiplier = common.getIntAttr(configuration, 'minRowMultiplier')
     self.max_row_multiplier = common.getIntAttr(configuration, 'maxRowMultiplier')
     self.min_col_multiplier = common.getIntAttr(configuration, 'minColMultiplier')
     self.max_col_multiplier = common.getIntAttr(configuration, 'maxColMultiplier')
     self.rows = [
         (common.getIntAttr(row, 'repeat'), row.text) for row in configuration.findall('row')
     ]
Exemple #2
0
 def __init__(self, configuration):
     """Initialise the builder"""
     super(BiomeTagger, self).__init__(configuration)
     #
     self.ranges = []
     for biome_range in configuration.find('heightRanges').findall('range'):
         self.ranges.append((common.getIntAttr(biome_range, 'low'),
                             common.getIntAttr(biome_range, 'high'),
                             common.getStrAttr(biome_range, 'tag')))
 def __init__(self, configuration):
     """Initialise the builder"""
     super(BiomeTagger, self).__init__(configuration)
     #
     self.ranges = []
     for biome_range in configuration.find('heightRanges').findall('range'):
         self.ranges.append((
             common.getIntAttr(biome_range, 'low'),
             common.getIntAttr(biome_range, 'high'),
             common.getStrAttr(biome_range, 'tag')
         ))
Exemple #4
0
 def __init__(self, configuration):
     """Initialise the room"""
     self.min_row_multiplier = common.getIntAttr(configuration,
                                                 'minRowMultiplier')
     self.max_row_multiplier = common.getIntAttr(configuration,
                                                 'maxRowMultiplier')
     self.min_col_multiplier = common.getIntAttr(configuration,
                                                 'minColMultiplier')
     self.max_col_multiplier = common.getIntAttr(configuration,
                                                 'maxColMultiplier')
     self.rows = [(common.getIntAttr(row, 'repeat'), row.text)
                  for row in configuration.findall('row')]
Exemple #5
0
 def __init__(self, configuration):
     """Initialise the renderer"""
     super(StringRenderer, self).__init__(configuration)
     #
     self.default_value = common.getString(configuration, 'defaultValue')
     self.values = {}
     for index, value in enumerate(configuration.find('attributeValues').findall('attributeValue')):
         self.values[common.getStrAttr(value, 'tag')] = ColourEntry(
             common.getTupleAttr(value, 'colour'),
             common.getIntAttr(value, 'index', index + 1)
         )