Beispiel #1
0
def switch_to_main_menu():
    while MENUS:
        MENUS.pop(0)

    _menu_items = []
    _menu_items.append(
        menus.create_item('single', 'Start', None, enabled=WORLD_INFO['id']))
    _menu_items.append(
        menus.create_item('single',
                          'Select World',
                          None,
                          enabled=profiles.get_worlds()))
    _menu_items.append(menus.create_item('single', 'World Generation', None))
    _menu_items.append(menus.create_item('single', 'Quit', None))

    _i = menus.create_menu(title='Reactor 3',
                           menu=_menu_items,
                           padding=(1, 1),
                           position=(0, 0),
                           format_str='$k',
                           on_select=main_menu_select,
                           on_change=None,
                           on_close=clear)

    menus.activate_menu(_i)
    clear()
Beispiel #2
0
def switch_to_select_world():
	_menu_items = []
	
	for world in profiles.get_worlds():
		_menu_items.append(menus.create_item('single', 'World %s' % world, None, world=world, enabled=(not world == WORLD_INFO['id'])))
	_menu_items.append(menus.create_item('single', 'Back', None))
	
	_i = menus.create_menu(title='Select World',
		menu=_menu_items,
		padding=(1,1),
		position=(0,0),
		format_str='$k',
		on_select=world_select_select,
		on_change=None,
		on_close=clear)
	
	menus.activate_menu(_i)
	clear()
Beispiel #3
0
def switch_to_select_world():
	_menu_items = []
	
	for world in profiles.get_worlds():
		_menu_items.append(menus.create_item('single', 'World %s' % world, None, world=world, enabled=(not world == WORLD_INFO['id'])))
	_menu_items.append(menus.create_item('single', 'Back', None))
	
	_i = menus.create_menu(title='Select World',
		menu=_menu_items,
		padding=(1,1),
		position=(0,0),
		format_str='$k',
		on_select=world_select_select,
		on_change=None,
		on_close=clear)
	
	menus.activate_menu(_i)
	clear()
Beispiel #4
0
def switch_to_main_menu():
	while MENUS:
		MENUS.pop(0)
	
	_menu_items = []
	_menu_items.append(menus.create_item('single', 'Start', None, enabled=WORLD_INFO['id']))
	_menu_items.append(menus.create_item('single', 'Select World', None, enabled=profiles.get_worlds()))
	_menu_items.append(menus.create_item('single', 'World Generation', None))
	_menu_items.append(menus.create_item('single', 'Quit', None))
	
	_i = menus.create_menu(title='Reactor 3',
		menu=_menu_items,
		padding=(1,1),
		position=(0,0),
		format_str='$k',
		on_select=main_menu_select,
		on_change=None,
		on_close=clear)
	
	menus.activate_menu(_i)
	clear()
Beispiel #5
0
    SETTINGS['draw z-levels below'] = True
    SETTINGS['draw z-levels above'] = True

    life.initiate_life('human')
    life.initiate_life('dog')
    life.initiate_life('night_terror')

    items.initiate_all_items()

    SETTINGS['running'] = 3

    if '--menu' in sys.argv:
        SETTINGS['running'] = 1
    elif '--quick' in sys.argv:
        for world in profiles.get_worlds():
            worldgen.load_world(world)
            break

        if SETTINGS['controlling']:
            SETTINGS['running'] = 2
            gfx.prepare_map_views()
        else:
            logging.debug('No active player found. Going back to menu.')
            SETTINGS['running'] = 1

    if '--debug' in sys.argv:
        _debug_host = network.DebugHost()
        _debug_host.start()
        WORLD_INFO['debug'] = _debug_host
Beispiel #6
0
    SETTINGS["draw z-levels below"] = True
    SETTINGS["draw z-levels above"] = True

    life.initiate_life("human")
    life.initiate_life("dog")
    life.initiate_life("night_terror")

    items.initiate_all_items()

    SETTINGS["running"] = 3

    if "--menu" in sys.argv:
        SETTINGS["running"] = 1
    elif "--quick" in sys.argv:
        for world in profiles.get_worlds():
            worldgen.load_world(world)
            break

        if SETTINGS["controlling"]:
            SETTINGS["running"] = 2
            gfx.prepare_map_views()
        else:
            logging.debug("No active player found. Going back to menu.")
            SETTINGS["running"] = 1

    if "--debug" in sys.argv:
        _debug_host = network.DebugHost()
        _debug_host.start()
        WORLD_INFO["debug"] = _debug_host