Made lever toggle arrow block.

This commit is contained in:
Sakse Dalum
2012-08-08 17:41:19 +02:00
parent f9e7aa333f
commit 13d3aa1ce9
3 changed files with 53 additions and 11 deletions

View File

@@ -31,7 +31,7 @@ import copy
class WorldObject(object):
def __init__(self, level, x, y, z=0, direction=(1, 0), speed=4,
tile_x=64, tile_y=48,
movable=False):
movable=False, blocking=True):
self.__dict__.update(locals())
self.init_x = self.move_x = self.x = self.x - (self.x % self.tile_x)
@@ -54,8 +54,8 @@ class WorldObject(object):
for obj in self.level.objects:
if (obj.x == self.x + move_x * self.tile_x
and obj.y == self.y + move_y * self.tile_y
and obj != self and obj != self.holder
and obj != self.holding):
and obj is not self and obj is not self.holder
and obj is not self.holding and obj.blocking):
return False
return True
return False