diff options
Diffstat (limited to 'src/menu.py')
-rw-r--r-- | src/menu.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/menu.py b/src/menu.py index 95147df..1b877ac 100644 --- a/src/menu.py +++ b/src/menu.py @@ -51,6 +51,8 @@ def show(screen): if event.key == pygame.K_ESCAPE: run = False elif event.key == pygame.K_RETURN: + text = text.strip() + for i in ["con", "prn", "aux", "nul", "com1", "com2", "com3", "com4", "com5", "com6", "com7", "com8", "com9", "lpt1", "lpt2", "lpt3", "lpt4", "lpt5", "lpt6", "lpt7", "lpt8", "lpt9"]: @@ -90,15 +92,10 @@ def show(screen): screen.blit(scaled_win, (screen.get_size()[0] / 2 - width / 2, screen.get_size()[1] / 2 - height / 2)) pygame.display.flip() - world_map = [[["grass_block" for _ in range(20)] for _ in range(20)]] - - for _ in range(9): - world_map.append([["air" for _ in range(20)] for _ in range(20)]) - audio.wait_for_sfx() import game - game.run(screen, world_map, helper.get_data_path() + "/saves/" + text) + game.run(screen, helper.get_data_path() + "/saves/" + text) return else: @@ -159,6 +156,8 @@ def show(screen): canvas.blit(helper.text("Notice:", 20, (255, 255, 255)), (50, 75 + (25 * (last_i + 2)))) canvas.blit(helper.text("Worlds from Blocks 0.1a are not compatible and", 20, (255, 255, 255)), (75, 75 + (25 * (last_i + 3)))) canvas.blit(helper.text("do not show up here.", 20, (255, 255, 255)), (75, 75 + (25 * (last_i + 4)))) + canvas.blit(helper.text("Worlds from Blocks 0.2a are not compatible and", 20, (255, 255, 255)), (75, 75 + (25 * (last_i + 5)))) + canvas.blit(helper.text("will crash the game.", 20, (255, 255, 255)), (75, 75 + (25 * (last_i + 6)))) scaled_win = pygame.transform.scale(canvas, (width, height)) screen.blit(scaled_win, (screen.get_size()[0] / 2 - width / 2, screen.get_size()[1] / 2 - height / 2)) @@ -184,7 +183,7 @@ def show(screen): audio.wait_for_sfx() import game - game.run(screen, loaded['blocks'], helper.get_data_path() + "/saves/" + world_name) + game.run(screen, helper.get_data_path() + "/saves/" + world_name) return else: |