diff options
Diffstat (limited to 'src/game.py')
-rw-r--r-- | src/game.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game.py b/src/game.py index 82330b7..611d5b1 100644 --- a/src/game.py +++ b/src/game.py @@ -106,6 +106,15 @@ def run(screen, save_data): audio.play_sfx(block_list[selected_block]['sounds'][0]) chunk[screen_blocks[i][3] + 1][screen_blocks[i][6]][screen_blocks[i][7]] = selected_block need_update_world = True + else: + print("Cannot place block at " + str(screen_blocks[i][6]) + ", " + str(screen_blocks[i][3] + 1) + ", " + str(screen_blocks[i][7])) + + if not (len(chunk) - 1 >= screen_blocks[i][3] + 1): + print(" => No layer available") + elif not (chunk[screen_blocks[i][3] + 1][screen_blocks[i][7]][screen_blocks[i][6]] == "air"): + print(" => Above layer obstructed, has " + chunk[screen_blocks[i][3] + 1][screen_blocks[i][7]][screen_blocks[i][6]]) + elif not (chunk[screen_blocks[i][3] + 1][screen_blocks[i][6]][screen_blocks[i][7]] != selected_block): + print(" => No change to make") break elif right: |