diff --git a/src/client/resources/dota/levels/level000.txt b/src/client/resources/dota/levels/level000.txt index 2e6a368..430482f 100644 --- a/src/client/resources/dota/levels/level000.txt +++ b/src/client/resources/dota/levels/level000.txt @@ -1 +1,2 @@ -000044000000000000000000005500004400550000004400000000000000000000550000440055000000440000004400003333000055000044005555000044000000440000333300005500004400555500004422442244000000000000550000440000000000442244224400000000000055000044000000000000000000444444555544444400442200330000000000000044444455554444440044220033005555333333554422220000222244000022003300555533333355442222000022224400002200330000000000000044220000000022440000440033000000000000004422000000002244000044003300000000000000550000555500005500002200000000000000000055000055550000550000220000004444444400005500445555440055000044444444444444440000550044555544005500004444444400000022000055000055550000550000000000000000002200005500005555000055000000000000003300440000442200000000224400000000000000330044000044220000000022440000000000000033002200004422220000222244553333335555003300220000442222000022224455333333555500330022440044444455554444440000000000000033002244004444445555444444000000000000000000440000550000000000004422442244000000000044000055000000000000442244224400005555004400005500003333000044000000440000555500440000550000333300004400000044000000550044000055000000000000000000004400000055004400005500000000000000000000440000 \ No newline at end of file +points: [{index: -1, team: radiant, x: 0, direction: right, type: eagle, y: 28}, {index: 0, team: radiant, x: 0, direction: right, type: tank, y: 0}, {index: 1, team: radiant, x: 6, direction: right, type: tank, y: 10}, {index: 2, team: radiant, x: 6, direction: right, type: tank, y: 16}, {index: 3, team: radiant, x: 6, direction: right, type: tank, y: 22}, {index: 4, team: radiant, x: 10, direction: right, type: tank, y: 28}, {index: -1, team: dire, x: 38, direction: right, type: eagle, y: 0}, {index: 0, team: dire, x: 38, direction: left, type: tank, y: 28}, {index: 1, team: dire, x: 32, direction: left, type: tank, y: 18}, {index: 2, team: dire, x: 32, direction: left, type: tank, y: 12}, {index: 3, team: dire, x: 32, direction: left, type: tank, y: 6}, {index: 4, team: dire, x: 28, direction: left, type: tank, y: 0}] +data: "000044000000000000000000005500004400550000004400000000000000000000550000440055000000440000004400003333000055000044005555000044000000440000333300005500004400555500004422442244000000000000550000440000000000442244224400000000000055000044000000000000000000444444555544444400442200330000000000000044444455554444440044220033005555333333554422220000222244000022003300555533333355442222000022224400002200330000000000000044220000000022440000440033000000000000004422000000002244000044003300000000000000550000555500005500002200000000000000000055000055550000550000220000004444444400005500445555440055000044444444444444440000550044555544005500004444444400000022000055000055550000550000000000000000002200005500005555000055000000000000003300440000442200000000224400000000000000330044000044220000000022440000000000000033002200004422220000222244553333335555003300220000442222000022224455333333555500330022440044444455554444440000000000000033002244004444445555444444000000000000000000440000550000000000004422442244000000000044000055000000000000442244224400005555004400005500003333000044000000440000555500440000550000333300004400000044000000550044000055000000000000000000004400000055004400005500000000000000000000440000" diff --git a/src/common/haxe/ru/m/tankz/config/LevelBundle.hx b/src/common/haxe/ru/m/tankz/config/LevelBundle.hx index d9ec855..2412766 100644 --- a/src/common/haxe/ru/m/tankz/config/LevelBundle.hx +++ b/src/common/haxe/ru/m/tankz/config/LevelBundle.hx @@ -37,20 +37,19 @@ class LevelBundle { } public static function loads(config:Config, data:String):LevelConfig { - try { + if (config.type == 'classic') { + return loadsOld(config, data); + } else { var obj:LevelSource = Yaml.parse(data, Parser.options().useObjects()); return { data: obj.data.split('').map(function(c) return config.getBrick(Std.parseInt(c))), points: obj.points, } - } catch (error:Dynamic) { - L.w('LevelBundle', '${error}'); - return loadsOld(config, data); } } public static function dumps(config:Config, level:LevelConfig):String { - var bricksStr = level.data.map(function(brick:BrickConfig) return brick.type).join(''); + var bricksStr = level.data.map(function(brick:BrickConfig) return Std.string(brick.type)).join(''); return Yaml.render({ data: bricksStr, points: level.points,