From 2ba4db37e9746d7e10e80a5c9483c9b4fa39ca89 Mon Sep 17 00:00:00 2001 From: "David.Sharpe" Date: Sat, 5 Mar 2016 18:10:53 +0200 Subject: [PATCH] Fix level converter tool --- koperkapel/levels/l2 | 26 +++++--------------------- koperkapel/levels/level_converter.py | 8 ++++---- koperkapel/levels/t2 | 26 +++++--------------------- 3 files changed, 14 insertions(+), 46 deletions(-) diff --git a/koperkapel/levels/l2 b/koperkapel/levels/l2 index bbfed4a..d53575e 100644 --- a/koperkapel/levels/l2 +++ b/koperkapel/levels/l2 @@ -1,21 +1,5 @@ -wwwwwwwwwwwwwwwwwwwwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wsfffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wffffffffffffffffffwwwwwwwwww -wwwwwwwwwwwwwwwwwwwwwwwwwwwww \ No newline at end of file +wwwwwwwwww +wffffffffw +wsgffgfffw +wffffffffw +wwwwwwwwww \ No newline at end of file diff --git a/koperkapel/levels/level_converter.py b/koperkapel/levels/level_converter.py index 3f195a2..8949de6 100644 --- a/koperkapel/levels/level_converter.py +++ b/koperkapel/levels/level_converter.py @@ -6,7 +6,7 @@ ATTRIBUTE_MAP = { 'behaviour': ['walk', 'fly'], }, }, - 'w': {'floor': {'base': 'floor', + 'w': {'floor': {'base': 'cwall', 'behaviour': [], }, }, @@ -19,7 +19,7 @@ ATTRIBUTE_MAP = { } }, '-': {'tunnels': {'base': 'tunnel', - 'behaviour': ['walk', ], + 'behaviour': ['crawl', ], }, }, 'f': {'floor': {'base': 'floor', @@ -31,7 +31,7 @@ ATTRIBUTE_MAP = { }, }, 'g': {'floor': {'base': 'floor', - 'behaviour': ['walk', 'fly'], + 'behaviour': ['walk', 'fly', 'crawl'], }, }, 'k': {'floor': {'base': 'floor', @@ -84,7 +84,7 @@ class level_generator: tile.update(ATTRIBUTE_MAP[t2]) row.append(tile) if t1 == 's': - level['starting pos'] = [len(level) - 1, len(row) - 1] + level['starting pos'] = [len(row) - 1, len(level['tiles']) - 1] # if t2 == 'd' level['tiles'].append(row) # Crude hack so the level is written into the levels folder diff --git a/koperkapel/levels/t2 b/koperkapel/levels/t2 index 91c04f5..f401896 100644 --- a/koperkapel/levels/t2 +++ b/koperkapel/levels/t2 @@ -1,21 +1,5 @@ -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -tsttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt -ttttttttttttttttttttttttttttt \ No newline at end of file +tttttttttt +tttttttttt +tt-----ttt +tttttttttt +tttttttttt \ No newline at end of file -- 2.34.1