1
0
Fork 0

avoid being able to dash to a waste that's on a place where we couldn't walk

This commit is contained in:
Manu 2021-04-25 16:48:03 +02:00
parent c35ddb261a
commit 446e889172
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ class Tile:
func get_waste_line(var direction :Vector2, var continuous := false) -> Array:
var waste_line := []
if has_waste():
if has_waste() and has_floor():
waste_line = get_next_tile(direction).get_waste_line(direction, continuous)
waste_line.push_front(self)
elif continuous and can_walk():

View File

@ -17,7 +17,7 @@ z_index = 1
tile_data = PoolIntArray( 393216, 0, 0, 393217, 0, 0, 393219, 0, 0, 393220, 0, 0, 524299, 8, 0, 655366, 7, 0 )
[node name="Waste" parent="." index="2" instance=ExtResource( 1 )]
tile_data = PoolIntArray( 327691, 15, 0, 393216, 0, 0, 393217, 0, 0, 393219, 0, 0, 393220, 0, 0, 524295, 14, 0, 655370, 11, 0 )
tile_data = PoolIntArray( 327691, 15, 0, 393216, 0, 0, 524295, 14, 0, 655370, 11, 0 )
[node name="Player" parent="." index="3" instance=ExtResource( 2 )]
position = Vector2( 800, 440 )