- over_cookie_spawner = None
- for t in [t for t in self.thing.game.things
- if t.type_ == 'CookieSpawner'
- and t.position == dropped.position]:
- over_cookie_spawner = t
- break
- if over_cookie_spawner:
- over_cookie_spawner.accept(dropped)
- self.thing.game.remove_thing(dropped)
- elif dropped.type_ == 'Bottle' and not dropped.full:
- for t in [t for t in self.thing.game.things
- if t.type_ == 'BottleDeposit'
- and t.position == dropped.position]:
- t.accept()
+ targets = [t for t in self.thing.game.things
+ if t.position == dropped.position and not t == dropped]
+ for target in targets:
+ if target.type_ == 'CookieSpawner':
+ target.accept(dropped)