def generate_systems(self, notify=True): maxval = random.randrange(config["minimum_systems"], config["maximum_systems"]) if notify: pbar = ProgressBar() else: pbar = ultrapass() systems = {} name.seed() systems[0] = System( self, 0, name.generate(sep='', prefix=name.prefixes, body=name.sounds, bodies=random.randrange(1, 5), _terminate=random.choice(name.suffixes), suffix=name.postfix_func(' ', name.alphabetize)), (1, random.randrange(1, 5))) for i in pbar(xrange(1, maxval)): systems[i] = System( self, i, name.generate(sep='', prefix=name.prefixes, body=name.sounds, bodies=random.randrange(1, 5), _terminate=random.choice(name.suffixes), suffix=name.postfix_func(' ', name.alphabetize)), (i + 1, i - 1, random.randrange(0, i + 5))) logging.debug('Solar system generation loop at %i/%i', i, maxval) return systems
def generate_items(self): items = {} name.seed() for i in xrange(0, random.randrange(10, 276)): func = random.choice(('dmg', 'scn', 'movt', 'movr', 'hull')) items[i] = Item(i, name.generate_legacy(sep=' ', prefix=item_prefix, body=item_body[func], suffix=name.romanize), random.randrange(0, 10) + 1, func) return items
def generate_materials(num = -1): logging.debug('Generating materials') seed() mat = {} num = num if num != -1 else random.randrange(7, 51) for i in xrange(num): #_mat = name(2) + random.choice(('nite', 'inite', 'ium', 'tine')) _mat = element_name() mat[_mat] = _mat + ' ' + random.choice(('block', 'lump', 'ingot', 'bar', 'gas container', 'liquid container', 'crystal', 'gem', 'jewel', 'stone')) return mat
def generate_items(self): items = {} name.seed() for i in xrange(0, random.randrange(10, 276)): func = random.choice(('dmg', 'scn', 'movt', 'movr', 'hull')) items[i] = Item( i, name.generate_legacy(sep=' ', prefix=item_prefix, body=item_body[func], suffix=name.romanize), random.randrange(0, 10) + 1, func) return items
def generate_materials(num=-1): logging.debug('Generating materials') seed() mat = {} num = num if num != -1 else random.randrange(config["minimum_materials"], config["maximum_materials"]) for i in xrange(num): #_mat = name(2) + random.choice(('nite', 'inite', 'ium', 'tine')) _mat = element_name() mat[_mat] = _mat + ' ' + random.choice( ('block', 'lump', 'ingot', 'bar', 'gas container', 'liquid container', 'crystal', 'gem', 'jewel', 'stone')) return mat
def generate_systems(self, notify = True): global MINIMUM_SYSTEMS global MAXIMUM_SYSTEMS maxval = random.randrange(MINIMUM_SYSTEMS, MAXIMUM_SYSTEMS) if notify: pbar = ProgressBar() else: pbar = ultrapass() systems = {} name.seed() systems[0] = System(self, 0, name.generate(sep='', prefix=name.prefixes, body=name.sounds, bodies=random.randrange(1, 5), _terminate=random.choice(name.suffixes), suffix=name.postfix_func(' ', name.alphabetize)), (1, random.randrange(1, 5))) for i in pbar(xrange(1, maxval)): systems[i] = System(self, i, name.generate(sep='', prefix=name.prefixes, body=name.sounds, bodies=random.randrange(1, 5), _terminate=random.choice(name.suffixes), suffix=name.postfix_func(' ', name.alphabetize)), (i + 1, i - 1, random.randrange(0, i + 5))) logging.debug('Solar system generation loop at %i/%i', i, maxval) return systems