Made lever toggle arrow block.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user